mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:59:47 +00:00
4bf7972e86
Change-Id: I3b485346ae4c08a3e09ed907a944d98431c4989d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338945 Commit-Queue: Mayank Patke <fishythefish@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com>
38 lines
726 B
Dart
38 lines
726 B
Dart
// Copyright (c) 2023, 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.
|
|
|
|
// @dart=2.19
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
class S<T> {
|
|
s() {
|
|
return T;
|
|
}
|
|
}
|
|
|
|
class M<T> {
|
|
m() {
|
|
return T;
|
|
}
|
|
}
|
|
|
|
class N<T> {
|
|
n() {
|
|
return T;
|
|
}
|
|
}
|
|
|
|
class C<U, V> extends S<Map<U, V>> with M<List<U>>, N<Set<V>> {}
|
|
|
|
main() {
|
|
var c = new C<int, bool>();
|
|
Expect.isTrue(c is S<Map<int, bool>>);
|
|
Expect.equals(Map<int, bool>, c.s());
|
|
Expect.isTrue(c is M<List<int>>);
|
|
Expect.equals(List<int>, c.m());
|
|
Expect.isTrue(c is N<Set<bool>>);
|
|
Expect.equals(Set<bool>, c.n());
|
|
}
|