dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.25k stars 1.58k forks source link

No error in analyzer for super.call #41782

Open sgrekhov opened 4 years ago

sgrekhov commented 4 years ago

According to the https://github.com/dart-lang/language/issues/734#issuecomment-565487654 calling a call method via super call is an error for now. But analyzer still accepts the following code

class A {
  String call() => "A.call!";
}

class B extends A {
  String foo() => super();  // error in CFE, no error in analyzer
}

main() => print(B().foo());

Tested with dartanalyzer version 2.9.0-5.0.dev

srawlins commented 1 year ago

Still no error in analyzer.