Open PMunch opened 2 years ago
Seems like the same issue, where c struct is treated as nim object in assignment with genericAssign
in system/assign.nim
.
For me it doesn't compile:
stdlib_system.nim.c:6713:51: error: unknown type name 'Vector2'
And it shouldn't block the release of 1.6.4
@Araq, yes that is the issue I posted here. But this is different, I believe if you have the definition as a wrapper for an actual C library it shouldn't trigger that error and this behaviour is still present.
Look, the context here is: 1.6.4 should be out last month. Can we agree the FFI regression in 1.6.2 implies an ASAP 1.6.4 release. We can deal with your issue later, it's nasty and I'm not sure we actually support deepCopy
for importc'ed types. The original design for deepCopy
was never concerned with importc'ed types, not to mention that deepCopy itself is pretty much deprecated at this point -- Orc doesn't require it and it got misused for all sort of things that have nothing to do with thread interop.
Oh for sure, I was just worried this might also be related to the FFI issues
Discovered by user Josef over in the chat. Title says it all pretty much, types which are
importc
doesn't work with deepcopy.Example
Current Output
Expected Output
No error
Version