Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable use of generic type parameter as literal #11345

Closed
DartBot opened this issue Jun 19, 2013 · 3 comments
Closed

Enable use of generic type parameter as literal #11345

DartBot opened this issue Jun 19, 2013 · 3 comments
Assignees
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

Comments

@DartBot
Copy link

DartBot commented Jun 19, 2013

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,

@kasperl
Copy link

kasperl commented Jun 19, 2013

Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

Set owner to @crelier.
Removed Priority-Unassigned label.
Added Priority-Medium, Accepted labels.
Changed the title to: "Enable use of generic type parameter as literal".

@crelier
Copy link
Contributor

crelier commented Jul 1, 2013

Added Duplicate label.
Marked as being merged into #6282.

@DartBot DartBot added Type-Defect 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 labels Jul 1, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants