Correct diagnostics and quick-fix for T::class with non-reified type parameter #KT-9590 fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
998399bcd8
commit
2b63bcaa19
+4
@@ -0,0 +1,4 @@
|
||||
// "Make 'T' reified and 'dereferenceClass' inline" "true"
|
||||
|
||||
fun <T: Any> dereferenceClass(): Any =
|
||||
T::class<caret>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Make 'T' reified and 'dereferenceClass' inline" "true"
|
||||
|
||||
inline fun <reified T: Any> dereferenceClass(): Any =
|
||||
T::class<caret>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Make 'R' reified and 'flatten' inline" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun <T: Iterable<Array<R>>, R> T.flatten(): Array<R> {
|
||||
return this.flatMap { it.asIterable() }.toTypedArray<caret>()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Make 'R' reified and 'flatten' inline" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline fun <T: Iterable<Array<R>>, reified R> T.flatten(): Array<R> {
|
||||
return this.flatMap { it.asIterable() }.toTypedArray<caret>()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Make 'T' reified and 'flatten' inline" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun <T> Array<Array<T>>.flatten(): Array<T> {
|
||||
return this.flatMap { it.asIterable() }.toTypedArray<caret>()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Make 'T' reified and 'flatten' inline" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline fun <reified T> Array<Array<T>>.flatten(): Array<T> {
|
||||
return this.flatMap { it.asIterable() }.toTypedArray<caret>()
|
||||
}
|
||||
Reference in New Issue
Block a user