Chromium Code Reviews| 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) { |