-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
This issue was originally filed by ms...@unipro.ru
When getter or setter(implicit or explicit) and a method with the same name are divided into different classes(interfaces), dartc does not produce a compile-time error.
Dartc(r2810) executes this code without errors:
Test 1:
class A {
foo(){throw new A();}
}
class C extends A {
get foo() { return "foo()"; }
}
main() {
new C().foo();
}
Test 2:
class A {
var foo;
}
class C extends A {
foo() { return "foo()"; }
}
main() {
new C().foo();
}
Test 3:
class A {
void set foo(var x){}
}
class C extends A {
foo(value) {}
}
main() {
new C().foo(1);
}
Test 4:
interface S {
void m();
}
interface I extends S {
int m;
}
class A implements I {}
main() {
new A();
}
Test 5:
interface S {
int m;
}
interface J extends S {
int m();
}
class A implements J {}
main() {
new A();
}