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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_types.dart

Issue 12393039: Add type presentation for function types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 9 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 | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/dart_types.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_types.dart b/sdk/lib/_internal/compiler/implementation/dart_types.dart
index ec79917d6858c80dbf36c8320d8d9f55d2e20c33..81539d2400b0df14ec9c0b1390c10c684981df32 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_types.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_types.dart
@@ -102,6 +102,16 @@ abstract class DartType {
DartType asRaw() => this;
+ /**
+ * Is [: true :] if this type is the dynamic type.
+ */
+ bool get isDynamic => false;
+
+ /**
+ * Is [: true :] if this type is the void type.
+ */
+ bool get isVoid => false;
+
accept(DartTypeVisitor visitor, var argument);
}
@@ -239,6 +249,8 @@ class VoidType extends DartType {
return visitor.visitVoidType(this, argument);
}
+ bool get isVoid => true;
+
int get hashCode => 1729;
bool operator ==(other) => other is VoidType;
@@ -737,6 +749,8 @@ class DynamicType extends InterfaceType {
SourceString get name => const SourceString('dynamic');
+ bool get isDynamic => true;
+
accept(DartTypeVisitor visitor, var argument) {
return visitor.visitDynamicType(this, argument);
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698