gop icon indicating copy to clipboard operation
gop copied to clipboard

Classfile support auto-generated clone

Open xushiwei opened this issue 9 months ago • 1 comments

Proposal

Provide builtin clone mechanism to replace reflection

Background

https://github.com/goplus/yap/issues/117

Workarounds

none

xushiwei avatar Mar 14 '25 16:03 xushiwei

auto-generated code includes:

func (this *Foo) Classfname() string {
    return "Foo"
}

func (this *Foo) Classclone() any {
    _gop_ret := *this
    return &_gop_ret
}

xushiwei avatar Mar 14 '25 16:03 xushiwei