| Index: tests/corelib/set_test.dart
|
| diff --git a/tests/corelib/set_test.dart b/tests/corelib/set_test.dart
|
| index 3711449d8fb4bbec9d8c153e13e8085986dfe4ca..20a136ad6abc6beae5a11f97c11d8d28219eb35d 100644
|
| --- a/tests/corelib/set_test.dart
|
| +++ b/tests/corelib/set_test.dart
|
| @@ -445,6 +445,17 @@ void testCESetFrom(setFrom) {
|
| Expect.isTrue(set4.isEmpty);
|
| }
|
|
|
| +class A {}
|
| +class B {}
|
| +class C implements A, B {}
|
| +
|
| +void testASetFrom(setFrom) {
|
| + List<B> bList= <B>[new C()];
|
| + // Set.from allows to cast elements.
|
| + Set<A> aSet = setFrom(bList);
|
| + Expect.isTrue(aSet.length == 1);
|
| +}
|
| +
|
| main() {
|
| testMain(() => new HashSet());
|
| testMain(() => new LinkedHashSet());
|
| @@ -508,4 +519,9 @@ main() {
|
| testCESetFrom((x) => new SplayTreeSet<CE>.from(x,
|
| customCompare(20), validKey));
|
| testCESetFrom((x) => new SplayTreeSet<CE>.from(x, identityCompare));
|
| +
|
| + testASetFrom((x) => new Set<A>.from(x));
|
| + testASetFrom((x) => new HashSet<A>.from(x));
|
| + testASetFrom((x) => new LinkedHashSet<A>.from(x));
|
| + testASetFrom((x) => new SplayTreeSet<A>.from(x));
|
| }
|
|
|