[NI] Fix trace manipulations for builder inference and ::-expressions
For a class literal Type::class we are resolving Type as a constructor, getting all diagnostics (about missing arguments, for example) and then just not committing this trace with errors #KT-37626 Fixed
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JS, JS_IR
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
package a.b
|
||||
|
||||
class BatchInfo1(val batchSize: Int)
|
||||
class BatchInfo2<T>(val data: T)
|
||||
|
||||
object Obj
|
||||
|
||||
fun test() {
|
||||
val a: Sequence<String> = sequence {
|
||||
val x = BatchInfo1::class
|
||||
val y = a.b.BatchInfo1::class
|
||||
val z = Obj::class
|
||||
|
||||
val x1 = BatchInfo1::batchSize
|
||||
val y1 = a.b.BatchInfo1::class
|
||||
|
||||
yieldAll(listOf(x, y, z, x1, y1).map { it.toString() })
|
||||
}
|
||||
|
||||
val size = a.toList().size
|
||||
assert(size == 5) { "actual size: $size"}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user