You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dartc: Default class without constructor does not cause a compile-time error #985
In the section 7.5 the specification says: "If no constructor is specified for a class C, it implicitly has a default constructor C() : super() {}, unless it is class Object."
In the section 8.3: "A constructor kI of I corresponds to a constructor kF of its factory class F if either F does not implement I and kI and kF have the same name, OR ... It is a compile-time error if an interface I declares a constructor kI and there is no constructor kF in the factory class F such that kI corresponds to kF ."
The test is following:
class F {
}
interface I default F {
I();
}
main() {
new I();
}
According to the specification, there is implicit constructor F():super() {} in the class F. But this is not the constructor to which constructor I() corresponds. So, a compile-time error have to occur. But dartc(r2810) does not produce it.
Activity
dgrove commentedon Jan 2, 2012
Added Area-Compiler, Triaged labels.
jtmcdole commentedon Jan 10, 2012
Set owner to @jtmcdole.
Added Accepted label.
jtmcdole commentedon Jan 10, 2012
http://codereview.chromium.org/9168020
jtmcdole commentedon Jan 13, 2012
http://code.google.com/p/dart/source/detail?r=3239
Added Fixed label.
[co19] Roll co19 to 103d027d38472f9871b66fb0c2b01cc91c858c9f
[deps] rev dartdoc, ecosystem, http, leak_tracker, markdown, mockito,…
[deps] rev dartdoc, ecosystem, http, leak_tracker, markdown, mockito,…
[deps] rev ai, http, i18n, sync_http, tools, web