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

Unified Diff: pkg/analyzer/lib/src/fasta/element_store.dart

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec Created 3 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/analyzer/lib/src/fasta/mock_element.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/fasta/element_store.dart
diff --git a/pkg/analyzer/lib/src/fasta/element_store.dart b/pkg/analyzer/lib/src/fasta/element_store.dart
index 537bc9011b6183488931b0e92686bee80a56c251..5a37c59d924b313704955cffcf3d1f482beefda2 100644
--- a/pkg/analyzer/lib/src/fasta/element_store.dart
+++ b/pkg/analyzer/lib/src/fasta/element_store.dart
@@ -16,7 +16,8 @@ import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart' as analyzer;
-import 'package:front_end/src/fasta/errors.dart' show internalError;
+import 'package:front_end/src/fasta/deprecated_problems.dart'
+ show deprecated_internalProblem;
import 'package:front_end/src/fasta/kernel/kernel_builder.dart';
@@ -86,14 +87,16 @@ class ElementStoreImplementation implements ElementStore {
if (member is Field) {} else if (member is Procedure) {
buildDillFunctionElement(builder, unit, elements);
} else {
- internalError("Unhandled $name ${member.runtimeType} in $uri");
+ deprecated_internalProblem(
+ "Unhandled $name ${member.runtimeType} in $uri");
}
} else if (builder is KernelProcedureBuilder) {
buildKernelFunctionElement(builder, unit, elements);
} else if (builder is BuiltinTypeBuilder) {
// TODO(ahe): Set up elements for dynamic and void.
} else {
- internalError("Unhandled $name ${builder.runtimeType} in $uri");
+ deprecated_internalProblem(
+ "Unhandled $name ${builder.runtimeType} in $uri");
}
builder = builder.next;
} while (builder != null);
@@ -113,7 +116,7 @@ class ElementStoreImplementation implements ElementStore {
}
Library getLibraryReference(LibraryElement element) {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
Class getClassReference(covariant KernelClassElement cls) => cls.builder.cls;
@@ -122,27 +125,28 @@ class ElementStoreImplementation implements ElementStore {
if (element is KernelFunctionElement) {
return element.procedure;
} else {
- return internalError("getMemberReference(${element.runtimeType})");
+ return deprecated_internalProblem(
+ "getMemberReference(${element.runtimeType})");
}
}
- Class getRootClassReference() => internalError("not supported.");
+ Class getRootClassReference() => deprecated_internalProblem("not supported.");
Constructor getRootClassConstructorReference() {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
Class getCoreClassReference(String className) {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
TypeParameter tryGetClassTypeParameter(TypeParameterElement element) {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
Class getSharedMixinApplicationClass(
Library library, Class supertype, Class mixin) {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
bool get strongMode => false;
@@ -260,9 +264,9 @@ class AnalyzerLocalVariableElemment extends MockElement
get type => null;
- get constantValue => internalError("not supported.");
+ get constantValue => deprecated_internalProblem("not supported.");
- computeConstantValue() => internalError("not supported.");
+ computeConstantValue() => deprecated_internalProblem("not supported.");
}
/// Both an [Element] and [Builder] to using memory to store local elements in
@@ -298,17 +302,17 @@ class KernelFunctionTypeAliasElement extends MockFunctionTypeAliasElement {
@override
analyzer.DartType get returnType {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
@override
analyzer.FunctionType get type {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
@override
List<TypeParameterElement> get typeParameters {
- return internalError("not supported.");
+ return deprecated_internalProblem("not supported.");
}
}
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/analyzer/lib/src/fasta/mock_element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698