mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
KT-5524 Support [platformName] annotation for class members
@platformName is now supported for final non-overriding class member functions (including property accessors). Front-end provides diagnostics for inapplicable annotation cases. Code generation updated: - ignore kotlin.platform.platformName annotation for Java class methods; - bridges generation generates proper JVM declarations in case of methods renamed with @platformName. @platformName-related tests added. #KT-5524 Fixed
This commit is contained in:
12
compiler/testData/codegen/boxWithJava/platformName/FakePlatformName.java
vendored
Normal file
12
compiler/testData/codegen/boxWithJava/platformName/FakePlatformName.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import kotlin.platform.platformName;
|
||||
|
||||
public class FakePlatformName {
|
||||
@platformName(name = "fake")
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
public String fake() {
|
||||
return "fake";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user