[FE, Java Resolve] Filter out canonical record constructors
This fixes a false positive overload resolution ambiguity in FIR when invoking a record constructor when it also defines a canonical constructor (compact or explicit). #KT-62151 Fixed
This commit is contained in:
committed by
Space Team
parent
3327bed5bd
commit
2d7cadc0ab
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
// FILE: WithCompactCtor.java
|
||||
public record WithCompactCtor(String s) {
|
||||
public WithCompactCtor {}
|
||||
}
|
||||
|
||||
// FILE: WithExplicitCanonicalCtor.java
|
||||
public record WithExplicitCanonicalCtor(String s) {
|
||||
public WithExplicitCanonicalCtor(String s) {
|
||||
this.s = s;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
fun test() {
|
||||
WithCompactCtor("")
|
||||
WithExplicitCanonicalCtor("")
|
||||
}
|
||||
Reference in New Issue
Block a user