blob: 9fd1e90b580b0d9b5ff251bed9c3020d5c4517dc [file] [log] [blame]
// Copyright (c) 2018, 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.7
import 'package:expect/expect.dart';
/*spec.class: global#JSArray:deps=[ArrayIterator,List],explicit=[JSArray,JSArray.E,JSArray<ArrayIterator.E>],implicit=[JSArray.E],indirect,needsArgs*/
/*prod.class: global#JSArray:deps=[List],needsArgs*/
@pragma('dart2js:noInline')
/*spec.member: method:implicit=[method.T],indirect,needsArgs*/
/*prod.member: method:needsArgs*/
method<T>() {
return () => <T>[];
}
@pragma('dart2js:noInline')
test(o) => o is List<int>;
main() {
Expect.isTrue(test(method<int>().call()));
Expect.isFalse(test(method<String>().call()));
}