mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
make tests green again
This commit is contained in:
@@ -1859,22 +1859,22 @@ proc paramTypesMatchAux(m: var TCandidate, f, a: PType,
|
||||
|
||||
var r = typeRel(m, f, a)
|
||||
|
||||
when false:
|
||||
# This special typing rule for macros and templates is not documented
|
||||
# anywhere and breaks symmetry.
|
||||
if r != isNone and m.calleeSym != nil and
|
||||
m.calleeSym.kind in {skMacro, skTemplate}:
|
||||
# XXX: duplicating this is ugly, but we cannot (!) move this
|
||||
# directly into typeRel using return-like templates
|
||||
incMatches(m, r)
|
||||
if f.kind == tyStmt:
|
||||
return arg
|
||||
elif f.kind == tyTypeDesc:
|
||||
return arg
|
||||
elif f.kind == tyStatic:
|
||||
return arg.typ.n
|
||||
else:
|
||||
return argSemantized # argOrig
|
||||
# This special typing rule for macros and templates is not documented
|
||||
# anywhere and breaks symmetry. It's hard to get rid of though, my
|
||||
# custom seqs example fails to compile without this:
|
||||
if r != isNone and m.calleeSym != nil and
|
||||
m.calleeSym.kind in {skMacro, skTemplate}:
|
||||
# XXX: duplicating this is ugly, but we cannot (!) move this
|
||||
# directly into typeRel using return-like templates
|
||||
incMatches(m, r)
|
||||
if f.kind == tyStmt:
|
||||
return arg
|
||||
elif f.kind == tyTypeDesc:
|
||||
return arg
|
||||
elif f.kind == tyStatic:
|
||||
return arg.typ.n
|
||||
else:
|
||||
return argSemantized # argOrig
|
||||
|
||||
# If r == isBothMetaConvertible then we rerun typeRel.
|
||||
# bothMetaCounter is for safety to avoid any infinite loop,
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
discard """
|
||||
disabled: "true"
|
||||
"""
|
||||
|
||||
# disabled: relied on undocumented overloading rules. Too much work
|
||||
# to make this sane.
|
||||
|
||||
import macros, strUtils
|
||||
|
||||
proc symToIdent(x: NimNode): NimNode =
|
||||
|
||||
Reference in New Issue
Block a user