New J2K: add type star projections for converted classes raw references
#KT-31818 fixed
This commit is contained in:
+2
-2
@@ -22,7 +22,7 @@ class Identifier<T> {
|
||||
object User {
|
||||
fun main() {
|
||||
val i1: Identifier<*> = Identifier<String?>("name", false, true)
|
||||
val i2 = Identifier("name", false)
|
||||
val i3 = Identifier("name")
|
||||
val i2: Identifier<*> = Identifier<String?>("name", false)
|
||||
val i3: Identifier<*> = Identifier<String?>("name")
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
// ERROR: The integer literal does not conform to the expected type CapturedType(*)
|
||||
// ERROR: The integer literal does not conform to the expected type CapturedType(*)
|
||||
// ERROR: Type argument is not within its bounds: should be subtype of 'String?'
|
||||
internal class G<T : String?>(t: T?)
|
||||
class Java {
|
||||
internal fun test() {
|
||||
@@ -9,7 +10,7 @@ class Java {
|
||||
|
||||
internal fun test2() {
|
||||
val m: HashMap<*, *> = HashMap<Any?, Any?>()
|
||||
val g = G("")
|
||||
val g: G<*> = G<Any?>("")
|
||||
val g2 = G("")
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class ClassC<T>{}
|
||||
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
ClassC a;
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class ClassC<T>
|
||||
|
||||
object Test {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
var a: ClassC<*>
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -23,7 +23,7 @@ object User {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
val i1: Identifier<*> = Identifier<String?>("name", false, true)
|
||||
val i2 = Identifier("name", false)
|
||||
val i3 = Identifier("name")
|
||||
val i2: Identifier<*> = Identifier<String?>("name", false)
|
||||
val i3: Identifier<*> = Identifier<String?>("name")
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@ internal class Collection<E>(e: E?) {
|
||||
|
||||
internal class Test {
|
||||
fun main() {
|
||||
val raw1 = Collection(1)
|
||||
val raw2 = Collection(1)
|
||||
val raw3 = Collection("1")
|
||||
val raw1: Collection<*> = Collection<Any?>(1)
|
||||
val raw2: Collection<*> = Collection<Int?>(1)
|
||||
val raw3: Collection<*> = Collection<String?>("1")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user