blob: c47714490b5b5aaebe9f12a34d0330c4a288c390 [file] [log] [blame]
// Copyright (c) 2013, 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.
// Regression test for
import 'package:expect/expect.dart';
class A<T> {}
class B<T> {
var _copy;
B() {
// We used to not register the dependency between List and B.
_copy = new List<A<T>>();
main() {
var a = new B();
Expect.isFalse(a._copy is List<int>);
Expect.isTrue(a._copy is List<A>);
Expect.isFalse(a._copy is List<A<int>>); //# 01: ok
a = new B<String>();
Expect.isFalse(a._copy is List<String>);
Expect.isTrue(a._copy is List<A>);
Expect.isTrue(a._copy is List<A<String>>);
Expect.isTrue(a._copy is List<A<Object>>);
Expect.isFalse(a._copy is List<A<int>>);