Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: pkg/compiler/lib/src/diagnostics/messages.dart

Issue 2567943003: Remove support for mixin typedefs in dart2js. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « CHANGELOG.md ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * The messages in this file should meet the following guide lines: 6 * The messages in this file should meet the following guide lines:
7 * 7 *
8 * 1. The message should be a complete sentence starting with an uppercase 8 * 1. The message should be a complete sentence starting with an uppercase
9 * letter, and ending with a period. 9 * letter, and ending with a period.
10 * 10 *
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 CYCLIC_TYPEDEF, 155 CYCLIC_TYPEDEF,
156 CYCLIC_TYPEDEF_ONE, 156 CYCLIC_TYPEDEF_ONE,
157 DART_EXT_NOT_SUPPORTED, 157 DART_EXT_NOT_SUPPORTED,
158 DEFERRED_COMPILE_TIME_CONSTANT, 158 DEFERRED_COMPILE_TIME_CONSTANT,
159 DEFERRED_COMPILE_TIME_CONSTANT_CONSTRUCTION, 159 DEFERRED_COMPILE_TIME_CONSTANT_CONSTRUCTION,
160 DEFERRED_LIBRARY_DART_2_DART, 160 DEFERRED_LIBRARY_DART_2_DART,
161 DEFERRED_LIBRARY_DUPLICATE_PREFIX, 161 DEFERRED_LIBRARY_DUPLICATE_PREFIX,
162 DEFERRED_LIBRARY_WITHOUT_PREFIX, 162 DEFERRED_LIBRARY_WITHOUT_PREFIX,
163 DEFERRED_OLD_SYNTAX, 163 DEFERRED_OLD_SYNTAX,
164 DEFERRED_TYPE_ANNOTATION, 164 DEFERRED_TYPE_ANNOTATION,
165 DEPRECATED_TYPEDEF_MIXIN_SYNTAX,
166 DIRECTLY_THROWING_NSM, 165 DIRECTLY_THROWING_NSM,
167 DISALLOWED_LIBRARY_IMPORT, 166 DISALLOWED_LIBRARY_IMPORT,
168 DUPLICATE_DEFINITION, 167 DUPLICATE_DEFINITION,
169 DUPLICATE_EXPORT, 168 DUPLICATE_EXPORT,
170 DUPLICATE_EXPORT_CONT, 169 DUPLICATE_EXPORT_CONT,
171 DUPLICATE_EXPORT_DECL, 170 DUPLICATE_EXPORT_DECL,
172 DUPLICATE_EXTENDS_IMPLEMENTS, 171 DUPLICATE_EXTENDS_IMPLEMENTS,
173 DUPLICATE_IMPLEMENTS, 172 DUPLICATE_IMPLEMENTS,
174 DUPLICATE_IMPORT, 173 DUPLICATE_IMPORT,
175 DUPLICATE_INITIALIZER, 174 DUPLICATE_INITIALIZER,
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 MessageKind.CANNOT_MIXIN: const MessageTemplate( 1625 MessageKind.CANNOT_MIXIN: const MessageTemplate(
1627 MessageKind.CANNOT_MIXIN, "The type '#{type}' can't be mixed in.", 1626 MessageKind.CANNOT_MIXIN, "The type '#{type}' can't be mixed in.",
1628 howToFix: "Try removing '#{type}' from the 'with' clause.", 1627 howToFix: "Try removing '#{type}' from the 'with' clause.",
1629 examples: const [ 1628 examples: const [
1630 """ 1629 """
1631 class C extends Object with String {} 1630 class C extends Object with String {}
1632 1631
1633 main() => new C(); 1632 main() => new C();
1634 """, 1633 """,
1635 """ 1634 """
1636 typedef C = Object with String; 1635 class C = Object with String;
1637 1636
1638 main() => new C(); 1637 main() => new C();
1639 """ 1638 """
1640 ]), 1639 ]),
1641 1640
1642 MessageKind.CANNOT_EXTEND_ENUM: const MessageTemplate( 1641 MessageKind.CANNOT_EXTEND_ENUM: const MessageTemplate(
1643 MessageKind.CANNOT_EXTEND_ENUM, 1642 MessageKind.CANNOT_EXTEND_ENUM,
1644 "Class '#{className}' can't extend the type '#{enumType}' because " 1643 "Class '#{className}' can't extend the type '#{enumType}' because "
1645 "it is declared by an enum.", 1644 "it is declared by an enum.",
1646 howToFix: "Try making '#{enumType}' a normal class or removing the " 1645 howToFix: "Try making '#{enumType}' a normal class or removing the "
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 "'!==' is not an operator. " 2473 "'!==' is not an operator. "
2475 "Did you mean '#{lhs} != #{rhs}' or '!identical(#{lhs}, #{rhs})'?"), 2474 "Did you mean '#{lhs} != #{rhs}' or '!identical(#{lhs}, #{rhs})'?"),
2476 2475
2477 MessageKind.UNSUPPORTED_PREFIX_PLUS: const MessageTemplate( 2476 MessageKind.UNSUPPORTED_PREFIX_PLUS: const MessageTemplate(
2478 MessageKind.UNSUPPORTED_PREFIX_PLUS, "'+' is not a prefix operator. ", 2477 MessageKind.UNSUPPORTED_PREFIX_PLUS, "'+' is not a prefix operator. ",
2479 howToFix: "Try removing '+'.", 2478 howToFix: "Try removing '+'.",
2480 examples: const [ 2479 examples: const [
2481 "main() => +2; // No longer a valid way to write '2'" 2480 "main() => +2; // No longer a valid way to write '2'"
2482 ]), 2481 ]),
2483 2482
2484 MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX: const MessageTemplate(
2485 MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX,
2486 "'typedef' not allowed here. ",
2487 howToFix: "Try replacing 'typedef' with 'class'.",
2488 examples: const [
2489 """
2490 class B { }
2491 class M1 { }
2492 typedef C = B with M1; // Need to replace 'typedef' with 'class'.
2493 main() { new C(); }
2494 """
2495 ]),
2496
2497 MessageKind.MIRRORS_EXPECTED_STRING: const MessageTemplate( 2483 MessageKind.MIRRORS_EXPECTED_STRING: const MessageTemplate(
2498 MessageKind.MIRRORS_EXPECTED_STRING, 2484 MessageKind.MIRRORS_EXPECTED_STRING,
2499 "Can't use '#{name}' here because it's an instance of '#{type}' " 2485 "Can't use '#{name}' here because it's an instance of '#{type}' "
2500 "and a 'String' value is expected.", 2486 "and a 'String' value is expected.",
2501 howToFix: "Did you forget to add quotes?", 2487 howToFix: "Did you forget to add quotes?",
2502 examples: const [ 2488 examples: const [
2503 """ 2489 """
2504 // 'Foo' is a type literal, not a string. 2490 // 'Foo' is a type literal, not a string.
2505 @MirrorsUsed(symbols: const [Foo]) 2491 @MirrorsUsed(symbols: const [Foo])
2506 import 'dart:mirrors'; 2492 import 'dart:mirrors';
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
3835 static String convertToString(value) { 3821 static String convertToString(value) {
3836 if (value is ErrorToken) { 3822 if (value is ErrorToken) {
3837 // Shouldn't happen. 3823 // Shouldn't happen.
3838 return value.assertionMessage; 3824 return value.assertionMessage;
3839 } else if (value is Token) { 3825 } else if (value is Token) {
3840 value = value.value; 3826 value = value.value;
3841 } 3827 }
3842 return '$value'; 3828 return '$value';
3843 } 3829 }
3844 } 3830 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | pkg/compiler/lib/src/parser/element_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698