Skip to content

Use generic function instances #2

Description

@Kolterdyx

Related to #1, it is currently not possible to use instances of generic functions:

func GenericToString[T any](v T) string {
	return fmt.Sprint(v)
}

var mod = convgen.Module(
	convgen.ImportFunc(GenericToString[int]),
)

This compiles just fine, but will throw the error:

cannot use GenericToString[int] as function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions