[FIR] FirJavaFacade: do not duplicate record constructor

The fresh version of intellij has all record-related declarations,
so an additional fake constructor leads to errors like
KTIJ-25364 (OVERLOAD_RESOLUTION_AMBIGUITY)

^KTIJ-25366 Fixed
^KTIJ-25364 Fixed
^KTIJ-25368 Fixed
^KTIJ-25370 Fixed
This commit is contained in:
Dmitrii Gridin
2023-07-11 17:52:56 +02:00
committed by Space Team
parent 97a12af03e
commit b67b37cdb3
8 changed files with 127 additions and 30 deletions
@@ -0,0 +1,12 @@
// FIR_IDENTICAL
// LANGUAGE: +JvmRecordSupport
// FILE: MyRecord.java
public record MyRecord(String str) {}
// FILE: main.kt
fun foo() {
MyRecord("") // OK
MyRecord<!NO_VALUE_FOR_PARAMETER!>()<!> // error
}
@@ -0,0 +1,16 @@
// FIR_IDENTICAL
// LANGUAGE: +JvmRecordSupport
// FILE: MyRecord.java
public record MyRecord(String string, int number) {
public MyRecord(Long number, String string) {
this(string, 4)
}
}
// FILE: main.kt
fun foo(mr: MyRecord) {
MyRecord("", 1)
MyRecord(4L, "")
}