KtLightMethod(Field): use dummyDelegate to determine modifier properties
This commit is contained in:
@@ -91,7 +91,7 @@ sealed class KtLightFieldImpl<T: PsiField>(
|
||||
|
||||
override fun getModifierList() = _modifierList
|
||||
|
||||
override fun hasModifierProperty(@NonNls name: String) = clsDelegate.hasModifierProperty(name)
|
||||
override fun hasModifierProperty(@NonNls name: String) = (dummyDelegate ?: clsDelegate).hasModifierProperty(name)
|
||||
|
||||
override fun getText() = kotlinOrigin?.text ?: ""
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ class KtLightMethodImpl private constructor(
|
||||
|
||||
override fun getName() = dummyDelegate?.name ?: clsDelegate.name
|
||||
|
||||
override fun hasModifierProperty(name: String) = clsDelegate.hasModifierProperty(name)
|
||||
override fun hasModifierProperty(name: String) = (dummyDelegate ?: clsDelegate).hasModifierProperty(name)
|
||||
|
||||
override fun getThrowsList() = clsDelegate.throwsList
|
||||
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
public final class A {
|
||||
@kotlin.jvm.Transient
|
||||
@kotlin.jvm.Volatile
|
||||
@org.jetbrains.annotations.NotNull
|
||||
private transient volatile java.lang.String c;
|
||||
|
||||
@kotlin.jvm.Synchronized
|
||||
@kotlin.jvm.Strictfp
|
||||
public final synchronized strictfp void f() { /* compiled code */ }
|
||||
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final java.lang.String getC() { /* compiled code */ }
|
||||
|
||||
public final void setC(@org.jetbrains.annotations.NotNull java.lang.String p) { /* compiled code */ }
|
||||
|
||||
public A() { /* compiled code */ }
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// A
|
||||
|
||||
class A {
|
||||
@Synchronized
|
||||
@Strictfp
|
||||
fun f() {
|
||||
|
||||
}
|
||||
|
||||
@Transient
|
||||
@Volatile
|
||||
var c: String = ""
|
||||
}
|
||||
@@ -80,6 +80,12 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/compilationErrors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("AnnotationModifiers.kt")
|
||||
public void testAnnotationModifiers() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/AnnotationModifiers.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("SameName.kt")
|
||||
public void testSameName() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/SameName.kt");
|
||||
|
||||
Reference in New Issue
Block a user