Closed DartBot closed 9 years ago
The way finals are initialized have changed and I cannot reproduce a case with this error message. Instead, I get:
type 'String' is not a subtype of type 'int' of 'x'.
Feel free to reopen this bug if you find a test case.
Added CannotReproduce label.
This issue was originally filed by ngeoffray@google.com
$ cat foo.dart final int x = 'string'; main() => print(x); $ ./out/ReleaseIA32/dart --enable-type-checks foo.dart Unhandled exception: type 'String' is not a subtype of type 'int' of 'function result'.
0 x (file:///usr/local/google/home/ngeoffray/projects/dart2/dart/foo.dart:1:15)
'file:///usr/local/google/home/ngeoffray/projects/dart2/dart/foo.dart': Error: line 2 pos 18: error initializing final field 'x' main() => print(x);
What is 'function result'?