Chromium Code Reviews| Index: tests/language/compile_time_constant_arguments_test.dart |
| =================================================================== |
| --- tests/language/compile_time_constant_arguments_test.dart (revision 0) |
| +++ tests/language/compile_time_constant_arguments_test.dart (revision 0) |
| @@ -0,0 +1,13 @@ |
| +// Copyright (c) 2012, 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. |
| + |
| +class A { |
| + const A(a); |
| +} |
| + |
| +main() { |
| + print(const A(1)); |
| + print(const A()); /// 01: compile-time error, static type warning |
| + print(const A(1, 2)); /// 02: compile-time error, static type warning |
|
kasperl
2012/09/17 09:01:45
This should be extended with something that checks
ngeoffray
2012/09/17 09:10:09
Done.
|
| +} |