Make constructor parameter a property: additional test for private property in superclass
(cherry picked from commit dd30bd5)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
838cfc7dca
commit
9830140a15
@@ -0,0 +1,10 @@
|
||||
// "Make constructor parameter a property" "false"
|
||||
// ERROR: Cannot access 'foo': it is invisible (private in a supertype) in 'A'
|
||||
|
||||
open class Base(private val foo: String)
|
||||
|
||||
class A(foo: String) : Base(foo) {
|
||||
fun bar() {
|
||||
val a = foo<caret>
|
||||
}
|
||||
}
|
||||
@@ -5361,6 +5361,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("override.kt")
|
||||
public void testOverride() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeConstructorParameterProperty/override.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("val.kt")
|
||||
public void testVal() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeConstructorParameterProperty/val.kt");
|
||||
|
||||
Reference in New Issue
Block a user