Browse Source

minor fix for switch exception position

Nicolas Cannasse 14 years ago
parent
commit
91f0bdaea3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      genneko.ml

+ 1 - 0
genneko.ml

@@ -346,6 +346,7 @@ and gen_expr ctx e =
 	| TCast (e1,Some t) ->
 		gen_expr ctx (Codegen.default_cast ctx.com e1 t e.etype e.epos)
 	| TMatch (e,_,cases,eo) ->
+		let p = pos ctx e.epos in
 		let etmp = (EVars ["@tmp",Some (gen_expr ctx e)],p) in
 		let eindex = field p (ident p "@tmp") "index" in
 		let gen_params params e =