Change default upper bound of Java type parameters to Any!
#KT-7672 Fixed
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K, V>(p0: kotlin.Int) Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K, V>(p0: kotlin.Int) Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : kotlin.Any!, V : kotlin.Any!>(p0: kotlin.Int) Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : kotlin.Any!, V : kotlin.Any!>(p0: kotlin.Int) Please specify it explicitly.
|
||||
package demo
|
||||
|
||||
import java.util.HashMap
|
||||
|
||||
@@ -1 +1 @@
|
||||
val constrArgTypes = arrayOf<Class<*>>(javaClass<Array<String>>(), javaClass<String>())
|
||||
val constrArgTypes = arrayOf(javaClass<Array<String>>(), javaClass<String>())
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K, V>() Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K, V>() Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : kotlin.Any!, V : kotlin.Any!>() Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : kotlin.Any!, V : kotlin.Any!>() Please specify it explicitly.
|
||||
import java.util.HashMap
|
||||
|
||||
class G<T : String>(t: T)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList<E>() Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList<E : kotlin.Any!>() Please specify it explicitly.
|
||||
package test
|
||||
|
||||
class User {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList<E>() Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList<E : kotlin.Any!>() Please specify it explicitly.
|
||||
package test
|
||||
|
||||
class User {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K, V>() Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter K in constructor HashMap<K : kotlin.Any!, V : kotlin.Any!>() Please specify it explicitly.
|
||||
package demo
|
||||
|
||||
import java.util.HashMap
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList<E>() Please specify it explicitly.
|
||||
// ERROR: Type inference failed: Not enough information to infer parameter E in constructor ArrayList<E : kotlin.Any!>() Please specify it explicitly.
|
||||
package demo
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
Reference in New Issue
Block a user