Adjust testData to CharSequence.length transformation

This commit is contained in:
Denis Zharkov
2015-10-12 20:29:01 +03:00
committed by Mikhail Glukhikh
parent cb562e7ea5
commit f0e3fd617d
348 changed files with 524 additions and 540 deletions
@@ -5,7 +5,7 @@ public class X {
public fun fn(): Int {
if (y != null)
// With non-default getter smartcast is not possible
return y<!UNSAFE_CALL!>.<!>length()
return y<!UNSAFE_CALL!>.<!>length
else
return 0
}
@@ -5,7 +5,7 @@ public interface A {
public class B(override public val x: Any) : A {
fun foo(): Int {
if (x is String) {
return <!DEBUG_INFO_SMARTCAST!>x<!>.length()
return <!DEBUG_INFO_SMARTCAST!>x<!>.length
} else {
return 0
}
@@ -17,7 +17,7 @@ import a.X
public fun X.gav(): Int {
if (x != null)
// Smart cast is not possible if definition is in another module
return x<!UNSAFE_CALL!>.<!>length()
return x<!UNSAFE_CALL!>.<!>length
else
return 0
}
@@ -29,7 +29,7 @@ package a
public fun X.gav(): Int {
if (x != null)
// Even if it's in the same package
return x<!UNSAFE_CALL!>.<!>length()
return x<!UNSAFE_CALL!>.<!>length
else
return 0
}
@@ -3,7 +3,7 @@ public open class X {
public fun fn(): Int {
if (x != null)
// Smartcast is possible for protected value property in the same class
return <!DEBUG_INFO_SMARTCAST!>x<!>.length()
return <!DEBUG_INFO_SMARTCAST!>x<!>.length
else
return 0
}
@@ -12,6 +12,6 @@ public open class X {
public class Y: X() {
public fun bar(): Int {
// Smartcast is possible even in derived class
return if (x != null) <!DEBUG_INFO_SMARTCAST!>x<!>.length() else 0
return if (x != null) <!DEBUG_INFO_SMARTCAST!>x<!>.length else 0
}
}
@@ -4,7 +4,7 @@ public class X {
if (x != null)
// Smartcast is possible because it's value property with default getter
// used in the same module
return <!DEBUG_INFO_SMARTCAST!>x<!>.length()
return <!DEBUG_INFO_SMARTCAST!>x<!>.length
else
return 0
}
@@ -4,10 +4,10 @@ public class X {
public fun fn(): Int {
if (x != null)
// Smartcast is not possible for variable properties
return x<!UNSAFE_CALL!>.<!>length()
return x<!UNSAFE_CALL!>.<!>length
else if (y != null)
// Even if they are private
return y<!UNSAFE_CALL!>.<!>length()
return y<!UNSAFE_CALL!>.<!>length
else
return 0
}