| Index: tests/lib/mirrors/generic_bounded_test.dart
|
| diff --git a/tests/lib/mirrors/generic_bounded_test.dart b/tests/lib/mirrors/generic_bounded_test.dart
|
| index 3cfac14d967ac5603326569d513a16617d58e627..dec144aebd5989affc77f45d5ab714c8ce6ef15d 100644
|
| --- a/tests/lib/mirrors/generic_bounded_test.dart
|
| +++ b/tests/lib/mirrors/generic_bounded_test.dart
|
| @@ -16,16 +16,6 @@ class Fixed extends Super<int> {}
|
| class Generic<R> extends Super<R> {} /// 02: static type warning
|
| class Malbounded extends Super<String> {} /// 01: static type warning
|
|
|
| -bool inCheckedMode() {
|
| - try {
|
| - var s = 'string';
|
| - int i = s;
|
| - } catch(e) {
|
| - return true;
|
| - }
|
| - return false;
|
| -}
|
| -
|
| main() {
|
| ClassMirror superDecl = reflectClass(Super);
|
| ClassMirror superOfInt = reflectClass(Fixed).superclass;
|
| @@ -33,21 +23,8 @@ main() {
|
| ClassMirror superOfR = genericDecl.superclass; /// 02: continued
|
| ClassMirror genericOfDouble = reflect(new Generic<double>()).type; /// 02: continued
|
| ClassMirror superOfDouble = genericOfDouble.superclass; /// 02: continued
|
| -
|
| - try {
|
| - ClassMirror genericOfBool = reflect(new Generic<bool>()).type; /// 02: static type warning
|
| - ClassMirror superOfBool = genericOfBool.superclass; /// 02: continued
|
| - Expect.isFalse(genericOfBool.isOriginalDeclaration); /// 02: continued
|
| - Expect.isFalse(superOfBool.isOriginalDeclaration); /// 02: continued
|
| - typeParameters(genericOfBool, [#R]); /// 02: continued
|
| - typeParameters(superOfBool, [#T]); /// 02: continued
|
| - typeArguments(genericOfBool, [reflectClass(bool)]); /// 02: continued
|
| - typeArguments(superOfBool, [reflectClass(bool)]); /// 02: continued
|
| - Expect.isFalse(inCheckedMode()); /// 02: continued
|
| - } on TypeError catch(e) {
|
| - Expect.isTrue(inCheckedMode());
|
| - }
|
| -
|
| + ClassMirror genericOfBool = reflect(new Generic<bool>()).type; /// 02: static type warning, dynamic type error
|
| + ClassMirror superOfBool = genericOfBool.superclass; /// 02: continued
|
| ClassMirror superOfString = reflectClass(Malbounded).superclass; /// 01: continued
|
|
|
| Expect.isTrue(superDecl.isOriginalDeclaration);
|
| @@ -56,7 +33,8 @@ main() {
|
| Expect.isFalse(superOfR.isOriginalDeclaration); /// 02: continued
|
| Expect.isFalse(genericOfDouble.isOriginalDeclaration); /// 02: continued
|
| Expect.isFalse(superOfDouble.isOriginalDeclaration); /// 02: continued
|
| -
|
| + Expect.isFalse(genericOfBool.isOriginalDeclaration); /// 02: continued
|
| + Expect.isFalse(superOfBool.isOriginalDeclaration); /// 02: continued
|
| Expect.isFalse(superOfString.isOriginalDeclaration); /// 01: continued
|
|
|
| TypeVariableMirror tFromSuper = superDecl.typeVariables.single;
|
| @@ -71,6 +49,8 @@ main() {
|
| typeParameters(superOfR, [#T]); /// 02: continued
|
| typeParameters(genericOfDouble, [#R]); /// 02: continued
|
| typeParameters(superOfDouble, [#T]); /// 02: continued
|
| + typeParameters(genericOfBool, [#R]); /// 02: continued
|
| + typeParameters(superOfBool, [#T]); /// 02: continued
|
| typeParameters(superOfString, [#T]); /// 01: continued
|
|
|
| typeArguments(superDecl, []);
|
| @@ -79,5 +59,7 @@ main() {
|
| typeArguments(superOfR, [rFromGeneric]); /// 02: continued
|
| typeArguments(genericOfDouble, [reflectClass(double)]); /// 02: continued
|
| typeArguments(superOfDouble, [reflectClass(double)]); /// 02: continued
|
| + typeArguments(genericOfBool, [reflectClass(bool)]); /// 02: continued
|
| + typeArguments(superOfBool, [reflectClass(bool)]); /// 02: continued
|
| typeArguments(superOfString, [reflectClass(String)]); /// 01: continued
|
| }
|
|
|