K2: implement correct check for ctors mapped from java
so the check is functionally the same as in K1. #KT-57064 fixed #KT-57065 fixed One of the tests introduced here (javaMappedCtors) revealed an additional issue, filed as KT-57368
This commit is contained in:
committed by
Space Team
parent
730502638a
commit
0e77b67170
@@ -0,0 +1,36 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
typealias ABoolean = Boolean
|
||||
typealias AChar = Char
|
||||
typealias AInt = Int
|
||||
typealias ALong = Long
|
||||
typealias AShort = Short
|
||||
typealias AByte = Byte
|
||||
typealias AFloat = Float
|
||||
typealias ADouble = Double
|
||||
|
||||
fun main() {
|
||||
<!INVISIBLE_REFERENCE!>ABoolean<!>(false)
|
||||
Boolean(false)
|
||||
|
||||
<!INVISIBLE_REFERENCE!>AChar<!>('c')
|
||||
<!INVISIBLE_REFERENCE!>Char<!>('c')
|
||||
|
||||
<!INVISIBLE_REFERENCE!>AInt<!>(42)
|
||||
<!INVISIBLE_REFERENCE!>Int<!>(42)
|
||||
|
||||
<!INVISIBLE_REFERENCE!>ALong<!>(42)
|
||||
Long(42)
|
||||
|
||||
<!INVISIBLE_REFERENCE!>AShort<!>(42)
|
||||
Short(42)
|
||||
|
||||
<!INVISIBLE_REFERENCE!>AByte<!>(42)
|
||||
Byte(42)
|
||||
|
||||
<!INVISIBLE_REFERENCE!>AFloat<!>(4.2f)
|
||||
Float(4.2f)
|
||||
|
||||
<!INVISIBLE_REFERENCE!>ADouble<!>(4.2)
|
||||
Double(4.2)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
typealias ABoolean = Boolean
|
||||
typealias AChar = Char
|
||||
typealias AInt = Int
|
||||
typealias ALong = Long
|
||||
typealias AShort = Short
|
||||
typealias AByte = Byte
|
||||
typealias AFloat = Float
|
||||
typealias ADouble = Double
|
||||
|
||||
fun main() {
|
||||
<!INVISIBLE_MEMBER!>ABoolean<!>(<!TOO_MANY_ARGUMENTS!>false<!>)
|
||||
<!INVISIBLE_MEMBER!>Boolean<!>(<!TOO_MANY_ARGUMENTS!>false<!>)
|
||||
|
||||
<!INVISIBLE_MEMBER!>AChar<!>(<!TOO_MANY_ARGUMENTS!>'c'<!>)
|
||||
<!INVISIBLE_MEMBER!>Char<!>(<!TOO_MANY_ARGUMENTS!>'c'<!>)
|
||||
|
||||
<!INVISIBLE_MEMBER!>AInt<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
<!INVISIBLE_MEMBER!>Int<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
|
||||
<!INVISIBLE_MEMBER!>ALong<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
<!INVISIBLE_MEMBER!>Long<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
|
||||
<!INVISIBLE_MEMBER!>AShort<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
<!INVISIBLE_MEMBER!>Short<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
|
||||
<!INVISIBLE_MEMBER!>AByte<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
<!INVISIBLE_MEMBER!>Byte<!>(<!TOO_MANY_ARGUMENTS!>42<!>)
|
||||
|
||||
<!INVISIBLE_MEMBER!>AFloat<!>(<!TOO_MANY_ARGUMENTS!>4.2f<!>)
|
||||
<!INVISIBLE_MEMBER!>Float<!>(<!TOO_MANY_ARGUMENTS!>4.2f<!>)
|
||||
|
||||
<!INVISIBLE_MEMBER!>ADouble<!>(<!TOO_MANY_ARGUMENTS!>4.2<!>)
|
||||
<!INVISIBLE_MEMBER!>Double<!>(<!TOO_MANY_ARGUMENTS!>4.2<!>)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
typealias GlobalUndoLogRef = Long
|
||||
fun GlobalUndoLogRef(p: Long): GlobalUndoLogRef = p
|
||||
|
||||
fun main() {
|
||||
GlobalUndoLogRef(42)
|
||||
}
|
||||
Reference in New Issue
Block a user