Closed
Description
A common case we see is this:
// main.dart
import 'package:app/bar.dart';
class A { }
void main() {
assert(new A().runtypeType == test().runtimeType); // fails
}
// bar.dart
import 'package:app/main.dart';
A test() {
return new A();
}
This fails because the import in bar.dart
resolves to a different path than what we first run, so there's two copies of main.dart
floating around. It results in extremely confused developers.
See e.g. flutter/flutter#17575.