-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dots in import prefix names trigger NPE in dartc.jar #266
Comments
This comment was originally written by bernd.par...@gmail.com Correction about the expected output: stringLiteral -> SINGLE LINE STRING -> STRING CONTENT DQ -> STRING INTERPOLATION ->IDENTIFIER NO DOLLAR -> IDENTIFIER START NO DOLLAR -> LETTER: In other words, the expected output should be an error message complaining about prefix:"tests.myLib". |
This comment was originally written by drfibonacci@google.com Added Area-Compiler, Triaged labels. |
This comment was originally written by mmendez@google.com John, can you take a look at this? I think that you may have fixed this already. Set owner to @jtmcdole. |
String Literals can contain '.' and other valid characters. The last sentence in 12.1 of Rev 0.03 of the specification states makes the prefix string even more restrictive: Accepted and looking into it. I didn't have an NPE with the latest bleeding edge (with issue #160), but this should still report an error. Added Accepted label. |
CL posted for review: http://codereview.chromium.org/8441001 Added Started label. |
This comment was originally written by bernd.par...@gmail.com Thanks for the quick response! |
dartlang.org has revision 0.04 right now: |
Added Fixed label. |
This issue was originally filed by bernd.par...@gmail.com
What steps will reproduce the problem?
library("wibble");
class MyClass {}
#library("myApp");
#import("myLibrary.dart", prefix:"tests.myLib");
void main() {
var my_class = new tests.myLib.MyClass(); // <== fails here
}
What is the expected output? What do you see instead?
EXPECTED: no error.
ACTUAL:
java.lang.NullPointerException
at com.google.dart.compiler.resolver.ResolutionContext$Selector.visitPropertyAccess(ResolutionContext.java:280)
at com.google.dart.compiler.resolver.ResolutionContext$Selector.visitPropertyAccess(ResolutionContext.java:271)
at com.google.dart.compiler.ast.DartPropertyAccess.accept(DartPropertyAccess.java:82)
at com.google.dart.compiler.resolver.ResolutionContext.resolveName(ResolutionContext.java:235)
at com.google.dart.compiler.resolver.ResolutionContext.resolveType(ResolutionContext.java:162)
at com.google.dart.compiler.resolver.ResolutionContext.resolveType(ResolutionContext.java:156)
at com.google.dart.compiler.resolver.ResolveVisitor.resolveType(ResolveVisitor.java:90)
at com.google.dart.compiler.resolver.Resolver$ResolveElementsVisitor$1.visitTypeNode(Resolver.java:885)
at com.google.dart.compiler.resolver.Resolver$ResolveElementsVisitor$1.visitTypeNode(Resolver.java:882)
at com.google.dart.compiler.ast.DartTypeNode.accept(DartTypeNode.java:65)
...
What version of the product are you using? On what operating system?
dartc.jar from 10/28/11 compiled following the instructions from the Dart Wiki.
OS=OSX 10.6.8
Please provide any additional information below.
Probably not related to issue #160.
The text was updated successfully, but these errors were encountered: