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 library engine.error; | 5 library engine.error; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'java_core.dart'; | 8 import 'java_core.dart'; |
9 import 'source.dart'; | 9 import 'source.dart'; |
10 import 'scanner.dart' show Token; | 10 import 'scanner.dart' show Token; |
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 * 9.1 Mixin Application: It is a compile-time error if the with clause of a | 1415 * 9.1 Mixin Application: It is a compile-time error if the with clause of a |
1416 * mixin application <i>C</i> includes a deferred type expression. | 1416 * mixin application <i>C</i> includes a deferred type expression. |
1417 * | 1417 * |
1418 * @param typeName the name of the type that cannot be extended | 1418 * @param typeName the name of the type that cannot be extended |
1419 * @see #EXTENDS_DEFERRED_CLASS | 1419 * @see #EXTENDS_DEFERRED_CLASS |
1420 * @see #IMPLEMENTS_DEFERRED_CLASS | 1420 * @see #IMPLEMENTS_DEFERRED_CLASS |
1421 */ | 1421 */ |
1422 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro
rCode('MIXIN_DEFERRED_CLASS', "This class cannot mixin the deferred class '{0}'"
); | 1422 static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErro
rCode('MIXIN_DEFERRED_CLASS', "This class cannot mixin the deferred class '{0}'"
); |
1423 | 1423 |
1424 /** | 1424 /** |
| 1425 * Not yet in the spec, but consistent with VM behavior. It is a |
| 1426 * compile-time error if all of the constructors of a mixin's base class have |
| 1427 * at least one optional parameter (since only constructors that lack |
| 1428 * optional parameters can be forwarded to the mixin). See |
| 1429 * https://code.google.com/p/dart/issues/detail?id=15101#c4 |
| 1430 */ |
| 1431 static const CompileTimeErrorCode MIXIN_HAS_NO_CONSTRUCTORS = |
| 1432 const CompileTimeErrorCode('MIXIN_HAS_NO_CONSTRUCTORS', |
| 1433 "This mixin application is invalid because all of the constructors " |
| 1434 "in the base class '{0}' have optional parameters."); |
| 1435 |
| 1436 /** |
1425 * 9 Mixins: It is a compile-time error if a mixin is derived from a class | 1437 * 9 Mixins: It is a compile-time error if a mixin is derived from a class |
1426 * whose superclass is not Object. | 1438 * whose superclass is not Object. |
1427 * | 1439 * |
1428 * @param typeName the name of the mixin that is invalid | 1440 * @param typeName the name of the mixin that is invalid |
1429 */ | 1441 */ |
1430 static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const Compi
leTimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', "The class '{0}' cannot be use
d as a mixin because it extends a class other than Object"); | 1442 static const CompileTimeErrorCode MIXIN_INHERITS_FROM_NOT_OBJECT = const Compi
leTimeErrorCode('MIXIN_INHERITS_FROM_NOT_OBJECT', "The class '{0}' cannot be use
d as a mixin because it extends a class other than Object"); |
1431 | 1443 |
1432 /** | 1444 /** |
1433 * 12.2 Null: It is a compile-time error for a class to attempt to extend or | 1445 * 12.2 Null: It is a compile-time error for a class to attempt to extend or |
1434 * implement Null. | 1446 * implement Null. |
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4024 * Initialize a newly created error code to have the given [name]. | 4036 * Initialize a newly created error code to have the given [name]. |
4025 */ | 4037 */ |
4026 const TodoCode(String name) : super(name, "{0}"); | 4038 const TodoCode(String name) : super(name, "{0}"); |
4027 | 4039 |
4028 @override | 4040 @override |
4029 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 4041 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
4030 | 4042 |
4031 @override | 4043 @override |
4032 ErrorType get type => ErrorType.TODO; | 4044 ErrorType get type => ErrorType.TODO; |
4033 } | 4045 } |
OLD | NEW |