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

Unified Diff: pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart

Issue 2954693002: Add/fix/cleanup type inference for throw and rethrow. (Closed)
Patch Set: Add a clarifying comment Created 3 years, 6 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
Index: pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart
index 197e16f663861f2dae6a7fea478efedf4bc99d43..2bce413f6258225a0caf4250be8a1e1cf3204da1 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart
@@ -262,6 +262,12 @@ class TypeInferenceListener
void redirectingInitializerExit(RedirectingInitializer initializer) =>
debugInitializerExit("redirectingInitializer", initializer);
+ bool rethrowEnter(Rethrow expression, DartType typeContext) =>
+ debugExpressionEnter('rethrow', expression, typeContext);
+
+ void rethrowExit(Rethrow expression, DartType inferredType) =>
+ debugExpressionExit('rethrow', expression, inferredType);
+
void returnStatementEnter(ReturnStatement statement) =>
debugStatementEnter('returnStatement', statement);
@@ -302,6 +308,12 @@ class TypeInferenceListener
void stringLiteralExit(StringLiteral expression, DartType inferredType) =>
debugExpressionExit("StringLiteral", expression, inferredType);
+ bool throwEnter(Throw expression, DartType typeContext) =>
+ debugExpressionEnter('throw', expression, typeContext);
+
+ void throwExit(Throw expression, DartType inferredType) =>
+ debugExpressionExit('throw', expression, inferredType);
+
bool variableAssignEnter(Expression expression, DartType typeContext) =>
debugExpressionEnter("variableAssign", expression, typeContext);
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart ('k') | pkg/front_end/testcases/inference/infer_rethrow.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698