-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Constant constructor in a class with a mixin #18653
Comments
This is related to issue #9745. |
1 similar comment
This is related to issue #9745. |
Actually, if issue #9745 was fixed as requested, the forwarding constructor would be const, and this code would work. |
Added this to the 1.5 milestone. |
https://codereview.chromium.org/272803002 Added Started label. |
$ cat test.dart
class A {
const A();
}
class MyMixin {}
class B extends A with MyMixin {
const B();
}
main() {
var b = const B();
}
$ dartanalyzer test.dart
Analyzing test.dart...
No issues found
$ dart test.dart
'file:///usr/local/google/home/kustermann/appengine/dart-app-engine/datastore-python-compatibility/test.dart': error: line 9 pos 12: implicit call to non-const super constructor
const B();
^
$ dart2js test.dart --out=/tmp/foo.js
test.dart:9:3:
Error: 'const' constructor cannot call a non-const constructor.
const B();
^^^^^^^^^^
Error: Compilation failed.
The text was updated successfully, but these errors were encountered: