Chromium Code Reviews| 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 foo(a, [b]) { | 5 foo(a, [b]) { |
| 6 } | 6 } |
| 7 | 7 |
| 8 bar(a, {b}) { | |
| 9 } | |
| 10 | |
| 8 class A { | 11 class A { |
| 9 A(a, [b]); | 12 A(); |
| 13 A.test(a, [b]); | |
| 10 } | 14 } |
| 11 | 15 |
| 12 class B { | 16 class B { |
| 13 B() | 17 B() |
| 14 : super(b: 1) /// 01: runtime error | 18 : super.test(b: 1) /// 01: runtime error |
| 19 ; | |
| 20 } | |
| 21 | |
| 22 class C extends A { | |
| 23 C() | |
| 24 : super.test(b: 1) /// 02: runtime error | |
| 25 ; | |
| 26 } | |
| 27 | |
| 28 class D { | |
| 29 D(); | |
| 30 D.test(a, {b}); | |
| 31 } | |
| 32 | |
| 33 class E { | |
| 34 E() | |
| 35 : super.test(b: 1) /// 04: runtime error | |
| 36 ; | |
| 37 } | |
|
kustermann
2013/08/28 08:28:19
Is this "/// 04" (class E) not testing the same th
Søren Gjesse
2013/08/28 08:42:48
True. Removed E.
| |
| 38 | |
| 39 class F extends D { | |
| 40 F() | |
| 41 : super.test(b: 1) /// 05: runtime error | |
| 15 ; | 42 ; |
| 16 } | 43 } |
| 17 | 44 |
| 18 main() { | 45 main() { |
| 19 new B(); /// 01: continued | 46 new A.test(b: 1); /// 00: runtime error |
| 20 foo(b: 1); /// 02: runtime error | 47 new B(); |
| 48 new C(); | |
| 49 new D.test(b: 1); /// 03: runtime error | |
| 50 new E(); | |
| 51 new F(); | |
| 52 foo(b: 1); /// 06: runtime error | |
| 53 bar(b: 1); /// 07: runtime error | |
| 21 } | 54 } |
| OLD | NEW |