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

Generics in Typedef not working as expected, when extending generic type #436

Closed
DartBot opened this issue Nov 14, 2011 · 4 comments
Closed

Comments

@DartBot
Copy link

DartBot commented Nov 14, 2011

This issue was originally filed by [email protected]


What steps will reproduce the problem?

  1. typedef MyDef<T extends MyBaseClass>(...);

What is the expected output? What do you see instead?
This should work as written. However, the editor complains with warning: 'internal error: type "MyBaseClass" is null'

What version of the product are you using? On what operating system?
Windows 7, Editor build 1357

Please provide any additional information below.
https://groups.google.com/a/dartlang.org/group/misc/browse_thread/thread/9936fa98166ec65b/54ed782814a23ef0?lnk=gst&amp;q=typedef#­54ed782814a23ef0

@peter-ahe-google
Copy link
Contributor

The problem is in dart/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java.

The this loop in visitClass:

       for (Type typeParameter : classElement.getTypeParameters()) {
         ...
       }

Should be repeated for visitFunctionTypeAlias.


Added Area-Compiler, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Dec 19, 2011

This comment was originally written by [email protected]


Set owner to [email protected].

@DartBot
Copy link
Author

DartBot commented Jan 4, 2012

This comment was originally written by [email protected]


http://codereview.chromium.org/9049016/


Added Started label.

@DartBot
Copy link
Author

DartBot commented Jan 9, 2012

This comment was originally written by [email protected]


r3103


Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants