-
Notifications
You must be signed in to change notification settings - Fork 1.7k
dart2js: bad codegen for native method with optional parameter #2718
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
Labels
Comments
Changed the title to: "dart2js: bad codegen for native method with optional parameter". |
This comment was originally written by [email protected] CL under review: https://chromiumcodereview.appspot.com/10202018/ Added Started label. |
This comment was originally written by [email protected] Added Fixed label. |
dart-bot
pushed a commit
that referenced
this issue
Nov 6, 2020
New commits: git log --format="%C(auto) %h %s" 900e796a37fd9f68de9dd183cf4798fe5f055eaa..4ca4767a6c00b2dadecdaee9a4866dae40ef25f2 4ca4767a Added a dart pub outdated --transitive option (#2731) 6b145bd6 Deprecate --server argument to `pub publish` and `pub uploader`. (#2697) 7737023a don't warn if previous prerelease was null safe (#2730) 62f92838 Improve outdated --mode=null-safety (#2724) cc589ec3 Change message for no Latest resolution (#2729) 656803e9 Require sdk constraint (#2718) 8309d877 Added test that dev_dependency does not trigger null-safety warnings when publishing (#2727) 332ea049 Remove warning about mixed mode. (#2723) a98a1f23 Simplify null-safety analysis in `pub outdated --mode=null-safety` (#2721) 5fba2015 Outdated null safety implies prereleases (#2722) fb9ec4af Fixed bug in yaml_edit (#2703) Change-Id: I22a084aee06542e04a272269fb0134f0ac62f779 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170690 Commit-Queue: Sigurd Meldgaard <[email protected]> Reviewed-by: Michael Thomsen <[email protected]> Reviewed-by: Jonas Jensen <[email protected]>
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To repro:
./tools/test.py -m release -c dart2js -r drt -v client/dom/IndexedDB3Test
client/dom/IndexedDB3Test and client/dom/IndexedDB4Test fail for the same reason
Diagnosis:
The dart:dom library contains this definition of 'continueFunction'
class _IDBCursorJs extends _DOMTypeJs implements IDBCursor native "*IDBCursor" {
...
void continueFunction([key = null]) native '''
if (key == null) return this'continue';
return this'continue';
''';
}
The test calls cursor.continueFunction()
The call fails with Uncaught TypeError: Object #<IDBCursorWithValue> has no method 'continueFunction'
Looking at the generated code, continueFunction$1 has the correct body, but continueFunction$0 is incorrect.
$.dynamicFunction('continueFunction$1').IDBCursor = function(key) {
if (key == null) return this'continue';
return this'continue';
;
};
$.dynamicFunction('continueFunction$0').IDBCursor = function() {
return this.continueFunction();
};
The text was updated successfully, but these errors were encountered: