| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class Object { | 5 class Object { |
| 6 var x; | 6 var x; |
| 7 int foo() { | 7 int foo() { |
| 8 return 42; | 8 return 42; |
| 9 } | 9 } |
| 10 bar(int x, int y, z) { } | 10 bar(int x, int y, z) { } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 int hest(a) { | 72 int hest(a) { |
| 73 for (var i = 0; i < a.length; i++) { | 73 for (var i = 0; i < a.length; i++) { |
| 74 a.b.c.f().g[i] += foo(i); | 74 a.b.c.f().g[i] += foo(i); |
| 75 int kuk = 42; | 75 int kuk = 42; |
| 76 (kuk); | 76 (kuk); |
| 77 id(x) { return x; } | 77 id(x) { return x; } |
| 78 int id(x) { return x; } | 78 int id(x) { return x; } |
| 79 Box<int, double> id(x) { return x; } | 79 Box<int, double> id(x) { return x; } |
| 80 var f = hest() { }; | 80 var f = () { }; |
| 81 var f = int horse() { }; | |
| 82 var f = Box<int> llama() { }; | |
| 83 var f = Box<int, double> llama() { }; | |
| 84 assert(x == 12); | 81 assert(x == 12); |
| 85 id(void foo(x) {}); | 82 id((x) {}); |
| 86 id(foo(x) {}); | |
| 87 id(Box<int> foo(x) {}); | |
| 88 id(Box<int, double> foo(x) {}); | |
| 89 id(Box<int, double> foo); | |
| 90 a < b; | 83 a < b; |
| 91 int x = a < b; | 84 int x = a < b; |
| 92 id(() {}); | 85 id(() {}); |
| 93 id(void _() {}); | |
| 94 } | 86 } |
| 95 } | 87 } |
| 96 | 88 |
| 97 Baz.superOnly(x, y, z) : super(x, y, z) {} | 89 Baz.superOnly(x, y, z) : super(x, y, z) {} |
| 98 Baz.superAndInit(x, y, z) : super(x, y, z), this.y = 2 {} | 90 Baz.superAndInit(x, y, z) : super(x, y, z), this.y = 2 {} |
| 99 Baz.superAndInits(x, y, z) : super(x, y, z), this.y = 2, this.x = 4 {} | 91 Baz.superAndInits(x, y, z) : super(x, y, z), this.y = 2, this.x = 4 {} |
| 100 | 92 |
| 101 // Try all kinds of formal parameters. | 93 // Try all kinds of formal parameters. |
| 102 void fisk(final a, | 94 void fisk(final a, |
| 103 b, | 95 b, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 117 | 109 |
| 118 // Test bounds on type parameters | 110 // Test bounds on type parameters |
| 119 abstract class Bar<K extends Foo, V> implements Foo { | 111 abstract class Bar<K extends Foo, V> implements Foo { |
| 120 } | 112 } |
| 121 | 113 |
| 122 abstract class Bar<K extends Foo, V extends Foo> implements Foo { | 114 abstract class Bar<K extends Foo, V extends Foo> implements Foo { |
| 123 } | 115 } |
| 124 | 116 |
| 125 abstract class Bar<K, V extends Foo> implements Foo { | 117 abstract class Bar<K, V extends Foo> implements Foo { |
| 126 } | 118 } |
| OLD | NEW |