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

dartc fails language/SyntaxTest/31-33 #1108

Closed
peter-ahe-google opened this issue Jan 10, 2012 · 7 comments
Closed

dartc fails language/SyntaxTest/31-33 #1108

peter-ahe-google opened this issue Jan 10, 2012 · 7 comments
Assignees

Comments

@peter-ahe-google
Copy link
Contributor

Dartc fails to reject this code:

class BoolImplementation implements Fisk
native "Boolean" /// 31: compile-time error
{}

class _JSON
native 'JSON' /// 32: compile-time error
{}

class ListFactory<E> implements List<E>
native "Array" /// 33: compile-time error
{}

@jtmcdole
Copy link
Contributor

Is your concern that native is not a keyword in the specification and should only be allowed in the core library?

@peter-ahe-google
Copy link
Contributor Author

@codefu: Correct.

@jtmcdole
Copy link
Contributor

Are all dart:<lib> included in the 'core' hierarchy? If so, is there a solution beyond changing every #library('xyz') to #library('dart:xyz') that you see?

@peter-ahe-google
Copy link
Contributor Author

Sorry, you can use the native keyword in any platform library. It is not restricted to the core library.

I don't think you need to change the #library tags. The compiler needs to know what libraries are platform libraries. I should not be able to use native keyword just because I start my file with:

#library('dart:I_want_native');

@jtmcdole
Copy link
Contributor

We can certainly test to see if the unit is a dart URI before running the scanner. DartBoard is currently using the 'native' feature, so we may have to de-prioritize this till it can be updated. Thanks for submitting this as a tracker.

@scheglov
Copy link
Contributor

Set owner to @scheglov.
Added Accepted label.

@scheglov
Copy link
Contributor

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

3 participants