Closed GWRon closed 3 years ago
SuperStrict
Framework Brl.StandardIO
Function DoIt(s:STest)
AssignMe(Varptr s)
End Function
Function AssignMe(p:Byte Ptr)
Print "OK"
End Function
Struct STest
Field x:Int
End Struct
DoIt(New STest)
results in
Compile Error: Unable to find overload for assignme(STest). Argument #1 is "STest" but declaration is "Byte Ptr"
@HurryStarfish and @woollybah - is this a bug in BCC or something which is "by design" not doable?
Edit: forgot to mention that replacing "struct" with "type" makes it compileable.
Yeah, that would be a bug. I see no reason why it shouldn't work for structs the same way as for primitives.
Think the code says it all already (it was written by our beloved @davecamp
So : why can't we just "VarPtr mystruct" ?