Closed
Description
While working on some Flutter code in Fuchsia I noticed some weird behavior, it took some head scratching to figure out a bug that was caused by it.
If you import the same file using different paths it changes the class/type definition:
import 'package:hello/models.dart' as pkg;
import 'models.dart';
void main() {
pkg.HelloModel a = new pkg.HelloModel();
HelloModel b = new HelloModel();
assert(b is pkg.HelloModel);
assert(a is HelloModel);
}
The asserts above will fail.