Conversion from Java on paste: post processing of code really works
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
fun foo(o: Any) {
|
||||
if (o is String) {
|
||||
val l = o.length()
|
||||
}
|
||||
somethingElse()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class C {
|
||||
void foo(Object o) {
|
||||
<selection> if (o instanceof String) {
|
||||
int l = ((String) o).length();
|
||||
}
|
||||
</selection> }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(o: Any) {
|
||||
<caret> somethingElse()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo(o: Any) {
|
||||
if (o !is String) return
|
||||
val l = o.length()
|
||||
somethingElse(o as String/* we should not remove this cast because it's not in pasted range*/)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class C {
|
||||
void foo(Object o) {
|
||||
<selection> if (!(o instanceof String)) return
|
||||
int l = ((String) o).length();
|
||||
</selection> }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(o: Any) {
|
||||
<caret> somethingElse(o as String/* we should not remove this cast because it's not in pasted range*/)
|
||||
}
|
||||
Reference in New Issue
Block a user