You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Kotlin DSL project schema accessibility provider maps any type with generics to Any because of type erasure. However it should be possible to recover the generic type information in some cases like for SAM of lambda classes.
Expected Behavior
// in `some` plugin
project.extensions.add("some", { name:String-> name.capitalize() })
// in `some` plugin
project.extensions.add("some", { name:String-> name.capitalize() })
// build.gradle.kts
plugins { `some` }
// casting is required because `some` is typed `Any` because of type erasureval casted = some as (String) ->String
require(casted("foo") =="Foo")
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.
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.
The Kotlin DSL project schema accessibility provider maps any type with generics to
Any
because of type erasure. However it should be possible to recover the generic type information in some cases like for SAM of lambda classes.Expected Behavior
Current Behavior
Context
#10729
The text was updated successfully, but these errors were encountered: