Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support generic package #1601

Open
ahuigo opened this issue Dec 21, 2023 · 0 comments
Open

Feature request: support generic package #1601

ahuigo opened this issue Dec 21, 2023 · 0 comments

Comments

@ahuigo
Copy link

ahuigo commented Dec 21, 2023

Proposal

Support generic package.
Is it possible?

Background

It would be nice to use this famous generic package "github.com/samber/lo"

Workarounds

I find that yaegi doesn't support generic package.
The following code shows an error: reflect lo.Assign failed: cannot infer K

$ ./bin/extract github.com/samber/lo
$ cat go1_21_github.com_samber_lo.go
package pkg

import (
	"github.com/samber/lo"
	"reflect"
)

func init() {
	Symbols["github.com/samber/lo/lo"] = map[string]reflect.Value{
		"Assign": reflect.ValueOf(lo.Assign),
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant