It does! Interestingly it jumps to 24 I’m I embed Places. 

This looks like a compiler bug to me - as the down usages don’t show errors - 
adding a property shouldn’t be required. @Ian?

> On Oct 16, 2024, at 5:57 AM, Marvin Renich <m...@renich.org> wrote:
> 
> * 'Robert Engels' via golang-nuts <golang-nuts@googlegroups.com> [241016 
> 01:19]:
>> Hmm, I thought I had it “working” using this code
>> https://go.dev/play/p/pzKacmi3aPe <https://go.dev/play/p/pzKacmi3aPe>
>> but there is a compiler error, but according to the accepted proposal
>> documentation this should be valid
>> https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#embedded-type-parameter-methods
>> <https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#embedded-type-parameter-methods>
> 
> Does adding a name to the embedded type do what you want, as in
> <https://go.dev/play/p/Jlso9S-LuAo>?  sizeof(Fixed8) is still 8.
> 
> ...Marvin
> 
>> Is this a compiler bug?
>> 
>>>> On Oct 15, 2024, at 9:38 PM, Ian Lance Taylor <i...@golang.org> wrote:
>>> 
>>> On Tue, Oct 15, 2024 at 5:01 PM 'Robert Engels' via golang-nuts
>>> <golang-nuts@googlegroups.com> wrote:
>>>> 
>>>> Is there someway of doing this with Go generics?
>>>> https://github.com/robaho/cpp_fixed/blob/6770b217acd84e4b723449e4c4bb42c92e7f2af1/fixed.h#L18-L23
>>> 
>>> Not at present, sorry.
>>> 
>>> Ian
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/Zw%2BcFj7KNCcFpuFb%40basil.wdw.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/9A9093FD-C989-4859-982C-78D3CF70B042%40ix.netcom.com.

Reply via email to