Re: [perl #132222] [BUG] 'HAS' Embedded C-Structs not working as documented

2017-10-05 Thread David Warring via RT
Thanks for that. As a worka-around Rakudo seems to do a better job, if I give it a helping hand viz a TWEAK method: use NativeCall; class Point is repr('CStruct') { has uint8 $.x; has uint8 $.y; } class MyStruct2 is repr('CStruct') { HAS Point $.point; # <-- embedded has int8 $.f

Re: [perl #132222] [BUG] 'HAS' Embedded C-Structs not working as documented

2017-10-05 Thread David Warring
Thanks for that. As a worka-around Rakudo seems to do a better job, if I give it a helping hand viz a TWEAK method: use NativeCall; class Point is repr('CStruct') { has uint8 $.x; has uint8 $.y; } class MyStruct2 is repr('CStruct') { HAS Point $.point; # <-- embedded has int8 $.f

[perl #132222] [BUG] 'HAS' Embedded C-Structs not working as documented

2017-10-05 Thread Brian S. Julin via RT
On Wed, 04 Oct 2017 23:19:19 -0700, david.warring wrote: > From > https://docs.perl6.org/language/nativecall#Embedding_CStructs_and_CUnions > > class Point is repr('CStruct') { > has uint16 $.x; > has uint16 $.y; > } > > class MyStruct2 is repr('CStruct') { > HAS Point $.point; # <--

[perl #132222] [BUG] 'HAS' Embedded C-Structs not working as documented

2017-10-04 Thread via RT
# New Ticket Created by David Warring # Please include the string: [perl #13] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=13 > From https://docs.perl6.org/language/nativecall#Embedding_CStructs_and_CUnions class Po