an error I don't understand

2020-06-27 Thread Marcel Timmerman
Hi, I am getting an error and don't know why it happens, it might even be a bug. It is about an assignment to a CStruct variable. The structure is defined like; class cairo_path_data_point_t is repr('CStruct') is export {   has num64 $.x;   has num64 $.y;   submethod TWEAK ( :$native-object

Re: an error I don't understand

2020-06-27 Thread Brad Gilbert
I don't know why you are getting an error. But I think that this is one case where you should be writing `BUILD` instead of `TWEAK`. Note though that you can only have one `BUILD` or `TWEAK` per class. --- Or maybe you want a multi method `new` instead? multi method new ( :$native-object! )

Re: an error I don't understand

2020-06-27 Thread Marcel Timmerman
Hi Brad, I don't know why you are getting an error. But I think that this is one case where you should be writing `BUILD` instead of `TWEAK`. Note though that you can only have one `BUILD` or `TWEAK` per class. A quick test showed to me that it doesn't matter if I use BUILD or TWEAK. Besides