4b860db14b
A single suite of test files is now shared among these configurations, each with their own expected outputs: - spec mode - strong mode - spec mode w/ type propagation Although some tests are going to focus on a specific configuration, for now it seems easier to maintain a single set of tests. No additional tests have been added in this CL, but the intention is to start adding more tests. The baseline tests no longer contain any checked-in dill files. To simplify dependencies, these tests do not rely on a patched SDK, which means the async transformer cannot currently be tested with this framework. BUG= R=kmillikin@google.com Review URL: https://chromereviews.googleplex.com/507347013 .
27 lines
610 B
Dart
27 lines
610 B
Dart
class A {}
|
|
class B {}
|
|
|
|
class AB1 extends A implements B {}
|
|
class AB2 extends A implements B {}
|
|
|
|
class BA1 extends B implements A {}
|
|
class BA2 extends B implements A {}
|
|
|
|
takeSubclassOfA(obj) {
|
|
// The analysis should at least infer that 'obj' is a subclass of A,
|
|
// When the upper bound is ambiguous, it should use the common superclass, if
|
|
// there is one besides Object.
|
|
}
|
|
|
|
takeSubclassOfB(obj) {
|
|
// Likewise, the analysis should infer that 'obj' is a subclass of B.
|
|
}
|
|
|
|
main() {
|
|
takeSubclassOfA(new AB1());
|
|
takeSubclassOfA(new AB2());
|
|
|
|
takeSubclassOfB(new BA1());
|
|
takeSubclassOfB(new BA2());
|
|
}
|