mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
This is in reference to a [feature request](https://github.com/nim-lang/Nim/issues/22142) that I posted. I'm making this PR to demonstrate the suggested change and expect that this should be scrutinized --------- Co-authored-by: Bung <crc32@qq.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
13 lines
210 B
Nim
13 lines
210 B
Nim
discard """
|
|
errormsg: "ambiguous call"
|
|
"""
|
|
|
|
type
|
|
A[T] = object
|
|
C = object
|
|
x:int
|
|
proc p[T: A[ptr]](x:ptr[T]):bool = false
|
|
proc p(x: ptr[A[ptr]]):bool = true
|
|
var a: A[ptr[C]]
|
|
doAssert p(a.addr) == true
|