Community
Participate
Working Groups
class Foo { (String, String) => void func0 // works @Property var (String, String) => void func1 // works @Property (String) => void func2 // produces funny linking errors "The method or field String is undefined for the type Foo" @Property (String, String) => void func3 // produces funny syntax errors: // Multiple markers at this line // - no viable alternative at input ',' // - missing ')' at 'String' // - The value of the field // - no viable alternative at input ')' } workaround: use the "var" or "val" keyword
It's an ambiguous situation where we use a predicate to bind the parentheses explicitly to the annotation. Linking problems are obviously confusing in that case since the declaration is semantically something like @Property(String, String) () => void fun0 Another possible workaround is @Property() (String, String)=>void fun
*** Bug 384889 has been marked as a duplicate of this bug. ***
I don't see how we can fix this. But an improvement would be validation with a quick fix.
*** Bug 404973 has been marked as a duplicate of this bug. ***
I'd think we can use a predicate to disambiguate these cases.