-
-
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
Bad codegen for varargs
of polymorphic type
#9845
Comments
LemonBoy
added a commit
to LemonBoy/Nim
that referenced
this issue
Jan 21, 2019
The type matching is done on the `T` of the `varargs[T]` so the conversion must be performed to `T` and not to the whole type. This problem is only noticeable with the cpp backend since C doesn't give a damn shit about your fucking (wrong) types. Fixes nim-lang#9845
narimiran
pushed a commit
that referenced
this issue
Jan 21, 2019
The type matching is done on the `T` of the `varargs[T]` so the conversion must be performed to `T` and not to the whole type. This problem is only noticeable with the cpp backend since C doesn't give a damn shit about your fucking (wrong) types. Fixes #9845
ThomasTJdev
pushed a commit
to ThomasTJdev/Nim
that referenced
this issue
Jan 27, 2019
The type matching is done on the `T` of the `varargs[T]` so the conversion must be performed to `T` and not to the whole type. This problem is only noticeable with the cpp backend since C doesn't give a damn shit about your fucking (wrong) types. Fixes nim-lang#9845
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following generates bad C++ code. The varargs-array seems to get resolved to
Derived
instead ofBase
. Callingtest(x.Base)
works as expected.The text was updated successfully, but these errors were encountered: