-
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
Method is not compiled properly by dart2js without the checked option #18717
Comments
The most likely reason is that the type-inference concluded that fullName and projectId must be @stephan: do you recognize this bug? Do you have a good way to figure out what went wrong? cc @herhut-ggl. |
I also think that probably the inference for fullName or projectId is the culprit here. @nik: Can you share the code or at least the portion that shows how fullName and projectId are declared and defined? From the generated JS, it seems that both are fields but neither of them has a setter. |
Nik, do you have any new information? We've gotten another report that might be related to this one (issue #18836). Set owner to @herhut-ggl. |
This may have been fixed in r37254. Is there any way you can try to verify if the problem has gone away, Nik? http://gsdview.appspot.com/dart-archive/channels/be/raw/37255/ Added Started label. |
The possible fix has shipped to the dev channel in version 1.5.0-dev.4.11. Marking this as fixed -- but if you could verify that the problem is gone, Nik, that would be fantastic. Added Fixed label. |
This comment was originally written by ni...@blossom.io Thanks a lot guys. I will try to confirm it in the next couple days. |
The fix is now also available on the stable channel in version 1.4.3. |
This comment was originally written by ni...@blossom.io Looks good. Thank you very much guys. Good job. "+ ApiMessagesGithubRepositoriesSimpleMessage_toJson_closure": 0, |
This issue was originally filed by ni...@blossom.io
If this is too little information please close it. Sadly I don't have reproducible example for you guys. It only happens in our main application.
Dart Editor version 1.3.6.release (STABLE)
Dart SDK version 1.3.6
In our case dart2js didn't compile a class method properly. It only didn't work for two classes, but worked for many other ones which are similar. All these classes are part of one Dart library.
As you can see in the code example the part where fullName and projectId is added to output is missing.
shell command
dart2js --out=dart/application/web/out/index.html_bootstrap.dart.js dart/application/web/out/index.html_bootstrap.dart
dart code
core.Map toJson() {
var output = new core.Map();
if (fullName != null) {
output["fullName"] = fullName;
}
if (projectId != null) {
output["projectId"] = projectId;
}
return output;
}
js code
ApiMessagesGithubRepositoryConnectionCreateMessage: {
"^": "Object;fullName<-,projectId-",
toJson$0: [function() {
var output = P.LinkedHashMap_LinkedHashMap(null, null, null, null, null);
return output;
}, "call$0", "get$toJson", 0, 0, 734, "toJson"],
When I compile it with the option --checked the output is fine and it works.
The text was updated successfully, but these errors were encountered: