Index: tests/language/getters_setters2_test.dart |
diff --git a/tests/language/getters_setters2_test.dart b/tests/language/getters_setters2_test.dart |
index 469e5b3183e3dab5a7d054a8d999541616a62ac5..7ce79f31a0cf2b0bc537117d94e1a3da9605bb41 100644 |
--- a/tests/language/getters_setters2_test.dart |
+++ b/tests/language/getters_setters2_test.dart |
@@ -7,54 +7,39 @@ import "package:expect/expect.dart"; |
// Tests classes with getters and setters that do not have the same type. |
class A { |
- int a() { |
- return 37; |
- } |
+ int a() { return 37;} |
} |
-class B extends A { |
- int b() { |
- return 38; |
- } |
+class B extends A{ |
+ int b() { return 38; } |
} |
class C {} |
class T1 { |
- A getterField; |
- A get field { |
- return getterField; |
- } |
- |
+ A getterField; |
+ A get field { return getterField; } |
// OK, B is assignable to A |
- void set field(B arg) { |
- getterField = arg; |
- } |
+ void set field(B arg) { getterField = arg; } |
} |
class T2 { |
- A getterField; |
- C setterField; |
- A get field { |
- return getterField; |
- } |
+ A getterField; |
+ C setterField; |
+ A get field { return getterField; } |
// Type C is not assignable to A |
void set field(C arg) { setterField = arg; } //# 01: static type warning |
} |
class T3 { |
- B getterField; |
- B get field { |
- return getterField; |
- } |
- |
+ B getterField; |
+ B get field { return getterField; } |
// OK, A is assignable to B |
- void set field(A arg) { |
- getterField = arg; |
- } |
+ void set field(A arg) { getterField = arg; } |
} |
+ |
main() { |
T1 instance1 = new T1(); |
T2 instance2 = new T2(); //# 01: continued |
@@ -66,7 +51,7 @@ main() { |
B resultB = instance1.field; |
int result; |
- result = instance1.field.a(); |
+ result = instance1.field.a(); |
Expect.equals(37, result); |
// Type 'A' has no method named 'b' |