Create From Usage: Fix rendering of nullable types

This commit is contained in:
Alexey Sedunov
2014-10-07 18:28:40 +04:00
parent ff082be524
commit 2b43aad4f9
14 changed files with 144 additions and 5 deletions
@@ -0,0 +1,11 @@
// "Create function 'foo' from usage" "true"
class A<T>(val n: T) {
fun foo(arg: T?): A<Int> {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun test() {
val a: A<Int> = A(true).foo(false as Boolean?)
}
@@ -0,0 +1,11 @@
// "Create function 'foo' from usage" "true"
class A<T>(val n: T) {
fun foo(arg: T): A<T>? {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun test() {
val a: A<Int>? = A(1).foo(2)
}
@@ -0,0 +1,11 @@
// "Create function 'foo' from usage" "true"
class A<T>(val n: T) {
fun foo(arg: T): A<String> {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun test() {
val a: A<String> = A(1 as Int?).foo(2)
}
@@ -0,0 +1,7 @@
// "Create function 'foo' from usage" "true"
class A<T>(val n: T)
fun test() {
val a: A<Int> = A(true).<caret>foo(false as Boolean?)
}
@@ -0,0 +1,7 @@
// "Create function 'foo' from usage" "true"
class A<T>(val n: T)
fun test() {
val a: A<Int>? = A(1).<caret>foo(2)
}
@@ -0,0 +1,7 @@
// "Create function 'foo' from usage" "true"
class A<T>(val n: T)
fun test() {
val a: A<String> = A(1 as Int?).<caret>foo(2)
}