mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
@@ -1402,8 +1402,8 @@ proc semGeneric(c: PContext, n: PNode, s: PSym, prev: PType): PType =
|
||||
[s.name.s, s.kind.toHumanStr])
|
||||
return newOrPrevType(tyError, prev, c)
|
||||
|
||||
var t = s.typ
|
||||
if t.kind in {tyCompositeTypeClass, tyAlias} and t.base.kind == tyGenericBody:
|
||||
var t = s.typ.skipTypes({tyAlias})
|
||||
if t.kind == tyCompositeTypeClass and t.base.kind == tyGenericBody:
|
||||
t = t.base
|
||||
|
||||
result = newOrPrevType(tyGenericInvocation, prev, c)
|
||||
|
||||
@@ -849,3 +849,14 @@ discard getBar(fakeReadLine()) # no error
|
||||
discard getBar("hello, world") # no error
|
||||
|
||||
echo intoFoos(fakeReadLine().split(' ')) # no error, works as expected
|
||||
|
||||
|
||||
# bug #14990
|
||||
type
|
||||
Tile3 = Tile2
|
||||
Tile2 = Tile
|
||||
Tile[n] = object
|
||||
a: n
|
||||
|
||||
var a: Tile3[int]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user