Minor: regenerate tests, update testData

This commit is contained in:
Dmitry Petrov
2021-11-29 17:13:29 +03:00
committed by TeamCityServer
parent 27a144f86f
commit f55f880726
4 changed files with 154 additions and 13 deletions
@@ -10919,6 +10919,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/funInterface/basicFunInterfaceDisabled.kt");
}
@Test
@TestMetadata("funInterfaceConstructorReferences_after.kt")
public void testFunInterfaceConstructorReferences_after() throws Exception {
runTest("compiler/testData/diagnostics/tests/funInterface/funInterfaceConstructorReferences_after.kt");
}
@Test
@TestMetadata("funInterfaceConstructorReferences_before.kt")
public void testFunInterfaceConstructorReferences_before() throws Exception {
runTest("compiler/testData/diagnostics/tests/funInterface/funInterfaceConstructorReferences_before.kt");
}
@Test
@TestMetadata("funInterfaceConversionOnReceiver.kt")
public void testFunInterfaceConversionOnReceiver() throws Exception {
@@ -10961,12 +10973,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/funInterface/noCompatibilityResolveForFunInterfaces.kt");
}
@Test
@TestMetadata("prohibitFunInterfaceConstructorReferences.kt")
public void testProhibitFunInterfaceConstructorReferences() throws Exception {
runTest("compiler/testData/diagnostics/tests/funInterface/prohibitFunInterfaceConstructorReferences.kt");
}
@Test
@TestMetadata("resolveFunInterfaceWithoutMainMethod.kt")
public void testResolveFunInterfaceWithoutMainMethod() throws Exception {
@@ -0,0 +1,90 @@
FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
TYPEALIAS name:KR visibility:public expandedType:<root>.KRunnable
TYPEALIAS name:KSS visibility:public expandedType:<root>.KSupplier<kotlin.String>
TYPEALIAS name:KCS visibility:public expandedType:<root>.KConsumer<kotlin.String>
CLASS INTERFACE name:KRunnable modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KRunnable
FUN name:run visibility:public modality:ABSTRACT <> ($this:<root>.KRunnable) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.KRunnable
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:KSupplier modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KSupplier<T of <root>.KSupplier>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
FUN name:get visibility:public modality:ABSTRACT <> ($this:<root>.KSupplier<T of <root>.KSupplier>) returnType:T of <root>.KSupplier
$this: VALUE_PARAMETER name:<this> type:<root>.KSupplier<T of <root>.KSupplier>
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:KConsumer modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KConsumer<T of <root>.KConsumer>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
FUN name:accept visibility:public modality:ABSTRACT <> ($this:<root>.KConsumer<T of <root>.KConsumer>, x:T of <root>.KConsumer) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.KConsumer<T of <root>.KConsumer>
VALUE_PARAMETER name:x index:0 type:T of <root>.KConsumer
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> declared in <root>'
FUNCTION_REFERENCE 'public final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=null reflectionTarget=<same>
FUN name:test1a visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1a (): kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> declared in <root>'
FUNCTION_REFERENCE 'public final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=null reflectionTarget=<same>
FUN name:test1b visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction<java.lang.Runnable>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1b (): kotlin.reflect.KFunction<java.lang.Runnable> declared in <root>'
FUNCTION_REFERENCE 'public final fun Runnable (function: kotlin.Function0<kotlin.Unit>): java.lang.Runnable declared in java.lang' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, java.lang.Runnable> origin=null reflectionTarget=<same>
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Function1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> declared in <root>'
FUNCTION_REFERENCE 'public final fun KSupplier <T> (function: kotlin.Function0<T of <root>.KSupplier>): <root>.KSupplier<T of <root>.KSupplier> declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=null reflectionTarget=<same>
<T>: kotlin.String
FUN name:test2a visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2a (): kotlin.Function1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> declared in <root>'
FUNCTION_REFERENCE 'public final fun KSupplier <T> (function: kotlin.Function0<T of <root>.KSupplier>): <root>.KSupplier<T of <root>.KSupplier> declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=null reflectionTarget=<same>
<T>: kotlin.String
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.Function1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> declared in <root>'
FUNCTION_REFERENCE 'public final fun KConsumer <T> (function: kotlin.Function1<T of <root>.KConsumer, kotlin.Unit>): <root>.KConsumer<T of <root>.KConsumer> declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=null reflectionTarget=<same>
<T>: kotlin.String
FUN name:test3a visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3a (): kotlin.Function1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> declared in <root>'
FUNCTION_REFERENCE 'public final fun KConsumer <T> (function: kotlin.Function1<T of <root>.KConsumer, kotlin.Unit>): <root>.KConsumer<T of <root>.KConsumer> declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=null reflectionTarget=<same>
<T>: kotlin.String
@@ -0,0 +1,45 @@
typealias KR = KRunnable
typealias KSS = KSupplier<String>
typealias KCS = KConsumer<String>
fun interface KRunnable {
abstract fun run()
}
fun interface KSupplier<T : Any?> {
abstract fun get(): T
}
fun interface KConsumer<T : Any?> {
abstract fun accept(x: T)
}
fun test1(): KFunction1<Function0<Unit>, KRunnable> {
return ::KRunnable
}
fun test1a(): KFunction1<Function0<Unit>, KRunnable> {
return ::KRunnable
}
fun test1b(): KFunction<Runnable> {
return ::Runnable
}
fun test2(): Function1<Function0<String>, KSupplier<String>> {
return ::KSupplier/*<String>()*/
}
fun test2a(): Function1<Function0<String>, KSupplier<String>> {
return ::KSupplier/*<String>()*/
}
fun test3(): Function1<Function1<String, Unit>, KConsumer<String>> {
return ::KConsumer/*<String>()*/
}
fun test3a(): Function1<Function1<String, Unit>, KConsumer<String>> {
return ::KConsumer/*<String>()*/
}
@@ -18,7 +18,7 @@ fun interface KConsumer<T : Any?> {
typealias KCS = KConsumer<String>
fun test1(): KFunction1<@ParameterName(name = "function") Function0<Unit>, KRunnable> {
return { // BLOCK
local fun KRunnable(fn: Function0<Unit>): KRunnable fn /*-> KRunnable */
local fun KRunnable(function: Function0<Unit>): KRunnable function /*-> KRunnable */
::KRunnable
}
@@ -26,7 +26,7 @@ fun test1(): KFunction1<@ParameterName(name = "function") Function0<Unit>, KRunn
fun test1a(): KFunction1<@ParameterName(name = "function") Function0<Unit>, KRunnable> {
return { // BLOCK
local fun KRunnable(fn: Function0<Unit>): KRunnable fn /*-> KRunnable */
local fun KRunnable(function: Function0<Unit>): KRunnable function /*-> KRunnable */
::KRunnable
}
@@ -34,7 +34,7 @@ fun test1a(): KFunction1<@ParameterName(name = "function") Function0<Unit>, KRun
fun test1b(): KFunction<Runnable> {
return { // BLOCK
local fun Runnable(fn: Function0<Unit>): Runnable fn /*-> Runnable */
local fun Runnable(function: Function0<Unit>): Runnable function /*-> Runnable */
::Runnable
}
@@ -42,7 +42,7 @@ fun test1b(): KFunction<Runnable> {
fun test2(): Function1<Function0<String>, KSupplier<String>> {
return { // BLOCK
local fun KSupplier(fn: Function0<String>): KSupplier<String> fn /*-> KSupplier<String> */
local fun KSupplier(function: Function0<String>): KSupplier<String> function /*-> KSupplier<String> */
::KSupplier
}
@@ -50,7 +50,7 @@ fun test2(): Function1<Function0<String>, KSupplier<String>> {
fun test2a(): Function1<Function0<String>, KSupplier<String>> {
return { // BLOCK
local fun KSupplier(fn: Function0<String>): KSupplier<String> fn /*-> KSupplier<String> */
local fun KSupplier(function: Function0<String>): KSupplier<String> function /*-> KSupplier<String> */
::KSupplier
}
@@ -58,7 +58,7 @@ fun test2a(): Function1<Function0<String>, KSupplier<String>> {
fun test3(): Function1<Function1<String, Unit>, KConsumer<String>> {
return { // BLOCK
local fun KConsumer(fn: Function1<@ParameterName(name = "x") String, Unit>): KConsumer<String> fn /*-> KConsumer<String> */
local fun KConsumer(function: Function1<@ParameterName(name = "x") String, Unit>): KConsumer<String> function /*-> KConsumer<String> */
::KConsumer
}
@@ -66,7 +66,7 @@ fun test3(): Function1<Function1<String, Unit>, KConsumer<String>> {
fun test3a(): Function1<Function1<String, Unit>, KConsumer<String>> {
return { // BLOCK
local fun KConsumer(fn: Function1<@ParameterName(name = "x") String, Unit>): KConsumer<String> fn /*-> KConsumer<String> */
local fun KConsumer(function: Function1<@ParameterName(name = "x") String, Unit>): KConsumer<String> function /*-> KConsumer<String> */
::KConsumer
}