Avoid stringly approach.

This commit is contained in:
Juraj Kirchheim
2016-06-10 08:20:09 +02:00
parent 4207dea754
commit 983ffa16af

View File

@@ -168,12 +168,11 @@ class Types {
sub : null, sub : null,
}); });
static function resolveDirectType() static function resolveDirectType()
return return
switch reduce(Context.getLocalType()) { switch reduce(Context.getLocalType()) {
case TInst(_, [TInst(_.get() => { kind: KExpr(e) }, _)]): case TInst(_, [TInst(_.get() => { kind: KExpr(e) }, _)]):
types.get(Std.parseInt(e.toString()))(); types[e.getInt().sure()]();
default: default:
throw 'assert'; throw 'assert';
} }