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

Unified Diff: pkg/compiler/lib/src/resolution/type_resolver.dart

Issue 1438453002: Use Feature directly in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/compiler/lib/src/resolution/resolution.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/type_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/type_resolver.dart b/pkg/compiler/lib/src/resolution/type_resolver.dart
index e9f6dfadcdd52e6d8b6cd834a7ce5c3249a6fb3b..165790d2c8669387db8a84c3e4e0134ff83fe9dd 100644
--- a/pkg/compiler/lib/src/resolution/type_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/type_resolver.dart
@@ -6,6 +6,7 @@ library dart2js.resolution.types;
import '../common.dart';
import '../common/resolution.dart' show
+ Feature,
Resolution;
import '../compiler.dart' show
Compiler;
@@ -136,13 +137,13 @@ class TypeResolver {
reporter.createMessage(node, messageKind, messageArguments),
infos);
} else {
- registry.registerThrowRuntimeError();
+ registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
reporter.reportWarning(
reporter.createMessage(node, messageKind, messageArguments),
infos);
}
if (erroneousElement == null) {
- registry.registerThrowRuntimeError();
+ registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
erroneousElement = new ErroneousElementX(
messageKind, messageArguments, typeName.source,
visitor.enclosingElement);
@@ -226,7 +227,7 @@ class TypeResolver {
if (!outer.isClass &&
!outer.isTypedef &&
!Elements.hasAccessToTypeVariables(visitor.enclosingElement)) {
- registry.registerThrowRuntimeError();
+ registry.registerFeature(Feature.THROW_RUNTIME_ERROR);
type = reportFailureAndCreateType(
MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
{'typeVariableName': node},
@@ -240,7 +241,7 @@ class TypeResolver {
"Unexpected element kind ${element.kind}.");
}
if (addTypeVariableBoundsCheck) {
- registry.registerTypeVariableBoundCheck();
+ registry.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);
visitor.addDeferredAction(
visitor.enclosingElement,
() => checkTypeVariableBounds(node, type));
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698