Index: pkg/front_end/lib/src/fasta/source/source_loader.dart |
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart |
index 1764e5b2bb3e2c31bac01a94fdfcff617e325faa..b39813601db04c9236375af14aa2663e92c684bc 100644 |
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart |
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart |
@@ -40,7 +40,7 @@ import '../builder/builder.dart' |
import '../compiler_context.dart' show CompilerContext; |
-import '../errors.dart' show inputError; |
+import '../deprecated_problems.dart' show deprecated_inputError; |
import '../export.dart' show Export; |
@@ -81,7 +81,8 @@ class SourceLoader<L> extends Loader<L> { |
{bool suppressLexicalErrors: false}) async { |
Uri uri = library.fileUri; |
if (uri == null || uri.scheme != "file") { |
- return inputError(library.uri, -1, "Not found: ${library.uri}."); |
+ return deprecated_inputError( |
+ library.uri, -1, "Not found: ${library.uri}."); |
} |
// Get the library text from the cache, or read from the file system. |
@@ -94,7 +95,7 @@ class SourceLoader<L> extends Loader<L> { |
bytes = zeroTerminatedBytes; |
sourceBytes[uri] = bytes; |
} on FileSystemException catch (e) { |
- return inputError(uri, -1, e.message); |
+ return deprecated_inputError(uri, -1, e.message); |
} |
} |
@@ -108,7 +109,8 @@ class SourceLoader<L> extends Loader<L> { |
while (token is ErrorToken) { |
if (!suppressLexicalErrors) { |
ErrorToken error = token; |
- library.addCompileTimeError(token.charOffset, error.assertionMessage, |
+ library.deprecated_addCompileTimeError( |
+ token.charOffset, error.assertionMessage, |
fileUri: uri); |
} |
token = token.next; |
@@ -363,7 +365,7 @@ class SourceLoader<L> extends Loader<L> { |
} |
String involvedString = |
involved.map((c) => c.fullNameForErrors).join("', '"); |
- cls.addCompileTimeError( |
+ cls.deprecated_addCompileTimeError( |
cls.charOffset, |
"'${cls.fullNameForErrors}' is a supertype of itself via " |
"'$involvedString'."); |
@@ -383,13 +385,13 @@ class SourceLoader<L> extends Loader<L> { |
target.addDirectSupertype(cls, directSupertypes); |
for (ClassBuilder supertype in directSupertypes) { |
if (supertype is EnumBuilder) { |
- cls.addCompileTimeError( |
+ cls.deprecated_addCompileTimeError( |
cls.charOffset, |
"'${supertype.name}' is an enum and can't be extended or " |
"implemented."); |
} else if (!cls.library.mayImplementRestrictedTypes && |
blackListedClasses.contains(supertype)) { |
- cls.addCompileTimeError( |
+ cls.deprecated_addCompileTimeError( |
cls.charOffset, |
"'${supertype.name}' is restricted and can't be extended or " |
"implemented."); |
@@ -404,11 +406,11 @@ class SourceLoader<L> extends Loader<L> { |
isClassBuilder = true; |
for (Builder constructory in builder.constructors.local.values) { |
if (constructory.isConstructor && !constructory.isSynthetic) { |
- cls.addCompileTimeError( |
+ cls.deprecated_addCompileTimeError( |
cls.charOffset, |
"Can't use '${builder.fullNameForErrors}' as a mixin " |
"because it has constructors."); |
- builder.addCompileTimeError( |
+ builder.deprecated_addCompileTimeError( |
constructory.charOffset, |
"This constructor prevents using " |
"'${builder.fullNameForErrors}' as a mixin."); |
@@ -417,7 +419,7 @@ class SourceLoader<L> extends Loader<L> { |
} |
} |
if (!isClassBuilder) { |
- cls.addCompileTimeError(cls.charOffset, |
+ cls.deprecated_addCompileTimeError(cls.charOffset, |
"The type '${mixedInType.fullNameForErrors}' can't be mixed in."); |
} |
} |
@@ -514,7 +516,7 @@ class SourceLoader<L> extends Loader<L> { |
return target.backendTarget.throwCompileConstantError(coreTypes, error); |
} |
- Expression buildCompileTimeError(String message, int offset) { |
+ Expression deprecated_buildCompileTimeError(String message, int offset) { |
return target.backendTarget |
.buildCompileTimeError(coreTypes, message, offset); |
} |