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

NPE compiling the SDK #507

Closed
jvasileff opened this issue Mar 5, 2015 · 5 comments
Closed

NPE compiling the SDK #507

jvasileff opened this issue Mar 5, 2015 · 5 comments

Comments

@jvasileff
Copy link
Member

In line:

return expr.getTypeArguments() != null && !expr.getTypeArguments().getTypeModels().isEmpty();

Possibly related to changes for ceylon/ceylon-spec#1224

compile-js:
   [delete] Deleting directory /Users/jvasileff/Dropbox/Repos/ceylon/ceylon-sdk/build/source-promise-js
    [mkdir] Created dir: /Users/jvasileff/Dropbox/Repos/ceylon/ceylon-sdk/build/source-promise-js
     [copy] Copying 15 files to /Users/jvasileff/Dropbox/Repos/ceylon/ceylon-sdk/build/source-promise-js/ceylon/promise
[ceylon-compile-js] Error: Errors found. Compilation stopped.
[ceylon-compile-js] Note: Created module ceylon.promise/1.1.1
[ceylon-compile-js] error encountered [GenerateJsVisitor caused an exception visiting InvocationExpression node: java.lang.NullPointerException at com.redhat.ceylon.compiler.js.BmeGenerator.hasTypeParameters(BmeGenerator.java:65)] at 90:28-90:34 of Deferred.ceylon
[ceylon-compile-js] error encountered [GenerateJsVisitor caused an exception visiting InvocationExpression node: java.lang.NullPointerException at com.redhat.ceylon.compiler.js.BmeGenerator.hasTypeParameters(BmeGenerator.java:65)] at 60:26-60:32 of Deferred.ceylon
[ceylon-compile-js] ceylon compile-js: 2 errors.
@lucaswerkmeister
Copy link
Member

At this and this line in Deferred.ceylon.

@lucaswerkmeister
Copy link
Member

Can also reproduced with this code.

@lucaswerkmeister
Copy link
Member

Apparently the bug just occurs any time you call a parameter with functional type. However, if the parameter is declared as Result on(T val) instead of Result(T) on (i. e., an actual functional parameter), it works.

@lucaswerkmeister
Copy link
Member

Correction: doesn’t need to be a parameter. As far as I can tell, no expression of callable type can be called at all.

@chochos
Copy link
Member

chochos commented Mar 5, 2015

this has been fixed but I didn't notice the issue until now.

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