Happens on MacOSX / Linux and reproducible in DartPad.
Dart version: Based on Flutter 1.23.0-18.1.pre Dart SDK 2.10.4
Consider the following code:
class MyClass {
void foo() => print('foo');
}
extension Bar on MyClass {
void bar() => print('bar');
}
void main() {
dynamic val = MyClass();
val.foo();
val.bar(); // crashes
}
This compiles fine, but crashes at runtime because the extension method bar() cannot be found. The compiler should either fail with an error, or better still valid code should be generated that invokes the method at runtime.