[tests] Add test data for KT-47982
This commit is contained in:
committed by
Space Team
parent
04b05f7912
commit
83117fa464
+16
@@ -0,0 +1,16 @@
|
||||
FILE: doubleSquareBracketsInBuilderArgument.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/build<CS errors: /build>#|<<ERROR TYPE REF: Cannot infer argument for type parameter PTV>>(<L> = build@fun R|Buildee<ERROR CLASS: Cannot infer argument for type parameter PTV>|.<anonymous>(): R|kotlin/Unit| <inline=NoInline> {
|
||||
ERROR_EXPR(CS errors: kotlin/arrayOf)
|
||||
}
|
||||
)
|
||||
}
|
||||
public final class Buildee<TV> : R|kotlin/Any| {
|
||||
public constructor<TV>(): R|Buildee<TV>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final fun <PTV> build(instructions: R|Buildee<PTV>.() -> kotlin/Unit|): R|Buildee<PTV>| {
|
||||
^build R|/Buildee.Buildee|<R|PTV|>().R|kotlin/apply|<R|Buildee<PTV>|>(R|<local>/instructions|)
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// ISSUE: KT-47982
|
||||
|
||||
fun test() {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!> {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, UNSUPPORTED!>[<!UNSUPPORTED!>[]<!>]<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class Buildee<TV>
|
||||
|
||||
fun <PTV> build(instructions: Buildee<PTV>.() -> Unit): Buildee<PTV> {
|
||||
return Buildee<PTV>().apply(instructions)
|
||||
}
|
||||
Reference in New Issue
Block a user