blob: de04f0ce4a8569697a8a96184edd70f36f346004 [file] [log] [blame]
// Copyright (c) 2021, 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: A:checks=[],instance*/
class A<T> {
instanceMethod() => A<T>;
}
/*class: B:checks=[],instance*/
class B<S, T> {
instanceMethod<U>() => B<T, U>;
}
main() {
var a = new A<int>();
String name1 = '${a.instanceMethod()}';
var b = new B<int, String>();
String name2 = '${b.instanceMethod<bool>()}';
Expect.equals('A<int>', name1);
Expect.equals('B<String, bool>', name2);
}