diff options
Diffstat (limited to 'rod/sigmatch.nim')
-rwxr-xr-x | rod/sigmatch.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rod/sigmatch.nim b/rod/sigmatch.nim index 59112a7f4..2192c168a 100755 --- a/rod/sigmatch.nim +++ b/rod/sigmatch.nim @@ -130,8 +130,11 @@ proc concreteType(mapping: TIdTable, t: PType): PType = result = t while true: result = PType(idTableGet(mapping, t)) - if result == nil: InternalError("lookup failed") - if result.kind != tyGenericParam: break + if result == nil: + break # it's ok, no match + # example code that triggers it: + # proc sort[T](cmp: proc(a, b: T): int = cmp) + if result.kind != tyGenericParam: break else: result = t # Note: empty is valid here |