Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017, 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 /// Test program that creates an object by invoking a constor without | |
| 6 /// initializers. | |
| 7 main() { | |
| 8 var objA = new A(37, 'test'); | |
| 9 print(objA.a); | |
| 10 print(objA.b); | |
| 11 } | |
| 12 | |
| 13 class A { | |
| 14 int a; | |
| 15 String b; | |
| 16 | |
| 17 A(int a, String b) { | |
| 18 this.a = a; | |
| 19 this.b = b; | |
| 20 } | |
| 21 } | |
| OLD | NEW |