Basic support of partially specified type arguments though a new underscore operator for type arguments

^KT-13394
This commit is contained in:
Victor Petukhov
2021-10-21 14:23:25 +03:00
parent e057831f7f
commit b69fb6779f
35 changed files with 1212 additions and 9 deletions
@@ -13077,6 +13077,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt");
}
@Test
@TestMetadata("illegalUnderscoredTypeArgument.kt")
public void testIllegalUnderscoredTypeArgument() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/illegalUnderscoredTypeArgument.kt");
}
@Test
@TestMetadata("immutableArrayList.kt")
public void testImmutableArrayList() throws Exception {
@@ -13077,6 +13077,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt");
}
@Test
@TestMetadata("illegalUnderscoredTypeArgument.kt")
public void testIllegalUnderscoredTypeArgument() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/illegalUnderscoredTypeArgument.kt");
}
@Test
@TestMetadata("immutableArrayList.kt")
public void testImmutableArrayList() throws Exception {
@@ -13077,6 +13077,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt");
}
@Test
@TestMetadata("illegalUnderscoredTypeArgument.kt")
public void testIllegalUnderscoredTypeArgument() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/illegalUnderscoredTypeArgument.kt");
}
@Test
@TestMetadata("immutableArrayList.kt")
public void testImmutableArrayList() throws Exception {
@@ -43655,6 +43655,46 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
public class UnderscoredTypeArguments {
@Test
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@Test
@TestMetadata("dependentTypeParameters.kt")
public void testDependentTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/dependentTypeParameters.kt");
}
@Test
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@Test
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@@ -150,7 +150,7 @@ object DebugInfoUtil {
target = "[" + labelTargets.size + " elements]"
}
}
if (MAY_BE_UNRESOLVED.contains(referencedNameElementType)) {
if (MAY_BE_UNRESOLVED.contains(referencedNameElementType) || (expression is KtNameReferenceExpression && expression.isPlaceholder)) {
return
}
val resolved = target != null
@@ -286,16 +286,24 @@ private fun resolveParametersTypes(
}
}
@JvmName("resolveTypeWithGivenTypeReference")
internal fun resolveType(
context: BasicCallResolutionContext,
typeReference: KtTypeReference,
typeResolver: TypeResolver
): UnwrappedType {
val type = typeResolver.resolveType(context.scope, typeReference, context.trace, checkBounds = true)
ForceResolveUtil.forceResolveAllContents(type)
return type.unwrap()
}
internal fun resolveType(
context: BasicCallResolutionContext,
typeReference: KtTypeReference?,
typeResolver: TypeResolver
): UnwrappedType? {
if (typeReference == null) return null
val type = typeResolver.resolveType(context.scope, typeReference, context.trace, checkBounds = true)
ForceResolveUtil.forceResolveAllContents(type)
return type.unwrap()
return resolveType(context, typeReference, typeResolver)
}
@@ -687,8 +687,11 @@ class PSICallResolver(
}
ModifierCheckerCore.check(projection, context.trace, null, languageVersionSettings)
resolveType(context, projection.typeReference, typeResolver)?.let { SimpleTypeArgumentImpl(projection, it) }
?: TypeArgumentPlaceholder
val typeReference = projection.typeReference
if (typeReference == null || typeReference.isPlaceholder) return@map TypeArgumentPlaceholder
SimpleTypeArgumentImpl(projection, resolveType(context, typeReference, typeResolver))
}
private fun resolveArgumentsInParenthesis(
@@ -59,6 +59,9 @@ class KtNameReferenceExpression : KtExpressionImplStub<KotlinNameReferenceExpres
return visitor.visitSimpleNameExpression(this, data)
}
val isPlaceholder: Boolean
get() = getIdentifier()?.text?.equals("_") == true
companion object {
private val NAME_REFERENCE_EXPRESSIONS = TokenSet.create(IDENTIFIER, THIS_KEYWORD, SUPER_KEYWORD)
}
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.psi
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.psi.psiUtil.collectAnnotationEntriesFromStubOrPsi
import org.jetbrains.kotlin.psi.psiUtil.findDescendantOfType
import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes
@@ -38,6 +38,9 @@ class KtTypeReference : KtModifierListOwnerStub<KotlinPlaceHolderStub<KtTypeRefe
return visitor.visitTypeReference(this, data)
}
val isPlaceholder: Boolean
get() = findDescendantOfType<KtNameReferenceExpression>()?.isPlaceholder == true
val typeElement: KtTypeElement?
get() = KtStubbedPsiUtil.getStubOrPsiChild(this, KtStubElementTypes.TYPE_ELEMENT_TYPES, KtTypeElement.ARRAY_FACTORY)
@@ -133,7 +133,7 @@ interface CollectionLiteralKotlinCallArgument : PostponableKotlinCallArgument
interface TypeArgument
// todo allow '_' in frontend
// Used as a stub or underscored type argument
object TypeArgumentPlaceholder : TypeArgument
interface SimpleTypeArgument : TypeArgument {
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun <K, T> foo(x: (K) -> T): Pair<K, T> = (1 as K) to (1f as T)
class `_` {}
fun box(): String {
val x1 = foo<Int, `_`> { it.toFloat() as `_` } // Pair<Int, Float>
return "OK"
}
@@ -0,0 +1,21 @@
// WITH_RUNTIME
// TARGET_BACKEND: JVM
abstract class SomeClass<T> {
abstract fun execute() : T
}
class SomeImplementation : SomeClass<String>() {
override fun execute(): String = "Test"
}
object Runner {
inline fun <reified S: SomeClass<T>, T> run() : T {
return S::class.java.newInstance().execute()
}
}
fun box(): String {
val s = Runner.run<SomeImplementation, _>() // T is inferred to String
return "OK"
}
@@ -0,0 +1,11 @@
sealed class MyResult<out T>{
data class Success<T>(val value: T): MyResult<T>()
data class Failure(val exception: Throwable): MyResult<Nothing>()
}
inline fun <reified E: Throwable, T> MyResult<T>.catch(result: (E) -> T) = "OK"
fun box(): String {
val result: MyResult<Int> = MyResult.Success(1)
return result.catch<IllegalStateException, _>{ 2 } // T is inferred into Int
}
@@ -0,0 +1,27 @@
interface RProps
open class RComponent<K, T> : Component<K, T>
interface RState
interface Component<K1, K2>
class RElementBuilder<A>
interface ReactElement
class RBuilder
interface MyProps<T> : RProps {
var list: List<T>
}
class MyComponent<T> : RComponent<MyProps<T>, RState>() {}
inline fun <P : RProps, reified C : Component<P, *>> child(
noinline handler: RElementBuilder<P>.() -> Unit
): String = "OK"
fun box(): String {
child<MyProps<RBuilder.(String) -> Unit>, _> {
}
return child<_, MyComponent<RBuilder.(String) -> Unit>> {
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun <K, T> foo(x: (K) -> T): Pair<K, T> = (1 as K) to (1f as T)
//class `_` {}
fun box(): String {
val x = foo<Int, _> { it.toFloat() } // Pair<Int, Float>
return "OK"
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun <K, T> foo(x: (K) -> T): Pair<K, T> = TODO()
class Foo<K>
fun main() {
val x = foo<Int, Foo<_>> { it.toFloat() }
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun <K, T> foo(x: (K) -> T): Pair<K, T> = TODO()
class Foo<K>
fun main() {
val x = foo<Int, Foo<<!UNRESOLVED_REFERENCE!>_<!>>> { <!TYPE_MISMATCH!>it.toFloat()<!> }
}
@@ -0,0 +1,11 @@
package
public fun </*0*/ K, /*1*/ T> foo(/*0*/ x: (K) -> T): kotlin.Pair<K, T>
public fun main(): kotlin.Unit
public final class Foo</*0*/ K> {
public constructor Foo</*0*/ K>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,6 @@
fun main() {
val x = foo<Int, _>()
val x = foo<_, _, _>()
val x = foo<_, _, Int>()
val x = foo<_>()
}
+140
View File
@@ -0,0 +1,140 @@
KtFile: UnderscoredTypeArgumentsOfCall.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
@@ -0,0 +1,6 @@
fun main() {
val y: Foo<__> = 1
val y: Foo<_, __> = 1
val y: Foo<Int, __> = 1
val y: Foo<_____, Float> = 1
}
@@ -0,0 +1,134 @@
KtFile: UnderscoredTypeArgumentsOfCallIllegal.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('y')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('__')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('y')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('__')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('y')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('__')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('y')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_____')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Float')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
+14
View File
@@ -0,0 +1,14 @@
fun main() {
val x = foo<Foo<_>>()
val x = foo<Foo<_>, _>()
val x = foo<Foo<_>, Int>()
val x = foo<Foo<Int, _>>()
val x = foo<Foo<Int, Foo<_>, Float>, Float>()
val y: Foo<_> = 1
val y: Foo<_, _> = 1
}
interface A : Foo<_>
typealias Foo<K> = Foo<_, K>
+326
View File
@@ -0,0 +1,326 @@
KtFile: UnderscoredTypeArgumentsOfType.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Float')
PsiElement(GT)('>')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Float')
PsiElement(GT)('>')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('y')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('y')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
CLASS
PsiElement(interface)('interface')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('A')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
SUPER_TYPE_LIST
SUPER_TYPE_ENTRY
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiWhiteSpace('\n\n')
TYPEALIAS
PsiElement(typealias)('typealias')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Foo')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('K')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('K')
PsiElement(GT)('>')
+7
View File
@@ -0,0 +1,7 @@
class A<_> {}
typealias Foo<K, _> = Foo<K>
fun <K : T, _, T> foo() {}
fun <K, _: K> foo() {}
+108
View File
@@ -0,0 +1,108 @@
KtFile: UnderscoredTypeParameters.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('A')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
TYPEALIAS
PsiElement(typealias)('typealias')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('Foo')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('K')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('_')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Foo')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('K')
PsiElement(GT)('>')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('K')
PsiWhiteSpace(' ')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('T')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('_')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('T')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
TYPE_PARAMETER_LIST
PsiElement(LT)('<')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('K')
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
TYPE_PARAMETER
PsiElement(IDENTIFIER)('_')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('K')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
@@ -13083,6 +13083,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt");
}
@Test
@TestMetadata("illegalUnderscoredTypeArgument.kt")
public void testIllegalUnderscoredTypeArgument() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/illegalUnderscoredTypeArgument.kt");
}
@Test
@TestMetadata("immutableArrayList.kt")
public void testImmutableArrayList() throws Exception {
@@ -43487,6 +43487,46 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
public class UnderscoredTypeArguments {
@Test
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@Test
@TestMetadata("dependentTypeParameters.kt")
public void testDependentTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/dependentTypeParameters.kt");
}
@Test
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@Test
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@@ -43655,6 +43655,46 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
public class UnderscoredTypeArguments {
@Test
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@Test
@TestMetadata("dependentTypeParameters.kt")
public void testDependentTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/dependentTypeParameters.kt");
}
@Test
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@Test
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@@ -35099,6 +35099,44 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
}
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoredTypeArguments extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@TestMetadata("dependentTypeParameters.kt")
public void testDependentTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/dependentTypeParameters.kt");
}
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -731,6 +731,26 @@ public class ParsingTestGenerated extends AbstractParsingTest {
runTest("compiler/testData/psi/TypealiasIsKeyword.kt");
}
@TestMetadata("UnderscoredTypeArgumentsOfCall.kt")
public void testUnderscoredTypeArgumentsOfCall() throws Exception {
runTest("compiler/testData/psi/UnderscoredTypeArgumentsOfCall.kt");
}
@TestMetadata("UnderscoredTypeArgumentsOfCallIllegal.kt")
public void testUnderscoredTypeArgumentsOfCallIllegal() throws Exception {
runTest("compiler/testData/psi/UnderscoredTypeArgumentsOfCallIllegal.kt");
}
@TestMetadata("UnderscoredTypeArgumentsOfType.kt")
public void testUnderscoredTypeArgumentsOfType() throws Exception {
runTest("compiler/testData/psi/UnderscoredTypeArgumentsOfType.kt");
}
@TestMetadata("UnderscoredTypeParameters.kt")
public void testUnderscoredTypeParameters() throws Exception {
runTest("compiler/testData/psi/UnderscoredTypeParameters.kt");
}
@TestMetadata("UnsignedLiteral.kt")
public void testUnsignedLiteral() throws Exception {
runTest("compiler/testData/psi/UnsignedLiteral.kt");
@@ -28999,6 +28999,39 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
}
}
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoredTypeArguments extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -28405,6 +28405,39 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoredTypeArguments extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -24731,6 +24731,39 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
}
}
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoredTypeArguments extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -31537,6 +31537,40 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
public class UnderscoredTypeArguments {
@Test
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@Test
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@Test
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@Test
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")