| Index: tests/language/first_class_types_constants_test.dart
|
| diff --git a/tests/language/first_class_types_constants_test.dart b/tests/language/first_class_types_constants_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6a4c4d4ae12729e82fd1f75d0d67eb3ec1650ef0
|
| --- /dev/null
|
| +++ b/tests/language/first_class_types_constants_test.dart
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2012, 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.
|
| +
|
| +class C<T> {
|
| + final T t;
|
| + const C(this.t);
|
| +}
|
| +
|
| +typedef int Fun(bool, String);
|
| +
|
| +const c0 = C;
|
| +const c1 = const C(C);
|
| +const c2 = Fun;
|
| +const c3 = const C(Fun);
|
| +
|
| +main() {
|
| + Expect.identical(C, C);
|
| + Expect.identical(C, c0);
|
| + Expect.identical(c1, c1);
|
| + Expect.notEquals(c0, c1);
|
| + Expect.notEquals(c1, c2);
|
| + Expect.identical(c1.t, c0);
|
| + Expect.notEquals(C, Fun);
|
| + Expect.identical(Fun, Fun);
|
| + Expect.identical(Fun, c2);
|
| + Expect.identical(c3.t, c2);
|
| +}
|
|
|