Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | |
|
floitsch
2015/03/10 13:55:32
2015
herhut
2015/03/11 14:18:01
Done.
| |
| 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 // This is a regression test for http://dartbug.com/22723. | |
| 6 | |
| 7 import "package:expect/expect.dart"; | |
| 8 | |
| 9 class A { | |
| 10 final x; | |
| 11 | |
| 12 @NoInline | |
| 13 A({this.x: "foo"}) { | |
| 14 Expect.equals(x.toString(), "foo"); | |
| 15 try {} catch (_) {}; // Make sure it really does not get inlined. | |
|
floitsch
2015/03/10 13:55:32
Use annotation instead.
herhut
2015/03/11 14:18:01
Will do once https://chromiumcodereview.appspot.co
| |
| 16 } | |
| 17 } | |
| 18 | |
| 19 class C extends A { | |
| 20 C(foobar) { } | |
| 21 } | |
| 22 | |
| 23 main() { | |
| 24 var c = new C(499); | |
| 25 Expect.equals(c.x.toString(), "foo"); | |
|
floitsch
2015/03/10 13:55:32
expected is first.
herhut
2015/03/11 14:18:01
Done.
| |
| 26 } | |
| 27 | |
| OLD | NEW |