Files
Nim/tests/overload/issue22142/tfail_implicit_ambiguous.nim
Ryan McConnell 74fa8ed59a Changing generic weight of tyGenericParam (#22143)
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>
2024-01-05 09:42:21 +01:00

11 lines
208 B
Nim

discard """
errormsg: "ambiguous call"
"""
type
A[T] = object
C = object
proc test[T: A](param: T): bool = false
proc test(param: A): bool = true
doAssert test(A[C]()) == true # previously would pass