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

Unsubstituted type parameters for lambda parameters #1047

Closed
lars-reimann opened this issue Apr 14, 2024 · 1 comment · Fixed by #1050
Closed

Unsubstituted type parameters for lambda parameters #1047

lars-reimann opened this issue Apr 14, 2024 · 1 comment · Fixed by #1050
Assignees
Labels
bug 🪲 Something isn't working released Included in a release
Milestone

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Apr 14, 2024

Describe the bug

Some type parameters do not get properly substituted for lambda parameters.

To Reproduce

pipeline example {
    val column = Column("test", [1, 2, 3]);
    val allMatch = column.all((value) -> value < 2); // wrong error
}

Expected behavior

No error in the above code.

Screenshots (optional)

No response

Additional Context (optional)

It would be helpful if all types remembered the type parameter substitutions applied to them.

@lars-reimann lars-reimann added the bug 🪲 Something isn't working label Apr 14, 2024
@lars-reimann lars-reimann self-assigned this Apr 14, 2024
@lars-reimann lars-reimann added this to the v0.12.0 milestone Apr 14, 2024
@lars-reimann lars-reimann linked a pull request Apr 15, 2024 that will close this issue
lars-reimann added a commit that referenced this issue Apr 15, 2024
Closes #1047

### Summary of Changes

Type of lambda parameters can be inferred from the context. Previously,
however, type parameter types that were contained in the inferred type
were not substituted. Now, they also get inferred from the context.
lars-reimann pushed a commit that referenced this issue Apr 18, 2024
## [0.12.0](v0.11.0...v0.12.0) (2024-04-18)

### Features

* better error if `+` is used for string concatenation ([#1044](#1044)) ([8be49c5](8be49c5))
* collapse class/literal types in inlay hints ([#1053](#1053)) ([7db2820](7db2820)), closes [#1048](#1048)
* **deps:** require latest runner (`v0.11.0`) ([#1058](#1058)) ([7ae1f6b](7ae1f6b))
* don't stop validation at syntax errors ([#1049](#1049)) ([db0c5d7](db0c5d7))
* error if name of static member equals name of inherited member ([#1054](#1054)) ([b8e17af](b8e17af))
* hide classes that are only for typing from auto-completion ([#1056](#1056)) ([50851d7](50851d7)), closes [#1026](#1026)
* ignore parameter names for default values and yields ([#1059](#1059)) ([dde4de0](dde4de0))
* ignore parameter names when type checking arguments ([#1052](#1052)) ([a1e6717](a1e6717)), closes [#1046](#1046)
* installer for the runner ([#1038](#1038)) ([2bde594](2bde594))
* map literals are no longer experimental ([#1039](#1039)) ([1d9af4b](1d9af4b))
* separate VS Code languages for pipeline/stub/tests ([#1043](#1043)) ([8147480](8147480))
* support for examples in documentation comments ([#1045](#1045)) ([3da6d6f](3da6d6f)), closes [#1027](#1027)
* updater for the runner ([#1042](#1042)) ([610d45b](610d45b))

### Bug Fixes

* don't sync `safe-ds.runner.command` setting ([bb57481](bb57481))
* save all files before opening the EDA tool ([d6d0c22](d6d0c22))
* start runner if configuration did not change after installation ([#1040](#1040)) ([b4f015a](b4f015a))
* substitute type parameters for lambda parameters ([#1050](#1050)) ([46145dd](46145dd)), closes [#1047](#1047)
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working released Included in a release
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant