-
Couldn't load subscription status.
- Fork 6.1k
Create header mode to enable eliding function / method bodies #5516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
58bf238
92da29f
352c5ae
062d57d
5213885
49852fb
3cc60ca
8134ffb
f300414
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| FILE: classDeclaration.kt | ||
| public final class A : R|kotlin/Any| { | ||
| public constructor(): R|A| { | ||
| super<R|kotlin/Any|>() | ||
| } | ||
|
|
||
| public final fun funA(): R|kotlin/String| | ||
|
|
||
| public final inline fun funB(): R|kotlin/String| { | ||
| ^funB String(A.funB body) | ||
| } | ||
|
|
||
| @R|kotlin/OptIn|(markerClass = vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun isNotNull(value: R|kotlin/Any?|): R|kotlin/Boolean| | ||
| [R|Contract description] | ||
| < | ||
| Returns(TRUE) -> value != null | ||
| > | ||
|
|
||
|
|
||
| private final fun funC(): R|kotlin/String| | ||
|
|
||
| public final fun funD(): R|kotlin/Int| | ||
|
|
||
| } | ||
| public abstract interface B : R|kotlin/Any| { | ||
| public open fun funA(): R|kotlin/String| | ||
|
|
||
| public abstract fun funB(): R|kotlin/String| | ||
|
|
||
| } | ||
| public final class C : R|B| { | ||
| public constructor(): R|C| { | ||
| super<R|kotlin/Any|>() | ||
| } | ||
|
|
||
| public open override fun funB(): R|kotlin/String| | ||
|
|
||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| // RUN_PIPELINE_TILL: BACKEND | ||
| // FIR_DUMP | ||
| import kotlin.contracts.ExperimentalContracts | ||
| import kotlin.contracts.contract | ||
|
|
||
| class A { | ||
| fun funA(): String { | ||
| return "A.funA body" | ||
| } | ||
|
|
||
| inline fun funB(): String { | ||
| return "A.funB body" | ||
| } | ||
|
|
||
| @OptIn(ExperimentalContracts::class) | ||
| fun isNotNull(value: Any?): Boolean { | ||
| contract { | ||
| returns(true) implies (value != null) | ||
| } | ||
| return value != null | ||
| } | ||
|
|
||
| private fun funC(): String { | ||
| return "A.funC body" | ||
| } | ||
|
|
||
| fun funD() = 1 + 2 | ||
| } | ||
|
|
||
| interface B { | ||
| fun funA(): String { | ||
| "B.funA body" | ||
| } | ||
|
|
||
| fun funB(): String | ||
| } | ||
|
|
||
| class C: B { | ||
| override fun funB(): String { | ||
| return "C.funB body" | ||
| } | ||
| } | ||
|
|
||
| /* GENERATED_FIR_TAGS: classDeclaration, classReference, contractConditionalEffect, contracts, functionDeclaration, | ||
| inline, interfaceDeclaration, nullableType, override, stringLiteral */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| FILE: functionDeclaration.kt | ||
| public final fun funA(): R|kotlin/String| | ||
| public final inline fun funB(): R|kotlin/String| { | ||
| ^funB String(funB body) | ||
| } | ||
| @R|kotlin/OptIn|(markerClass = vararg(<getClass>(Q|kotlin/contracts/ExperimentalContracts|))) public final fun isNotNull(value: R|kotlin/Any?|): R|kotlin/Boolean| | ||
| [R|Contract description] | ||
| < | ||
| Returns(TRUE) -> value != null | ||
| > | ||
|
|
||
| private final fun funC(): R|kotlin/String| | ||
| public final fun funD(): R|kotlin/Int| |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // RUN_PIPELINE_TILL: BACKEND | ||
| // FIR_DUMP | ||
| import kotlin.contracts.ExperimentalContracts | ||
| import kotlin.contracts.contract | ||
|
|
||
| fun funA(): String { | ||
| return "funA body" | ||
| } | ||
|
|
||
| inline fun funB: String { | ||
| return "funB body" | ||
| } | ||
|
|
||
| @OptIn(ExperimentalContracts::class) | ||
| fun isNotNull(value: Any?): Boolean { | ||
| contract { | ||
| returns(true) implies (value != null) | ||
| } | ||
| return value != null | ||
| } | ||
|
|
||
| private fun funC(): String { | ||
| return "funC body" | ||
| } | ||
|
|
||
| fun funD() = 1 + 2 | ||
|
|
||
| /* GENERATED_FIR_TAGS: classReference, contractConditionalEffect, contracts, functionDeclaration, inline, nullableType, | ||
| stringLiteral */ |
Uh oh!
There was an error while loading. Please reload this page.