| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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 // Ensure that the inferrer looks at default values for parameters in | 5 // Ensure that the inferrer looks at default values for parameters in |
| 6 // synthetic constructors using the correct context. If the constructor call | 6 // synthetic constructors using the correct context. If the constructor call |
| 7 // to D without optional parameters is inferred using D's context, the default | 7 // to D without optional parameters is inferred using D's context, the default |
| 8 // value `_SECRET` will not be visible and compilation will fail. | 8 // value `_SECRET` will not be visible and compilation will fail. |
| 9 | 9 |
| 10 import 'package:async_helper/async_helper.dart'; | 10 import 'package:async_helper/async_helper.dart'; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 C.a(int x, [var b = const _SECRET()]) : this.x = x, this.y = b; | 36 C.a(int x, [var b = const _SECRET()]) : this.x = x, this.y = b; |
| 37 C.b(int x, {var b : const _SECRET()}) : this.x = x, this.y = b; | 37 C.b(int x, {var b : const _SECRET()}) : this.x = x, this.y = b; |
| 38 String toString() => "C($x,$y)"; | 38 String toString() => "C($x,$y)"; |
| 39 } | 39 } |
| 40 """ | 40 """ |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 main() { | 43 main() { |
| 44 asyncTest(() => runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES)); | 44 asyncTest(() => runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES)); |
| 45 } | 45 } |
| 46 | |
| OLD | NEW |