Community
Participate
Working Groups
When type inference calculates the common super type it ignores generics. var a = [ ["a", "b"] ["c", "d"]; produces a variable of type List<List> and not List<List<String>> The failing logic is in: org.eclipse.b3.backend.evaluator.typesystem.TypeDistance.getMostSpecificCommonType(Type[])
Also see bug 328186 describing that it is also not possible to declare List<List<String>>. Taken together this is not good, and type casting is required part by part with intermediate variables.
The b3 test testWithContext.b3 suffers from this as there is a syntax error caused by the lack of inference. The test evaluates ok (as it should) but there are syntax error markers when editing (because of bug 328182 - all syntax errors are not flagged by junit runner).