-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include new concepts in typeclasses, makes containsGenericType work (#…
…24453) 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]: https://github.com/nim-lang/Nim/blob/a2031ec6cfe9475fb38ebc204ebcf8c2b6d02dce/compiler/types.nim#L1507-L1517
- Loading branch information
Showing
3 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
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() |