VM: No compile-time error when a named constructor's id duplicates that of another member #5893
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Milestone
This issue was originally filed by [email protected]
as resolution of issue #3040, spec now says:
A constructor name always begins with the name of its immediately enclosing class or interface, and may optionally be followed by a dot and an identifier id. It is a compile-time error if id is the name of a member declared in the immediately enclosing class.
However, the following co19 test executes without a hitch on VM r13643:
Language/07_Classes/6_Constructors_A01_t01
class C {
var foo;
C.foo();
}
main() {
try {
new C.foo();
} catch (e){}
}
The text was updated successfully, but these errors were encountered: