Chromium Code Reviews| Index: pkg/compiler/lib/src/diagnostics/messages.dart |
| diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart |
| index 31c7070dbead320300f78db035e3b1ec026b1055..ee6857700570084f52a57f7b5382b181af19fbb1 100644 |
| --- a/pkg/compiler/lib/src/diagnostics/messages.dart |
| +++ b/pkg/compiler/lib/src/diagnostics/messages.dart |
| @@ -256,6 +256,8 @@ enum MessageKind { |
| INVALID_CONTINUE, |
| INVALID_FOR_IN, |
| INVALID_INITIALIZER, |
| + INVALID_METADATA, |
| + INVALID_METADATA_GENERIC, |
| INVALID_OVERRIDDEN_FIELD, |
| INVALID_OVERRIDDEN_GETTER, |
| INVALID_OVERRIDDEN_METHOD, |
| @@ -2866,6 +2868,31 @@ main() => new C(); |
| "The getter '#{name}' is implicitly declared by this field " |
| "in class '#{class}'."), |
| + MessageKind.INVALID_METADATA: |
| + const MessageTemplate(MessageKind.INVALID_METADATA, |
| + "A metadata must be either a reference to a compile-time constant " |
|
karlklose
2015/12/09 14:07:29
'A metadata annotation' or 'Metadata'.
Johnni Winther
2015/12/09 14:43:43
Done.
|
| + "variable or a call to a constant constructor.", |
| + howToFix: |
| + "Try using a different constant value or referencing it through a " |
| + "constant variable.", |
| + examples: const [ |
| +'@Object main() {}', |
| +'@print main() {}']), |
| + |
| + MessageKind.INVALID_METADATA_GENERIC: |
| + const MessageTemplate(MessageKind.INVALID_METADATA_GENERIC, |
| + "A metadata call to a constant constructor cannot use type " |
|
karlklose
2015/12/09 14:07:29
'Metadata annotation using a constant ...'
Johnni Winther
2015/12/09 14:43:43
Done.
|
| + "arguments.", |
| + howToFix: |
| + "Try removing the type arguments or referencing the constant " |
| + "through a constant variable.", |
| + examples: const [''' |
| +class C<T> { |
| + const C(); |
| +} |
| +@C<int>() main() {} |
| +''']), |
| + |
| MessageKind.EQUAL_MAP_ENTRY_KEY: |
| const MessageTemplate(MessageKind.EQUAL_MAP_ENTRY_KEY, |
| "An entry with the same key already exists in the map.", |