mirror of
https://github.com/dart-lang/sdk
synced 2024-09-22 05:21:18 +00:00
438d13fc9e
Add regression test. Fix wrong test and update status files. Review URL: https://codereview.chromium.org//985203002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44339 260f80e4-7a28-3924-810f-c04153c831b5
31 lines
599 B
Dart
31 lines
599 B
Dart
// Copyright (c) 2015, 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 WrapT<T> {
|
|
Type get type => T;
|
|
}
|
|
|
|
printAndCheck(t) {
|
|
print(t);
|
|
Expect.equals(String, t);
|
|
}
|
|
|
|
class MyClass<T> {
|
|
factory MyClass.works() {
|
|
Type t = new WrapT<T>().type;
|
|
printAndCheck(t);
|
|
}
|
|
|
|
factory MyClass.works2() {
|
|
printAndCheck(T);
|
|
}
|
|
}
|
|
|
|
main() {
|
|
new MyClass<String>.works();
|
|
new MyClass<String>.works2();
|
|
}
|