summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorJasper Jenkins <jasper.vs.jenkins@gmail.com>2019-05-04 14:28:09 -0700
committerAndreas Rumpf <rumpf_a@web.de>2019-05-04 23:28:09 +0200
commit6e4ea40475095a74c40f94b0d01e4d878661720f (patch)
tree508894c455e66b67cc60151a34898381ed0362b5 /compiler
parentce152ed91f85c45909e0f76854fcc28d3c6a550d (diff)
downloadNim-6e4ea40475095a74c40f94b0d01e4d878661720f.tar.gz
empty container param error msg (#11158)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semtypes.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index bd64af729..99fd62550 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -1133,6 +1133,9 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
 
       if typ == nil:
         typ = def.typ
+        if isEmptyContainer(typ):
+          localError(c.config, a.info, "cannot infer the type of parameter '" & a[0].ident.s & "'")
+
         if typ.kind == tyTypeDesc:
           # consider a proc such as:
           # proc takesType(T = int)