Don't allow coercing receivers from signed to unsigned constants
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
fun UInt.fUInt() {}
|
||||
fun UByte.fUByte() {}
|
||||
fun UShort.fUShort() {}
|
||||
fun ULong.fULong() {}
|
||||
|
||||
fun test() {
|
||||
1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fUInt<!>()
|
||||
1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fUByte<!>()
|
||||
1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fUShort<!>()
|
||||
1.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fULong<!>()
|
||||
|
||||
3000000000 until <!CONSTANT_EXPECTED_TYPE_MISMATCH!>3000000004UL<!>
|
||||
0 until <!CONSTANT_EXPECTED_TYPE_MISMATCH!>10u<!>
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public fun kotlin.UByte.fUByte(): kotlin.Unit
|
||||
public fun kotlin.UInt.fUInt(): kotlin.Unit
|
||||
public fun kotlin.ULong.fULong(): kotlin.Unit
|
||||
public fun kotlin.UShort.fUShort(): kotlin.Unit
|
||||
Reference in New Issue
Block a user