Make constructor parameter a property: additional test for private property in superclass

(cherry picked from commit dd30bd5)
This commit is contained in:
Mikhail Glukhikh
2016-07-27 15:01:40 +03:00
committed by Mikhail Glukhikh
parent 838cfc7dca
commit 9830140a15
2 changed files with 16 additions and 0 deletions
@@ -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");