| Index: pkg/compiler/lib/src/warnings.dart
|
| diff --git a/pkg/compiler/lib/src/warnings.dart b/pkg/compiler/lib/src/warnings.dart
|
| index 5c3c1608d5cec5df6006bce67a3cef786941f7e1..1d72b64afcba9839f03dfcd148b2a58da2056bf5 100644
|
| --- a/pkg/compiler/lib/src/warnings.dart
|
| +++ b/pkg/compiler/lib/src/warnings.dart
|
| @@ -797,6 +797,50 @@ typedef C = Object with String;
|
| main() => new C();
|
| """]);
|
|
|
| + static const MessageKind CANNOT_EXTEND_ENUM = const MessageKind(
|
| + "Class '#{className}' can't extend the type '#{enumType}' because "
|
| + "it is declared by an enum.",
|
| + options: const ['--enable-enum'],
|
| + howToFix: "Try making '#{enumType}' a normal class or removing the "
|
| + "'extends' clause.",
|
| + examples: const ["""
|
| +enum Enum {}
|
| +class A extends Enum {}
|
| +main() => new A();"""]);
|
| +
|
| + static const MessageKind CANNOT_IMPLEMENT_ENUM = const MessageKind(
|
| + "Class '#{className}' can't implement the type '#{enumType}' "
|
| + "because it is declared by an enum.",
|
| + options: const ['--enable-enum'],
|
| + howToFix: "Try making '#{enumType}' a normal class or removing the "
|
| + "type from the 'implements' clause.",
|
| + examples: const ["""
|
| +enum Enum {}
|
| +class A implements Enum {}
|
| +main() => new A();"""]);
|
| +
|
| + static const MessageKind CANNOT_MIXIN_ENUM = const MessageKind(
|
| + "Class '#{className}' can't mixin the type '#{enumType}' because it "
|
| + "is declared by an enum.",
|
| + options: const ['--enable-enum'],
|
| + howToFix: "Try making '#{enumType}' a normal class or removing the "
|
| + "type from the 'with' clause.",
|
| + examples: const ["""
|
| +enum Enum {}
|
| +class A extends Object with Enum {}
|
| +main() => new A();"""]);
|
| +
|
| + static const MessageKind CANNOT_INSTANTIATE_ENUM = const MessageKind(
|
| + "Enum type '#{enumName}' cannot be instantiated.",
|
| + options: const ['--enable-enum'],
|
| + howToFix: "Try making '#{enumType}' a normal class or use an enum "
|
| + "constant.",
|
| + examples: const ["""
|
| +enum Enum {}
|
| +main() => new Enum(0, '');""", """
|
| +enum Enum {}
|
| +main() => const Enum(0, '');"""]);
|
| +
|
| static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind(
|
| "'#{type}' can not be both extended and implemented.");
|
|
|
|
|