Files
kotlin/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m1/m1.kt
Pavel V. Talanov 6424b6760f Remove StorageComponentContainerContributor::onContainerComposed
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
2017-08-18 19:11:25 +03:00

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
}
}