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

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

Issue 12334070: Support runtime check of function types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fix 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 a1d5e0e14d4b89b3698e2d719bcc42efe3f0ffb3..81a51d3fd8507b9f07f0462e222aa9fd0e19a99b 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
@@ -374,6 +374,11 @@ class Send extends Expression {
&& identical(selector.asOperator().source.stringValue, 'as');
}
+ bool get isTypeTest {
+ return isOperator
+ && identical(selector.asOperator().source.stringValue, 'is');
+ }
+
bool get isIsCheck {
return isOperator
&& identical(selector.asOperator().source.stringValue, 'is')

Powered by Google App Engine
This is Rietveld 408576698