mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
fixes #24450
The new concepts were previously not included in
[containsGenericType][1] which prevents them from being instantiated.
Here they are included by being added to `tyTypeClasses` though this
doesn't have to be done, they can also be added manually to
`containsGenericTypeIter`, but this might be too specific.
[1]:
a2031ec6cf/compiler/types.nim (L1507-L1517)
18 lines
280 B
Nim
18 lines
280 B
Nim
block: # issue #24450
|
|
type
|
|
B = object
|
|
b: int
|
|
A = object
|
|
x: int
|
|
AConcept = concept
|
|
proc implementation(s: var Self, p1: B)
|
|
|
|
proc implementation(r: var A, p1: B)=
|
|
discard
|
|
|
|
proc accept(r: var AConcept)=
|
|
discard
|
|
|
|
var a = A()
|
|
a.accept()
|