// Copyright (c) 2016, 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. import "package:expect/expect.dart"; class C { E e; C(this.e); } C f1(T t) => new C(t); List f2(T t) => [t]; Map f3(T t) => {t: 'hi'}; main() { C c = f1(42); List i = f2("Hello!"); Expect.isTrue(c is C); Expect.isFalse(c is C); Expect.isTrue(i is List); Expect.isFalse(i is List); Expect.equals(c.e, 42); Expect.equals(i[0], "Hello!"); Map m1 = f3(1); Expect.isTrue(m1 is Map); Expect.isFalse(m1 is Map); Expect.isFalse(m1 is Map); Expect.equals('hi', m1[1]); }