summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorcooldome <ariabushenko@gmail.com>2020-09-16 17:25:24 +0100
committerGitHub <noreply@github.com>2020-09-16 17:25:24 +0100
commit341be0b61cc0603dc921c99b891208dcda274c98 (patch)
tree49d50667c74a64d230eda9369fb2b9dcddc2ace2 /compiler
parenta3e9cc52343a54cadc7b77b783e1c8b6ba2b327f (diff)
downloadNim-341be0b61cc0603dc921c99b891208dcda274c98.tar.gz
proc params as syms (#15332)
* proc params are now syms

* Fix typesrenderer

* Add testcase for disrupteks issue

* fix test

* Trigger build

* Trigger build

* Trigger build

Co-authored-by: Clyybber <darkmine956@gmail.com>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semtypes.nim1
-rw-r--r--compiler/typesrenderer.nim2
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 953801431..d85008342 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -1286,6 +1286,7 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
       addParamOrResult(c, arg, kind)
       styleCheckDef(c.config, a[j].info, arg)
       onDef(a[j].info, arg)
+      a[j] = newSymNode(arg)
 
   var r: PType
   if n[0].kind != nkEmpty:
diff --git a/compiler/typesrenderer.nim b/compiler/typesrenderer.nim
index 60f9f6603..050a057f4 100644
--- a/compiler/typesrenderer.nim
+++ b/compiler/typesrenderer.nim
@@ -67,7 +67,7 @@ proc renderType(n: PNode): string =
     let typeStr = renderType(n[typePos])
     result = typeStr
     for i in 1..<typePos:
-      assert n[i].kind == nkIdent
+      assert n[i].kind in {nkSym, nkIdent}
       result.add(',' & typeStr)
   of nkTupleTy:
     result = "tuple["