// TODO(multitest): This was automatically migrated from a multitest and may // contain strange or dead code. // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // Test least upper bound through type checking of conditionals. class A { var a; } class B { var b; } class C extends B { var c; } class D extends B { var d; } class E { T e; E(this.e); } class F extends E { T f; F(T f) : this.f = f, super(f); } void main() { testAB(new A(), new B()); testBC(new C(), new C()); testCD(new C(), new D()); testEE(new F(new C()), new F(new C())); testEF(new F(new C()), new F(new C())); } void testAB(A a, B b) { var c = new C(); } void testBC(B b, C c) { var a = null; (true ? b : a).b = 0; } void testCD(C c, D d) { } void testEE(E e, E f) { // The least upper bound of E and E is E. } void testEF(E e, F f) { // The least upper bound of E and F is E. var r5; }