mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
committed by
Andreas Rumpf
parent
e6cb7e34ef
commit
65ed2d7fe8
@@ -594,7 +594,7 @@ proc explicitGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode =
|
||||
for i in 1..sonsLen(n)-1:
|
||||
let e = semExpr(c, n.sons[i])
|
||||
if e.typ == nil:
|
||||
localError(c.config, e.info, "expression has no type")
|
||||
n.sons[i].typ = errorType(c)
|
||||
else:
|
||||
n.sons[i].typ = e.typ.skipTypes({tyTypeDesc})
|
||||
var s = s
|
||||
|
||||
@@ -2,13 +2,14 @@ discard """
|
||||
cmd: "nim check $file"
|
||||
errormsg: "'t' has unspecified generic parameters"
|
||||
nimout: '''
|
||||
t5167_5.nim(20, 9) Error: 't' has unspecified generic parameters
|
||||
t5167_5.nim(10, 16) Error: expression 'system' has no type (or is ambiguous)
|
||||
t5167_5.nim(21, 9) Error: 't' has unspecified generic parameters
|
||||
'''
|
||||
"""
|
||||
# issue #11942
|
||||
discard newSeq[system]()
|
||||
|
||||
|
||||
|
||||
|
||||
# issue #5167
|
||||
template t[B]() =
|
||||
echo "foo1"
|
||||
|
||||
@@ -22,4 +23,3 @@ bar t
|
||||
|
||||
let y = m
|
||||
bar m
|
||||
|
||||
|
||||
Reference in New Issue
Block a user