mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
Rename addDeclarations -> registerModuleComponents
Use it to provide SamWithReceiverResolver extensions instead
Post construction on container composition can be achieved
but manually inserting injections where it seems appropriate
is bug prone
This fixes a bug where SamWithReceiverPlugin extension was not registered
for some containers in IDE which led to incorrect highlighting in IDE
Add IDE test for applying SamWithReceiver plugin
#KT-18062 Fixed
31 lines
587 B
Kotlin
Vendored
31 lines
587 B
Kotlin
Vendored
package m1
|
|
|
|
public fun testUseAsReceiver(api: javaInterface.API) {
|
|
api.useM1A<String> {
|
|
this.length
|
|
}
|
|
api.useM1B<String> {
|
|
<error>this</error>.length
|
|
}
|
|
api.useM2A<String> {
|
|
this.length
|
|
}
|
|
api.useM2B<String> {
|
|
<error>this</error>.length
|
|
}
|
|
}
|
|
|
|
public fun testUseAsParameter(api: javaInterface.API) {
|
|
api.useM1A<String> {
|
|
<error>it</error>.length
|
|
}
|
|
api.useM1B<String> {
|
|
it.length
|
|
}
|
|
api.useM2A<String> {
|
|
<error>it</error>.length
|
|
}
|
|
api.useM2B<String> {
|
|
it.length
|
|
}
|
|
} |