#2029 [compiler bug] wrong non-nullabillity inference

Akcelisto Thu 20 Sep 2012

Not compiles:

a := ([,] as List).find{false}!=null

Output:

Comparison of non-nullable type 'sys::Obj' to null

Akcelisto Mon 24 Sep 2012

I try to explain more. Compiler mistakenly thinks that expression ([,] as List).find{false} is non-null.

brian Mon 24 Sep 2012

Promoted to ticket #2029 and assigned to brian

I can fix that also - basically using List or Map instead of the parameterized type doesn't always perform type inference correctly. So use Obj?[] instead of List in the meantime

brian Mon 15 Oct 2012

Ticket resolved in 1.0.64

changeset

Login or Signup to reply.