summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/semtypes.nim2
-rw-r--r--tests/proc/t8357.nim10
2 files changed, 11 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 0a1e14236..dd1e96bde 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -369,7 +369,7 @@ proc semTypeIdent(c: PContext, n: PNode): PSym =
   if n.kind == nkSym:
     result = getGenSym(c, n.sym)
   else:
-    result = pickSym(c, n, {skType, skGenericParam})
+    result = pickSym(c, n, {skType, skGenericParam, skParam})
     if result.isNil:
       result = qualifiedLookUp(c, n, {checkAmbiguity, checkUndeclared})
     if result != nil:
diff --git a/tests/proc/t8357.nim b/tests/proc/t8357.nim
new file mode 100644
index 000000000..350ebe356
--- /dev/null
+++ b/tests/proc/t8357.nim
@@ -0,0 +1,10 @@
+discard """
+  output: "Hello"
+"""
+
+type
+  T = ref int
+
+let r = new(string)
+r[] = "Hello"
+echo r[]