-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't generate
final
modifier on static interface methods produced …
…by @JvmStatic+@jvmoverloads from interface companion #KT-35716 Fixed
- Loading branch information
Mikhael Bogdanov
committed
Nov 2, 2020
1 parent
7d0e965
commit 7ec2d03
Showing
6 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// JVM_TARGET: 1.8 | ||
// TARGET_BACKEND: JVM | ||
|
||
// WITH_RUNTIME | ||
// FILE: Test.java | ||
|
||
class Test { | ||
|
||
public static String test1() { | ||
return A.sayHello(); | ||
} | ||
} | ||
|
||
// FILE: simpleCompanionObject.kt | ||
|
||
interface A { | ||
companion object { | ||
@JvmStatic | ||
@JvmOverloads | ||
fun sayHello(greeting: String = "OK"): String { | ||
return greeting | ||
} | ||
} | ||
} | ||
fun box(): String { | ||
if (Test.test1() != "OK") return "fail 1" | ||
|
||
return "OK" | ||
} |
5 changes: 5 additions & 0 deletions
5
compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.