Chromium Code Reviews| Index: pkg/compiler/lib/src/warnings.dart |
| diff --git a/pkg/compiler/lib/src/warnings.dart b/pkg/compiler/lib/src/warnings.dart |
| index d7f1403a352bf965a0aee41014a9b19d55382ca2..dee59c6fbadca66a3ca867d78806d5401da1ea2a 100644 |
| --- a/pkg/compiler/lib/src/warnings.dart |
| +++ b/pkg/compiler/lib/src/warnings.dart |
| @@ -481,6 +481,21 @@ main() => new C();"""]); |
| static const MessageKind CONST_CALLS_NON_CONST = const MessageKind( |
| "'const' constructor cannot call a non-const constructor."); |
| + static const MessageKind CONST_CALLS_NON_CONST_FOR_IMPLICIT = |
| + const MessageKind( |
| + "'const' constructor cannot call implicit " |
| + "super non-const constructor.", |
|
Johnni Winther
2015/05/29 08:24:04
The wording makes it sound like the constructor (a
Siggi Cherem (dart-lang)
2015/05/29 16:09:34
Good point. Rephrased.
|
| + howToFix: "Try making the super constructor const", |
|
Johnni Winther
2015/05/29 08:24:04
'const' -> 'const.'
Siggi Cherem (dart-lang)
2015/05/29 16:09:34
Done.
|
| + examples: const [""" |
| +class C { |
| + C(); // missing const |
| +} |
| +class D extends C { |
| + final d; |
| + const D(this.d); |
| +} |
| +main() => new D(0);"""]); |
| + |
| static const MessageKind CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS = |
| const MessageKind( |
| "Can't declare constructor 'const' on class #{className} " |