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

Free type variable #1271

Open
lars-reimann opened this issue Nov 24, 2024 · 0 comments
Open

Free type variable #1271

lars-reimann opened this issue Nov 24, 2024 · 0 comments

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Nov 24, 2024

Related to #1135

Is your feature request related to a problem?

The following code currently produces an error Expected type 'Map<String, Int>' but got 'Map<Nothing, Nothing>':

package test

@Pure fun f(a: Map<String, Int>)

pipeline myPipeline {
    f({});
}

The issue here is that the type parameter K of Map is invariant. We currently have no way to indicate that K is completely free in {}

Desired solution

Add a new type (free type/unbound type/star type) that can only be computed, but not written directly in programs. It should be compatible to any type.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant