Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 class C { | |
| 6 final double d; | |
| 7 const C(this.d); | |
| 8 } | |
| 9 | |
| 10 class D extends C { | |
| 11 const D(var d) : super(d); | |
| 12 } | |
| 13 | |
| 14 const c = const C(0.0); /// 01: ok | |
| 15 const d = const C(0); /// 02: static type warning, checked mode compile-time err or | |
|
kevmoo
2014/04/02 18:07:50
long line
floitsch
2014/04/02 18:14:59
long lines are ok for negative tests. There is no
kevmoo
2014/04/02 18:19:36
...and the PM learns something new. :-)
| |
| 16 const e = const D(0.0); /// 03: ok | |
| 17 const f = const D(0); /// 04: checked mode compile-time error | |
| 18 | |
| 19 main() { | |
| 20 print(c); /// 01: continued | |
| 21 print(d); /// 02: continued | |
| 22 print(e); /// 03: continued | |
| 23 print(f); /// 04: continued | |
| 24 } | |
| OLD | NEW |