-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression from 2.0 to version-2-2
/devel
in template
overload resolution with generics
#24146
Comments
Caused by #23983 because dotfields use This is the workaround: template g(h: typedesc): untyped = {.error: "2.0 doesn't hit".}
template gMixin(h: untyped): untyped =
mixin g
g(h)
type
S[Y] = array[Y.gMixin, int]
N = object
template g(_: type N): untyped = 1
discard sizeof(S[N]) If So which is more reasonable, using the workaround, or |
"sometimes That said, |
is there a case ever where |
But proc sortHelper[T](....) = ...
proc sort[T](a: var openArray[T]) =
sortHelper(a) # overridable as `a` depends on `T`?!
|
It's the same resolution as generic procs. It has the I don't remember having to use |
Description
Nim Version
Builds:
Does not build:
Current Output
Expected Output
No response
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: