Do not suggest cast for SIGNED_CONSTANT_CONVERTED_TO_UNSIGNED

Related to KT-27590
This commit is contained in:
Mikhail Glukhikh
2018-12-19 18:47:26 +03:00
parent d7ce79cc76
commit 73b6148407
3 changed files with 20 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
// "Cast expression '1' to 'UInt'" "false"
// WITH_RUNTIME
// ERROR: Conversion of signed constants to unsigned ones is prohibited
// ACTION: Change parameter 'u' type of function 'takeUInt' to 'Int'
// ACTION: Convert property initializer to getter
// ACTION: Do not show hints for current method
// ACTION: Add 'u =' to argument
fun takeUInt(u: UInt) = 0
val b = takeUInt(<caret>1)