Explorar el Código

fix missing type

Nicolas Cannasse hace 11 años
padre
commit
b76be3762c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      hxsl/Checker.hx

+ 2 - 1
hxsl/Checker.hx

@@ -189,7 +189,7 @@ class Checker {
 	}
 
 	function typeExpr( e : Expr, with : WithType ) : TExpr {
-		var type = null;
+		var type;
 		var ed = switch( e.expr ) {
 		case EConst(c):
 			type = switch( c ) {
@@ -335,6 +335,7 @@ class Checker {
 				tv.type = init.t;
 			}
 			vars.set(tv.name, tv);
+			type = TVoid;
 			TVarDecl(tv, init);
 		case EUnop(op,e1):
 			var e1 = typeExpr(e1, Value);