diff options
author | Jason Beetham <beefers331@gmail.com> | 2022-01-15 01:24:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-15 09:24:23 +0100 |
commit | 7bdfeb78190ca9ff6a0cf702c6ec202f379bff2f (patch) | |
tree | d5a68938e8277fe36a1963aa787f767df3a8cbaf /compiler | |
parent | a93f6e7acc9e02deb40a864d345e4c715346a98c (diff) | |
download | Nim-7bdfeb78190ca9ff6a0cf702c6ec202f379bff2f.tar.gz |
Fixed concept constraints for static types (#19391)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 4d8e03fe9..e1195d04a 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1634,6 +1634,15 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, bindConcreteTypeToUserTypeClass(matched, a) if doBind: put(c, f, matched) result = isGeneric + elif a.len > 0 and a.lastSon == f: + # Needed for checking `Y` == `Addable` in the following + #[ + type + Addable = concept a, type A + a + a is A + MyType[T: Addable; Y: static T] = object + ]# + result = isGeneric else: result = isNone |