dart2js produces illegible error when library prefix used as expression #11931
Labels
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
What steps will reproduce the problem?
import 'dart:collection' as col;
foo(a) {}
main() {
foo(col).x();
}
What is the expected output?
An error message that:
a. Points to the offending line "foo(col).x();", not the import statement
b. Contains the correct error description, e.g. "library prefix 'col' used as expression"
What do you see instead?
This:
"""
a.dart:1:1: Internal error: unexpected element kind prefix
import 'dart:collection' as col;
^^^^^^
Error: Compilation failed.
"""
What version of the product are you using? On what operating system?
Dart-to-JavaScript compiler (dart2js) version: 0.6.6.0_r25119
Please provide any additional information below.
An alternative fix would be to make libraries true objects that could be passed as values :)
The text was updated successfully, but these errors were encountered: