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

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

Issue 2481113003: Handle dart:html in kernel_impact (Closed)
Patch Set: Created 4 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/native/behavior.dart ('k') | pkg/compiler/lib/src/resolution/variables.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 00b3725fa85c71a57e56f54c2441f176cfd19779..f93553d2aea4569e0a59d908dc88458000f1b6d7 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -85,6 +85,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
/// in static contexts, factory methods, and field initializers).
bool inInstanceContext;
bool inCheckContext;
+ bool inCatchParameters = false;
bool inCatchBlock;
ConstantState constantState;
@@ -4703,6 +4704,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
nodeList, MessageKind.OPTIONAL_PARAMETER_IN_CATCH);
} else {
VariableDefinitions declaration = link.head;
+
for (Node modifier in declaration.modifiers.nodes) {
reporter.reportErrorMessage(
modifier, MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH);
@@ -4717,15 +4719,17 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
}
Scope blockScope = new BlockScope(scope);
- TypeResult exceptionTypeResult = visitIn(node.type, blockScope);
+ inCatchParameters = true;
visitIn(node.formals, blockScope);
+ inCatchParameters = false;
var oldInCatchBlock = inCatchBlock;
inCatchBlock = true;
visitIn(node.block, blockScope);
inCatchBlock = oldInCatchBlock;
- if (exceptionTypeResult != null) {
- DartType exceptionType = exceptionTypeResult.type;
+ if (node.type != null) {
+ DartType exceptionType =
+ resolveTypeAnnotation(node.type, registerCheckedModeCheck: false);
if (exceptionDefinition != null) {
Node exceptionVariable = exceptionDefinition.definitions.nodes.head;
VariableElementX exceptionElement =
« no previous file with comments | « pkg/compiler/lib/src/native/behavior.dart ('k') | pkg/compiler/lib/src/resolution/variables.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698