You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I minified an example to roughly the methods foo and bar in the code below.
I'd expect them both to work since they achieve similar things but only bar works.
#[derive(CubeType)]structFoo{a:f32,}#[cube]implFoo{// mismatched types// expected struct `ExpandElementTyped<_>`// found struct `FooExpand`pubfnfoo(&self,v:u32) -> Foo{if v > 0{Foo{a:1.0}}else{Foo{a:0.0}}}// okpubfnbar(&self,v:u32) -> Foo{letmut foo = Foo{a:0.0};if v > 0{
foo.a = 1.0}
foo
}}
I'm guessing this is related to the conditional in the expansion, see image:
The text was updated successfully, but these errors were encountered:
I minified an example to roughly the methods
foo
andbar
in the code below.I'd expect them both to work since they achieve similar things but only
bar
works.I'm guessing this is related to the conditional in the expansion, see image:
The text was updated successfully, but these errors were encountered: