Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Use generic function instances #2

Copy link
Copy link

Description

@Kolterdyx
Issue body actions

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
Reactions are currently unavailable

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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.