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

Unified Diff: frog/leg/typechecker.dart

Issue 9616058: Implement parsing and resolving of type-variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix merge error. Created 8 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
Index: frog/leg/typechecker.dart
diff --git a/frog/leg/typechecker.dart b/frog/leg/typechecker.dart
index 55049a4686a0cbf590f746b3e884d3bb2e8e52eb..64139880a5950c32a6ee0f4ee2ca4d4dd46dae2e 100644
--- a/frog/leg/typechecker.dart
+++ b/frog/leg/typechecker.dart
@@ -29,6 +29,12 @@ interface Type {
Element get element();
}
+class TypeVariableType {
ahe 2012/03/16 13:37:11 implements Type
karlklose 2012/03/16 14:58:47 Done.
+ final SourceString name;
+ Element element;
+ TypeVariableType(this.name, [this.element]);
ngeoffray 2012/03/15 11:47:40 How about moving these classes in another place? T
karlklose 2012/03/16 14:58:47 I'll do that in another CL.
+}
+
/**
* A statement type tracks whether a statement returns or may return.
*/
@@ -590,6 +596,10 @@ class TypeCheckerVisitor implements Visitor<Type> {
return type;
}
+ visitTypeVariable(TypeVariable node) {
+ return types.dynamicType;
+ }
+
Type visitVariableDefinitions(VariableDefinitions node) {
Type type = analyzeWithDefault(node.type, types.dynamicType);
if (type == types.voidType) {

Powered by Google App Engine
This is Rietveld 408576698