diagnostics for deprecated syntax of function type parameter list
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//KT-2195 error "Only safe calls are allowed ..." but it is function param (val)
|
||||
package foo
|
||||
|
||||
private fun sendCommand<T>(errorCallback: (()->Unit)? = null) {
|
||||
private fun <T> sendCommand(errorCallback: (()->Unit)? = null) {
|
||||
if (errorCallback != null) {
|
||||
<!DEBUG_INFO_SMARTCAST!>errorCallback<!>()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,13 +1,13 @@
|
||||
// The type checker used to think that T is not null no matter what the upper bound
|
||||
|
||||
fun nullableUpperBound<T, INDIRECT: T>(t: T, ind: INDIRECT) {
|
||||
fun <T, INDIRECT: T> nullableUpperBound(t: T, ind: INDIRECT) {
|
||||
if (t == null) {} // was a warning
|
||||
if (t != null) {} // was a warning
|
||||
if (ind == null) {} // was a warning
|
||||
if (ind != null) {} // was a warning
|
||||
}
|
||||
|
||||
fun notNullUpperBound<T: Any, INDIRECT: T>(t: T, ind: INDIRECT) {
|
||||
fun <T: Any, INDIRECT: T> notNullUpperBound(t: T, ind: INDIRECT) {
|
||||
if (<!SENSELESS_COMPARISON!>t == null<!>) {} // still a warning
|
||||
if (<!SENSELESS_COMPARISON!>t != null<!>) {} // still a warning
|
||||
if (<!SENSELESS_COMPARISON!>ind == null<!>) {} // still a warning
|
||||
|
||||
Reference in New Issue
Block a user