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

Type information lost on Kotlin DSL accessors to typed Java lambda extensions #10771

Closed
eskatos opened this issue Sep 18, 2019 · 2 comments · Fixed by #25815
Closed

Type information lost on Kotlin DSL accessors to typed Java lambda extensions #10771

eskatos opened this issue Sep 18, 2019 · 2 comments · Fixed by #25815
Assignees
Milestone

Comments

@eskatos
Copy link
Member

eskatos commented Sep 18, 2019

Given a plugin that registers a Java lambda with a TypeOf type token:

TypeOf<Function<String, String>> typeToken = new TypeOf<Function<String, String>>() {}; 
Function<String, String> lambda = s -> s.toUpperCase();
project.getExtensions().add(typeToken, "lambdaExtension", lambda);

Expected Behavior

The Kotlin DSL accessor for lambdaExtension should be typed Function<String, String>.

Current Behavior

The Kotlin DSL accessor for lambdaExtension is typed Object.

Context

Bug report that triggered the investigation: #10729
PR for the above bug that also introduces a test for this issue #10758

@eskatos eskatos changed the title Type information lost on Kotlin accessors to typed java lambda extensions Type information lost on Kotlin DSL accessors to typed java lambda extensions Sep 18, 2019
@eskatos eskatos changed the title Type information lost on Kotlin DSL accessors to typed java lambda extensions Type information lost on Kotlin DSL accessors to typed Java lambda extensions Sep 18, 2019
@stale
Copy link

stale bot commented Oct 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Oct 22, 2020
@stale
Copy link

stale bot commented Nov 12, 2020

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.

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

Successfully merging a pull request may close this issue.

3 participants