On Mon, Feb 20, 2023 at 10:50 AM 彭锟(vvvvainman) <pk19940...@gmail.com> wrote:
>
> for example, I have file "pkg/A/internal/A.go" that has code like shown below
>
> ```golang
>
> package internal
>
> type AS[T any] struct { }
>
> func (s *AS[T]) helloLink() string {
>
>   return "hello"
>
> }
>
> ```
>
>
> And I have another one file "pkg/B/B.go"
>
> ```golang
> package B
> import ( _ "unsafe" _ "pkg/A/internel" )
> type BS[T any] struct { }
> //go:linkname pkgHello pkg/A/internel.(*AS[T]).helloLink
> func pkgHello[T any](s *BS[T]) string
>
> ```
>
> when I try to run this code, it tells that " parameterized function is 
> missing function body"
>
> I have set asm.s file in package B
> It works without generics declaration
> Ignore import path shown in code, it should be right

This is not supported.  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/CAOyqgcXvv0J9sL_X79TcUmZZ1M-1U%2BikFbAKRRsJWcvwqr0Ciw%40mail.gmail.com.

Reply via email to