2015-03-02 23:41:44 +01:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
////class Base {
|
|
|
|
//// private privateMethod() { }
|
|
|
|
//// private privateProperty;
|
|
|
|
////
|
|
|
|
//// protected protectedMethod() { }
|
|
|
|
//// protected protectedProperty;
|
|
|
|
////
|
|
|
|
//// public publicMethod() { }
|
|
|
|
//// public publicProperty;
|
|
|
|
////
|
|
|
|
//// protected protectedOverriddenMethod() { }
|
|
|
|
//// protected protectedOverriddenProperty;
|
|
|
|
////
|
|
|
|
//// test() {
|
|
|
|
//// this./*1*/;
|
|
|
|
////
|
|
|
|
//// var b: Base;
|
|
|
|
//// var c: C1;
|
|
|
|
////
|
|
|
|
//// b./*2*/;
|
|
|
|
//// c./*3*/;
|
|
|
|
//// }
|
|
|
|
////}
|
|
|
|
////
|
|
|
|
////class C1 extends Base {
|
|
|
|
//// protected protectedOverriddenMethod() { }
|
|
|
|
//// protected protectedOverriddenProperty;
|
|
|
|
////}
|
|
|
|
|
|
|
|
|
|
|
|
// Same class, everything is visible
|
2015-10-06 19:03:27 +02:00
|
|
|
goTo.marker("1");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains('privateMethod');
|
|
|
|
verify.completionListContains('privateProperty');
|
|
|
|
verify.completionListContains('protectedMethod');
|
|
|
|
verify.completionListContains('protectedProperty');
|
|
|
|
verify.completionListContains('publicMethod');
|
|
|
|
verify.completionListContains('publicProperty');
|
|
|
|
verify.completionListContains('protectedOverriddenMethod');
|
|
|
|
verify.completionListContains('protectedOverriddenProperty');
|
2015-03-02 23:41:44 +01:00
|
|
|
|
|
|
|
goTo.marker("2");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains('privateMethod');
|
|
|
|
verify.completionListContains('privateProperty');
|
|
|
|
verify.completionListContains('protectedMethod');
|
|
|
|
verify.completionListContains('protectedProperty');
|
|
|
|
verify.completionListContains('publicMethod');
|
|
|
|
verify.completionListContains('publicProperty');
|
|
|
|
verify.completionListContains('protectedOverriddenMethod');
|
|
|
|
verify.completionListContains('protectedOverriddenProperty');
|
2015-03-02 23:41:44 +01:00
|
|
|
|
|
|
|
// Can not access protected properties overridden in subclass
|
|
|
|
goTo.marker("3");
|
2016-12-07 22:36:11 +01:00
|
|
|
verify.completionListContains('privateMethod');
|
|
|
|
verify.completionListContains('privateProperty');
|
|
|
|
verify.completionListContains('protectedMethod');
|
|
|
|
verify.completionListContains('protectedProperty');
|
|
|
|
verify.completionListContains('publicMethod');
|
|
|
|
verify.completionListContains('publicProperty');
|
|
|
|
verify.not.completionListContains('protectedOverriddenMethod');
|
|
|
|
verify.not.completionListContains('protectedOverriddenProperty');
|