Files
kotlin-fork/compiler/testData/ir/irText/declarations/parameters/localFun.txt
T
Dmitry Petrov e89047d2cc Generate super classes and overridden functions in proper scope
Such references require proper scope so that local symbols are bound.
Example:

```
fun <T> outer() {
    abstract class ALocal<S : T> {
        abstract fun bar()
    }

    class Local<S : T> : ALocal<S>() {
        override fun bar() {}
    }
}
```

Here local classes have type parameters with upper bounds depending on
function type parameters, and members overriding members in other local
classes.
2018-02-28 10:35:13 +03:00

31 lines
1.7 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/localFun.kt
FUN name:outer visibility:public modality:FINAL <TT> () returnType:Unit flags:
TYPE_PARAMETER name:TT index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
BLOCK_BODY
FUN name:test1 visibility:local modality:FINAL <T> (i:kotlin.Int, j:T) returnType:Unit flags:
TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
superClassifiers:
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
VALUE_PARAMETER name:i index:0 type:kotlin.Int flags:
VALUE_PARAMETER name:j index:1 type:T flags:
BLOCK_BODY
FUN name:test2 visibility:local modality:FINAL <> (i:kotlin.Int, j:kotlin.String) returnType:Unit flags:
VALUE_PARAMETER name:i index:0 type:kotlin.Int flags:
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
VALUE_PARAMETER name:j index:1 type:kotlin.String flags:
EXPRESSION_BODY
CONST String type=kotlin.String value=
BLOCK_BODY
FUN name:test3 visibility:local modality:FINAL <> (args:kotlin.Array<out kotlin.String>) returnType:Unit flags:
VALUE_PARAMETER name:args index:0 type:kotlin.Array<out kotlin.String> varargElementType:kotlin.String flags:vararg
BLOCK_BODY
FUN name:textExt1 visibility:local modality:FINAL <> ($receiver:kotlin.String, i:kotlin.Int, j:TT) returnType:Unit flags:
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String flags:
VALUE_PARAMETER name:i index:0 type:kotlin.Int flags:
VALUE_PARAMETER name:j index:1 type:TT flags:
BLOCK_BODY