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

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

Issue 2129183002: Support checked mode (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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/compiler/lib/src/js_backend/runtime_types.dart ('k') | pkg/compiler/lib/src/resolution/signatures.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 1824418408bd9ce10d9b94875c2db9656ec95caa..657da3f5ae810e903e9edb32feea7092f240b5e2 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -370,11 +370,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
}
TypeResult visitTypeAnnotation(TypeAnnotation node) {
- DartType type = resolveTypeAnnotation(node);
- if (inCheckContext) {
- registry.registerTypeUse(new TypeUse.checkedModeCheck(type));
- }
- return new TypeResult(type);
+ return new TypeResult(resolveTypeAnnotation(node));
}
bool isNamedConstructor(Send node) => node.receiver != null;
@@ -457,11 +453,9 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
compiler.resolver.constantCompiler.compileConstant(parameter);
});
});
- if (inCheckContext) {
- functionSignature.forEachParameter((ParameterElement element) {
- registry.registerTypeUse(new TypeUse.checkedModeCheck(element.type));
- });
- }
+ functionSignature.forEachParameter((ParameterElement element) {
+ registry.registerTypeUse(new TypeUse.checkedModeCheck(element.type));
+ });
}
ResolutionResult visitAssert(Assert node) {
@@ -4062,9 +4056,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
DartType type = typeResolver.resolveTypeAnnotation(this, node,
malformedIsError: malformedIsError,
deferredIsMalformed: deferredIsMalformed);
- if (inCheckContext) {
- registry.registerTypeUse(new TypeUse.checkedModeCheck(type));
- }
+ registry.registerTypeUse(new TypeUse.checkedModeCheck(type));
return type;
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/runtime_types.dart ('k') | pkg/compiler/lib/src/resolution/signatures.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698