Try to deal with caching problems.

This commit is contained in:
Juraj Kirchheim
2017-02-18 18:40:48 +01:00
parent 27de7bb3e7
commit 240ace34ec
2 changed files with 13 additions and 3 deletions

View File

@@ -165,7 +165,17 @@ private class Group {
return
switch entries.get(type) {
case null:
make('$name${counter++}');
var ret = null;
while (ret == null) {
try {
Context.getType('$name$counter');
}
catch (e:Dynamic) {
ret = make('$name$counter');
}
counter++;
}
ret;
case v:
try {
Context.getType(v.name);

View File

@@ -168,11 +168,11 @@ class Types {
sub : null,
});
static function resolveDirectType()
static function resolveDirectType()
return
switch reduce(Context.getLocalType()) {
case TInst(_, [TInst(_.get() => { kind: KExpr(e) }, _)]):
types[e.getInt().sure()]();
types[e.getInt().sure()]();//When using compiler server, this call throws on occasion, in which case modifying this file (to update mtime and invalidate the cache) will solve the problem
default:
throw 'assert';
}