| Index: tests/language/const_global_test.dart
|
| diff --git a/tests/language/constructor_default_test.dart b/tests/language/const_global_test.dart
|
| similarity index 64%
|
| copy from tests/language/constructor_default_test.dart
|
| copy to tests/language/const_global_test.dart
|
| index a8fc22ea3bb7195d3a6e81a57645ea699b0fbcdd..20d8a58340f566528b3046da2e893dab4a541e69 100644
|
| --- a/tests/language/constructor_default_test.dart
|
| +++ b/tests/language/const_global_test.dart
|
| @@ -1,20 +1,18 @@
|
| // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
| -// Dart test program for default constructors.
|
|
|
| import "package:expect/expect.dart";
|
|
|
| -class A {
|
| - A() : a = 499;
|
| -
|
| - var a;
|
| -}
|
| +const a = 1;
|
|
|
| -class B extends A {
|
| - B() { Expect.equals(499, a); }
|
| +main() {
|
| + Expect.equals(1, a);
|
| + Expect.equals(1, const A(a).a);
|
| + Expect.equals(1, const [const A(a)][0].a);
|
| }
|
|
|
| -main() {
|
| - new B();
|
| +class A {
|
| + final a;
|
| + const A(this.a);
|
| }
|
|
|