summary refs log tree commit diff stats
path: root/rod/sigmatch.nim
diff options
context:
space:
mode:
Diffstat (limited to 'rod/sigmatch.nim')
-rwxr-xr-xrod/sigmatch.nim7
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