diff --git a/compiler/layeredtable.nim b/compiler/layeredtable.nim index 9acd84ff26aa5..9b2e4502c7265 100644 --- a/compiler/layeredtable.nim +++ b/compiler/layeredtable.nim @@ -24,6 +24,7 @@ proc setToPreviousLayer*(pt: var LayeredIdTable) = pt = y[] proc lookup(typeMap: ref LayeredIdTable, key: ItemId): PType = + result = nil var tm = typeMap while tm != nil: result = getOrDefault(tm.topLayer, key)