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

Unified Diff: sdk/lib/_internal/compiler/implementation/tree/nodes.dart

Issue 17262003: Fix type variables in closures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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: sdk/lib/_internal/compiler/implementation/tree/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
index 9a3c43cd1ea3901620f790b941416f36be69ce01..ec30e74bd453f32fc80195ca2a2f65ffebe1c513 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
@@ -369,6 +369,17 @@ class Send extends Expression {
bool get isParameterCheck =>
isOperator && identical(selector.asOperator().source.stringValue, '?');
+ bool get isTypeCast {
+ return isOperator
+ && identical(selector.asOperator().source.stringValue, 'as');
+ }
+
+ bool get isIsCheck {
+ return isOperator
+ && identical(selector.asOperator().source.stringValue, 'is')
+ && arguments.head.asSend() == null;
+ }
+
bool get isIsNotCheck {
return isOperator
&& identical(selector.asOperator().source.stringValue, 'is')
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/builder.dart ('k') | tests/language/type_variable_closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698