Minor: move callable reference IR tests to a separate directory
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
FILE fqName:<root> fileName:/genericMember.kt
|
||||
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.A<T of <root>.A> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
BLOCK_BODY
|
||||
PROPERTY name:bar visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-bar> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-bar> (): kotlin.Int declared in <root>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-bar>' type=<root>.A origin=null
|
||||
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
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KFunction1<<root>.A<*>, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in <root>.A' type=kotlin.reflect.KFunction1<<root>.A<*>, kotlin.Unit> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction1<<root>.A<*>, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.reflect.KFunction1<<root>.A<*>, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KFunction1<<root>.A<*>, kotlin.Unit> visibility:private [final,static]' type=kotlin.reflect.KFunction1<<root>.A<*>, kotlin.Unit> origin=null
|
||||
PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KProperty1<<root>.A<*>, kotlin.Int> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
PROPERTY_REFERENCE 'public final bar: kotlin.Int [val]' field='FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:private [final]' getter='public final fun <get-bar> (): kotlin.Int declared in <root>.A' setter=null type=kotlin.reflect.KProperty1<<root>.A<*>, kotlin.Int> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KProperty1<<root>.A<*>, kotlin.Int>
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.reflect.KProperty1<<root>.A<*>, kotlin.Int> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KProperty1<<root>.A<*>, kotlin.Int> visibility:private [final,static]' type=kotlin.reflect.KProperty1<<root>.A<*>, kotlin.Int> origin=null
|
||||
@@ -0,0 +1,7 @@
|
||||
class A<T> {
|
||||
fun foo() {}
|
||||
val bar = 42
|
||||
}
|
||||
|
||||
val test1 = A<String>::foo
|
||||
val test2 = A<String>::bar
|
||||
@@ -0,0 +1,53 @@
|
||||
FILE fqName:<root> fileName:/genericMember.kt
|
||||
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<T of <root>.A>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.A<T of <root>.A> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
BLOCK_BODY
|
||||
PROPERTY name:bar visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-bar> visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-bar> (): kotlin.Int declared in <root>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A<T of <root>.A> declared in <root>.A.<get-bar>' type=<root>.A<T of <root>.A> origin=null
|
||||
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
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KFunction1<<root>.A<kotlin.String>, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in <root>.A' type=kotlin.reflect.KFunction1<<root>.A<kotlin.String>, kotlin.Unit> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction1<<root>.A<kotlin.String>, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.reflect.KFunction1<<root>.A<kotlin.String>, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KFunction1<<root>.A<kotlin.String>, kotlin.Unit> visibility:private [final,static]' type=kotlin.reflect.KFunction1<<root>.A<kotlin.String>, kotlin.Unit> origin=null
|
||||
PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KProperty1<<root>.A<kotlin.String>, kotlin.Int> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
PROPERTY_REFERENCE 'public final bar: kotlin.Int [val]' field=null getter='public final fun <get-bar> (): kotlin.Int declared in <root>.A' setter=null type=kotlin.reflect.KProperty1<<root>.A<kotlin.String>, kotlin.Int> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KProperty1<<root>.A<kotlin.String>, kotlin.Int>
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.reflect.KProperty1<<root>.A<kotlin.String>, kotlin.Int> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KProperty1<<root>.A<kotlin.String>, kotlin.Int> visibility:private [final,static]' type=kotlin.reflect.KProperty1<<root>.A<kotlin.String>, kotlin.Int> origin=null
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
FILE fqName:test fileName:/importedFromObject.kt
|
||||
CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo
|
||||
CONSTRUCTOR visibility:private <> () returnType:test.Foo [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:test.Foo) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:test.Foo
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.String declared in test.Foo'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: test.Foo declared in test.Foo.<get-a>' type=test.Foo origin=null
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:test.Foo) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:test.Foo
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in test.Foo'
|
||||
CONST String type=kotlin.String value=""
|
||||
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
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
PROPERTY_REFERENCE 'public final a: kotlin.String [val]' field='FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' getter='public final fun <get-a> (): kotlin.String declared in test.Foo' setter=null type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KProperty0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.reflect.KProperty0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
PROPERTY name:test1a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1a type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
PROPERTY_REFERENCE 'public final a: kotlin.String [val]' field='FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' getter='public final fun <get-a> (): kotlin.String declared in test.Foo' setter=null type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1a> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KProperty0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test1a visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1a> (): kotlin.reflect.KProperty0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1a type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String declared in test.Foo' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.reflect.KFunction0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
PROPERTY name:test2a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2a type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String declared in test.Foo' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2a> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test2a visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2a> (): kotlin.reflect.KFunction0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2a type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
import test.Foo.a
|
||||
import test.Foo.foo
|
||||
|
||||
object Foo {
|
||||
val a: String = ""
|
||||
fun foo(): String = ""
|
||||
}
|
||||
|
||||
val test1 = ::a
|
||||
val test1a = Foo::a
|
||||
val test2 = ::foo
|
||||
val test2a = Foo::foo
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
FILE fqName:test fileName:/importedFromObject.kt
|
||||
CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo
|
||||
CONSTRUCTOR visibility:private <> () returnType:test.Foo [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:test.Foo) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:test.Foo
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.String declared in test.Foo'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: test.Foo declared in test.Foo.<get-a>' type=test.Foo origin=null
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:test.Foo) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:test.Foo
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in test.Foo'
|
||||
CONST String type=kotlin.String value=""
|
||||
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
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
PROPERTY_REFERENCE 'public final a: kotlin.String [val]' field=null getter='public final fun <get-a> (): kotlin.String declared in test.Foo' setter=null type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=test.Foo
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KProperty0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.reflect.KProperty0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
PROPERTY name:test1a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1a type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
PROPERTY_REFERENCE 'public final a: kotlin.String [val]' field=null getter='public final fun <get-a> (): kotlin.String declared in test.Foo' setter=null type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=test.Foo
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1a> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KProperty0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test1a visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1a> (): kotlin.reflect.KProperty0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1a type:kotlin.reflect.KProperty0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KProperty0<kotlin.String> origin=null
|
||||
PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String declared in test.Foo' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=test.Foo
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.reflect.KFunction0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
PROPERTY name:test2a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2a type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String declared in test.Foo' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=test.Foo
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2a> visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:test2a visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2a> (): kotlin.reflect.KFunction0<kotlin.String> declared in test'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2a type:kotlin.reflect.KFunction0<kotlin.String> visibility:private [final,static]' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
FILE fqName:<root> fileName:/typeArguments.kt
|
||||
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:objectMember visibility:public modality:FINAL <T> ($this:<root>.Host, x:T of <root>.Host.objectMember) returnType:kotlin.Unit [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.Host.objectMember
|
||||
BLOCK_BODY
|
||||
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:topLevel1 visibility:public modality:FINAL <T> (x:T of <root>.topLevel1) returnType:kotlin.Unit [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.topLevel1
|
||||
BLOCK_BODY
|
||||
FUN name:topLevel2 visibility:public modality:FINAL <T> (x:kotlin.collections.List<T of <root>.topLevel2>) returnType:kotlin.Unit [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.collections.List<T of <root>.topLevel2>
|
||||
BLOCK_BODY
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun topLevel1 <T> (x: T of <root>.topLevel1): kotlin.Unit [inline] declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
|
||||
PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun topLevel2 <T> (x: kotlin.collections.List<T of <root>.topLevel2>): kotlin.Unit [inline] declared in <root>' type=kotlin.reflect.KFunction1<kotlin.collections.List<kotlin.String>, kotlin.Unit> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> visibility:private [final,static]' type=kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> origin=null
|
||||
PROPERTY name:test3 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun objectMember <T> (x: T of <root>.Host.objectMember): kotlin.Unit [inline] declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test3> (): kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
|
||||
@@ -0,0 +1,14 @@
|
||||
import Host.objectMember
|
||||
|
||||
object Host {
|
||||
inline fun <reified T> objectMember(x: T) {}
|
||||
}
|
||||
|
||||
inline fun <reified T> topLevel1(x: T) {}
|
||||
inline fun <reified T> topLevel2(x: List<T>) {}
|
||||
|
||||
val test1: (Int) -> Unit = ::topLevel1
|
||||
|
||||
val test2: (List<String>) -> Unit = ::topLevel2
|
||||
|
||||
val test3: (Int) -> Unit = ::objectMember
|
||||
@@ -0,0 +1,64 @@
|
||||
FILE fqName:<root> fileName:/typeArguments.kt
|
||||
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:objectMember visibility:public modality:FINAL <T> ($this:<root>.Host, x:T of <root>.Host.objectMember) returnType:kotlin.Unit [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.Host.objectMember
|
||||
BLOCK_BODY
|
||||
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:topLevel1 visibility:public modality:FINAL <T> (x:T of <root>.topLevel1) returnType:kotlin.Unit [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.topLevel1
|
||||
BLOCK_BODY
|
||||
FUN name:topLevel2 visibility:public modality:FINAL <T> (x:kotlin.collections.List<T of <root>.topLevel2>) returnType:kotlin.Unit [inline]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.collections.List<T of <root>.topLevel2>
|
||||
BLOCK_BODY
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun topLevel1 <T> (x: T of <root>.topLevel1): kotlin.Unit [inline] declared in <root>' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, kotlin.Unit> origin=null
|
||||
<T>: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
|
||||
PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun topLevel2 <T> (x: kotlin.collections.List<T of <root>.topLevel2>): kotlin.Unit [inline] declared in <root>' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.collections.List<kotlin.String>, kotlin.Unit> origin=null
|
||||
<T>: kotlin.String
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> visibility:private [final,static]' type=kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> origin=null
|
||||
PROPERTY name:test3 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
FUNCTION_REFERENCE 'public final fun objectMember <T> (x: T of <root>.Host.objectMember): kotlin.Unit [inline] declared in <root>.Host' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, kotlin.Unit> origin=null
|
||||
<T>: kotlin.Int
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test3> (): kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
FILE fqName:<root> fileName:/withAdaptedArguments.kt
|
||||
FUN name:use visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.String>) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>'
|
||||
CALL 'public abstract fun invoke (p1: kotlin.Int): kotlin.String [operator] declared in kotlin.Function1' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.String> declared in <root>.use' type=kotlin.Function1<kotlin.Int, kotlin.String> origin=null
|
||||
p1: CONST Int type=kotlin.Int value=1
|
||||
FUN name:coerceToUnit visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
FUN name:fnWithDefault visibility:public modality:FINAL <> (a:kotlin.Int, b:kotlin.Int) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:b index:1 type:kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="abc"
|
||||
FUN name:fnWithVarargs visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun fnWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="abc"
|
||||
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:importedObjectMemberWithVarargs visibility:public modality:FINAL <> ($this:<root>.Host, xs:kotlin.IntArray) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun importedObjectMemberWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>.Host'
|
||||
CONST String type=kotlin.String value="abc"
|
||||
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:testDefault visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testDefault (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.reflect.KFunction2<kotlin.Int, kotlin.Int, kotlin.String> origin=null
|
||||
FUN name:testVararg visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testVararg (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun fnWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null
|
||||
FUN name:testCoercionToUnit visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testCoercionToUnit (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/coerceToUnit]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.reflect.KFunction2<kotlin.Int, kotlin.Int, kotlin.String> origin=null
|
||||
FUN name:testImportedObjectMember visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testImportedObjectMember (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun importedObjectMemberWithVarargs (xs: kotlin.IntArray): kotlin.String declared in <root>.Host' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
import Host.importedObjectMemberWithVarargs
|
||||
|
||||
fun use(fn: (Int) -> String) = fn(1)
|
||||
|
||||
fun coerceToUnit(fn: (Int) -> Unit) {}
|
||||
|
||||
fun fnWithDefault(a: Int, b: Int = 42) = "abc"
|
||||
|
||||
fun fnWithVarargs(vararg xs: Int) = "abc"
|
||||
|
||||
object Host {
|
||||
fun importedObjectMemberWithVarargs(vararg xs: Int) = "abc"
|
||||
}
|
||||
|
||||
fun testDefault() = use(::fnWithDefault)
|
||||
|
||||
fun testVararg() = use(::fnWithVarargs)
|
||||
|
||||
fun testCoercionToUnit() = coerceToUnit(::fnWithDefault)
|
||||
|
||||
fun testImportedObjectMember() = use(::importedObjectMemberWithVarargs)
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
FILE fqName:<root> fileName:/withAdaptedArguments.kt
|
||||
FUN name:use visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.String>) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>'
|
||||
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.String> declared in <root>.use' type=kotlin.Function1<kotlin.Int, kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
p1: CONST Int type=kotlin.Int value=1
|
||||
FUN name:coerceToUnit visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
FUN name:fnWithDefault visibility:public modality:FINAL <> (a:kotlin.Int, b:kotlin.Int) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:b index:1 type:kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="abc"
|
||||
FUN name:fnWithVarargs visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="abc"
|
||||
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:importedObjectMemberWithVarargs visibility:public modality:FINAL <> ($this:<root>.Host, xs:kotlin.IntArray) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun importedObjectMemberWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host'
|
||||
CONST String type=kotlin.String value="abc"
|
||||
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:testDefault visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testDefault (): kotlin.String declared in <root>'
|
||||
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
|
||||
FUN name:fnWithDefault visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun fnWithDefault (p0: kotlin.Int): kotlin.String declared in <root>.testDefault'
|
||||
CALL 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
a: GET_VAR 'p0: kotlin.Int declared in <root>.testDefault.fnWithDefault' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun fnWithDefault (p0: kotlin.Int): kotlin.String declared in <root>.testDefault' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
|
||||
FUN name:testVararg visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testVararg (): kotlin.String declared in <root>'
|
||||
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
|
||||
FUN name:fnWithVarargs visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun fnWithVarargs (p0: kotlin.Int): kotlin.String declared in <root>.testVararg'
|
||||
CALL 'public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.testVararg.fnWithVarargs' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun fnWithVarargs (p0: kotlin.Int): kotlin.String declared in <root>.testVararg' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
|
||||
FUN name:testCoercionToUnit visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testCoercionToUnit (): kotlin.Unit declared in <root>'
|
||||
CALL 'public final fun coerceToUnit (fn: kotlin.Function1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
|
||||
FUN name:fnWithDefault visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
a: GET_VAR 'p0: kotlin.Int declared in <root>.testCoercionToUnit.fnWithDefault' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun fnWithDefault (p0: kotlin.Int): kotlin.Unit declared in <root>.testCoercionToUnit' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null
|
||||
FUN name:testImportedObjectMember visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testImportedObjectMember (): kotlin.String declared in <root>'
|
||||
CALL 'public final fun use (fn: kotlin.Function1<kotlin.Int, kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
|
||||
FUN name:importedObjectMemberWithVarargs visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun importedObjectMemberWithVarargs (p0: kotlin.Int): kotlin.String declared in <root>.testImportedObjectMember'
|
||||
CALL 'public final fun importedObjectMemberWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in <root>.Host' type=kotlin.String origin=null
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Host
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.testImportedObjectMember.importedObjectMemberWithVarargs' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun importedObjectMemberWithVarargs (p0: kotlin.Int): kotlin.String declared in <root>.testImportedObjectMember' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.String> origin=null
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
|
||||
FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
VAR name:result type:kotlin.Int [var]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.IntArray [val]
|
||||
GET_VAR 'args: kotlin.IntArray declared in <root>.sum' type=kotlin.IntArray origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public final fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.IntArray [val] declared in <root>.sum' type=kotlin.IntArray origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:arg type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
|
||||
SET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val arg: kotlin.Int [val] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>'
|
||||
GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array<kotlin.Number>) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:args index:0 type:kotlin.Array<kotlin.Number>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun nsum (args: kotlin.Array<kotlin.Number>): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
args: CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
|
||||
size: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
|
||||
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:it index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Number [operator] declared in kotlin.Array' type=kotlin.Number origin=null
|
||||
$this: GET_VAR 'args: kotlin.Array<kotlin.Number> declared in <root>.nsum' type=kotlin.Array<kotlin.Number> origin=null
|
||||
index: GET_VAR 'it: kotlin.Int declared in <root>.nsum.<anonymous>' type=kotlin.Int origin=null
|
||||
FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array<kotlin.String>, k:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:b index:0 type:kotlin.Array<kotlin.String>
|
||||
VALUE_PARAMETER name:k index:1 type:kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
BLOCK_BODY
|
||||
FUN name:usePlainArgs visibility:public modality:FINAL <> (fn:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:usePrimitiveArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.IntArray, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.IntArray, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:useArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:useStringArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/usePlainArgs]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null
|
||||
FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1<kotlin.IntArray, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: FUNCTION_REFERENCE 'public final fun sum (args: kotlin.IntArray): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null
|
||||
FUN name:testArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useArray]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun nsum (args: kotlin.Array<kotlin.Number>): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Array<kotlin.Number>, kotlin.Int> origin=null
|
||||
FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useStringArray]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun zap (b: kotlin.Array<kotlin.String>, k: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction2<kotlin.Array<kotlin.String>, kotlin.Int, kotlin.Unit> origin=null
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun sum(vararg args: Int): Int {
|
||||
var result = 0
|
||||
for (arg in args)
|
||||
result += arg
|
||||
return result
|
||||
}
|
||||
|
||||
fun nsum(vararg args: Number) = sum(*IntArray(args.size) { args[it].toInt() })
|
||||
|
||||
fun zap(vararg b: String, k: Int = 42) {}
|
||||
|
||||
fun usePlainArgs(fn: (Int, Int) -> Int) {}
|
||||
fun usePrimitiveArray(fn: (IntArray) -> Int) {}
|
||||
fun useArray(fn: (Array<Int>) -> Int) {}
|
||||
fun useStringArray(fn: (Array<String>) -> Unit) {}
|
||||
|
||||
fun testPlainArgs() { usePlainArgs(::sum) }
|
||||
fun testPrimitiveArrayAsVararg() { usePrimitiveArray(::sum) }
|
||||
fun testArrayAsVararg() { useArray(::nsum) }
|
||||
fun testArrayAndDefaults() { useStringArray(::zap) }
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
|
||||
FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
|
||||
BLOCK_BODY
|
||||
VAR name:result type:kotlin.Int [var]
|
||||
CONST Int type=kotlin.Int value=0
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public final fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: GET_VAR 'args: kotlin.IntArray [vararg] declared in <root>.sum' type=kotlin.IntArray origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator [val] declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:arg type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator [val] declared in <root>.sum' type=kotlin.collections.IntIterator origin=null
|
||||
SET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Unit origin=PLUSEQ
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
|
||||
$this: GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=PLUSEQ
|
||||
other: GET_VAR 'val arg: kotlin.Int [val] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>'
|
||||
GET_VAR 'var result: kotlin.Int [var] declared in <root>.sum' type=kotlin.Int origin=null
|
||||
FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array<out kotlin.Number>) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:args index:0 type:kotlin.Array<out kotlin.Number> varargElementType:kotlin.Number [vararg]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
SPREAD_ELEMENT
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
|
||||
size: CALL 'public final fun <get-size> (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'args: kotlin.Array<out kotlin.Number> [vararg] declared in <root>.nsum' type=kotlin.Array<out kotlin.Number> origin=null
|
||||
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:it index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: kotlin.Int): kotlin.Int declared in <root>.nsum'
|
||||
CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null
|
||||
$this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array [operator] declared in kotlin.Array' type=kotlin.Number origin=GET_ARRAY_ELEMENT
|
||||
$this: GET_VAR 'args: kotlin.Array<out kotlin.Number> [vararg] declared in <root>.nsum' type=kotlin.Array<out kotlin.Number> origin=null
|
||||
index: GET_VAR 'it: kotlin.Int declared in <root>.nsum.<anonymous>' type=kotlin.Int origin=null
|
||||
FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array<out kotlin.String>, k:kotlin.Int) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:b index:0 type:kotlin.Array<out kotlin.String> varargElementType:kotlin.String [vararg]
|
||||
VALUE_PARAMETER name:k index:1 type:kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
BLOCK_BODY
|
||||
FUN name:usePlainArgs visibility:public modality:FINAL <> (fn:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:usePrimitiveArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.IntArray, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.IntArray, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:useArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
FUN name:useStringArray visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun usePlainArgs (fn: kotlin.Function2<kotlin.Int, kotlin.Int, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: BLOCK type=kotlin.reflect.KFunction2<kotlin.Int, kotlin.Int, kotlin.Int> origin=null
|
||||
FUN name:sum visibility:local modality:FINAL <> (p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Int
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:p1 index:1 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in <root>.testPlainArgs'
|
||||
CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.testPlainArgs.sum' type=kotlin.Int origin=null
|
||||
GET_VAR 'p1: kotlin.Int declared in <root>.testPlainArgs.sum' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in <root>.testPlainArgs' type=kotlin.reflect.KFunction2<kotlin.Int, kotlin.Int, kotlin.Int> origin=null
|
||||
FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1<kotlin.IntArray, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: FUNCTION_REFERENCE 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.Int> origin=null
|
||||
FUN name:testArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useArray (fn: kotlin.Function1<kotlin.Array<kotlin.Int>, kotlin.Int>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: FUNCTION_REFERENCE 'public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Array<out kotlin.Number>, kotlin.Int> origin=null
|
||||
FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useStringArray (fn: kotlin.Function1<kotlin.Array<kotlin.String>, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: BLOCK type=kotlin.reflect.KFunction1<kotlin.Array<out kotlin.String>, kotlin.Unit> origin=null
|
||||
FUN name:zap visibility:local modality:FINAL <> (p0:kotlin.Array<out kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:p0 index:0 type:kotlin.Array<out kotlin.String>
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
b: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
|
||||
SPREAD_ELEMENT
|
||||
GET_VAR 'p0: kotlin.Array<out kotlin.String> declared in <root>.testArrayAndDefaults.zap' type=kotlin.Array<out kotlin.String> origin=null
|
||||
FUNCTION_REFERENCE 'local final fun zap (p0: kotlin.Array<out kotlin.String>): kotlin.Unit declared in <root>.testArrayAndDefaults' type=kotlin.reflect.KFunction1<kotlin.Array<out kotlin.String>, kotlin.Unit> origin=null
|
||||
Reference in New Issue
Block a user