Enable use of generic type parameter as literal #11345
Labels
area-vm
Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
closed-duplicate
Closed in favor of an existing report
This issue was originally filed by ross.dart...@gmail.com
Dart SDK r24141
Windows 7x64
Consider the following program:
//////////////////////////////////////////
class MakerOf<T> {
const MakerOf();
get type => T;
}
final Type Dynamic = const MakerOf().type;
main() {
print('$Dynamic');
}
//////////////////////////////////////////
The static analyzer presents no warning or error for this code.
dart2js compiles this code and prints 'dynamic'. But the VM yields the following error:
Internal error: 'http://127.0.0.1:3030/D:/github/bug/test.dart': Error: line 44 pos 15: illegal use of type parameter T
get type => T;
thanks,
The text was updated successfully, but these errors were encountered: