Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt
T
Denis Zharkov b3691b7358 Frontend changes for reified type parameters
Allowing reified only for inline functions and Intrinsics
2014-11-13 20:56:09 +03:00

16 lines
501 B
Kotlin
Vendored
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
class C<<!REIFIED_TYPE_PARAMETER_NO_INLINE!>reified<!> T>
fun <T> id(p: T): T = p
fun <A> main() {
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>C<!>()
val <!UNUSED_VARIABLE!>a<!>: C<A> = <!TYPE_PARAMETER_AS_REIFIED!>C<!>()
<!TYPE_PARAMETER_AS_REIFIED!>C<!><A>()
val <!UNUSED_VARIABLE!>b<!>: C<Int> = C()
C<Int>()
// TODO svtk, uncomment when extensions are called for nested calls!
//val < !UNUSED_VARIABLE!>с< !>: C<A> = id(< !TYPE_PARAMETER_AS_REIFIED!>C< !>())
}