mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
committed by
narimiran
parent
2ed16bf2d4
commit
4886534ed3
@@ -1711,7 +1711,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
|
||||
if tfExplicitCallConv in target.flags and
|
||||
target.callConv != effectiveArgType.callConv:
|
||||
return isNone
|
||||
put(c, f, a)
|
||||
if doBind: put(c, f, a)
|
||||
return isGeneric
|
||||
else:
|
||||
return isNone
|
||||
|
||||
6
tests/lookups/issue_23172/m23172.nim
Normal file
6
tests/lookups/issue_23172/m23172.nim
Normal file
@@ -0,0 +1,6 @@
|
||||
type
|
||||
Foo* = object
|
||||
Bar* = object
|
||||
|
||||
func `$`*(x: Foo | Bar): string =
|
||||
"X"
|
||||
9
tests/lookups/t23172.nim
Normal file
9
tests/lookups/t23172.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
import issue_23172/m23172
|
||||
|
||||
type FooX = distinct Foo
|
||||
|
||||
func `$`*(x: FooX): string =
|
||||
$m23172.Foo(x)
|
||||
|
||||
var a: FooX
|
||||
doAssert $a == "X"
|
||||
Reference in New Issue
Block a user