KT-12260 ISE while replacing an operator with safe call

#KT-12260 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-05-10 19:21:55 +03:00
parent 6e28c381c4
commit 3f82cc9b39
4 changed files with 35 additions and 7 deletions
@@ -0,0 +1,7 @@
// "Replace with safe (?.) call" "true"
// ERROR: Infix call corresponds to a dot-qualified call 'value?.compareTo(1).compareTo(0)' which is not allowed on a nullable receiver 'value?.compareTo(1)'. Use '?.'-qualified call instead
var foo: Int? = null
set(value) {
if(value <caret>< 1) {
}
}
@@ -0,0 +1,7 @@
// "Replace with safe (?.) call" "true"
// ERROR: Infix call corresponds to a dot-qualified call 'value?.compareTo(1).compareTo(0)' which is not allowed on a nullable receiver 'value?.compareTo(1)'. Use '?.'-qualified call instead
var foo: Int? = null
set(value) {
if(value?.compareTo(1) < 0) {
}
}