mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 14:32:53 +00:00
@@ -2598,9 +2598,10 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
||||
result = semTemplateExpr(c, n, s, flags)
|
||||
of skType:
|
||||
# XXX think about this more (``set`` procs)
|
||||
if n.len == 2:
|
||||
let ambig = contains(c.ambiguousSymbols, s.id)
|
||||
if not (n[0].kind in {nkClosedSymChoice, nkOpenSymChoice, nkIdent} and ambig) and n.len == 2:
|
||||
result = semConv(c, n)
|
||||
elif contains(c.ambiguousSymbols, s.id) and n.len == 1:
|
||||
elif ambig and n.len == 1:
|
||||
errorUseQualifier(c, n.info, s)
|
||||
elif n.len == 1:
|
||||
result = semObjConstr(c, n, flags)
|
||||
|
||||
5
tests/modules/morder_depa.nim
Normal file
5
tests/modules/morder_depa.nim
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
import morder_depb
|
||||
|
||||
proc Foo*(x: int): Foo = discard
|
||||
|
||||
1
tests/modules/morder_depb.nim
Normal file
1
tests/modules/morder_depb.nim
Normal file
@@ -0,0 +1 @@
|
||||
type Foo* = array[2, byte]
|
||||
10
tests/modules/torder_dep.nim
Normal file
10
tests/modules/torder_dep.nim
Normal file
@@ -0,0 +1,10 @@
|
||||
discard """
|
||||
output: '''[0, 0]'''
|
||||
"""
|
||||
|
||||
import morder_depb
|
||||
import morder_depa
|
||||
|
||||
# bug #11187
|
||||
|
||||
echo Foo(3)
|
||||
Reference in New Issue
Block a user