161 lines
7.4 KiB
Text
161 lines
7.4 KiB
Text
=== tests/cases/conformance/expressions/superPropertyAccess/superPropertyAccessNoError.ts ===
|
|
//super.publicInstanceMemberFunction in constructor of derived class
|
|
//super.publicInstanceMemberFunction in instance member function of derived class
|
|
//super.publicInstanceMemberFunction in instance member accessor(get and set) of derived class
|
|
//super.publicInstanceMemberFunction in lambda in member function
|
|
//super.publicStaticMemberFunction in static member function of derived class
|
|
//super.publicStaticMemberFunction in static member accessor(get and set) of derived class
|
|
|
|
|
|
class SomeBaseClass {
|
|
>SomeBaseClass : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
|
|
public func() {
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
|
|
return '';
|
|
}
|
|
|
|
static func() {
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 11, 5))
|
|
|
|
return 3;
|
|
}
|
|
|
|
returnThis() {
|
|
>returnThis : Symbol(SomeBaseClass.returnThis, Decl(superPropertyAccessNoError.ts, 15, 5))
|
|
|
|
return this;
|
|
>this : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
}
|
|
}
|
|
|
|
class SomeDerivedClass extends SomeBaseClass {
|
|
>SomeDerivedClass : Symbol(SomeDerivedClass, Decl(superPropertyAccessNoError.ts, 20, 1))
|
|
>SomeBaseClass : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
|
|
constructor() {
|
|
super();
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
|
|
var x = super.func();
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 25, 11), Decl(superPropertyAccessNoError.ts, 26, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
|
|
var x: string;
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 25, 11), Decl(superPropertyAccessNoError.ts, 26, 11))
|
|
}
|
|
|
|
fn() {
|
|
>fn : Symbol(SomeDerivedClass.fn, Decl(superPropertyAccessNoError.ts, 27, 5))
|
|
|
|
var x = super.func();
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 30, 11), Decl(superPropertyAccessNoError.ts, 31, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
|
|
var x: string;
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 30, 11), Decl(superPropertyAccessNoError.ts, 31, 11))
|
|
|
|
var y = () => super.func();
|
|
>y : Symbol(y, Decl(superPropertyAccessNoError.ts, 32, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
}
|
|
|
|
get a() {
|
|
>a : Symbol(SomeDerivedClass.a, Decl(superPropertyAccessNoError.ts, 33, 5), Decl(superPropertyAccessNoError.ts, 39, 5))
|
|
|
|
var x = super.func();
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 36, 11), Decl(superPropertyAccessNoError.ts, 37, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
|
|
var x: string;
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 36, 11), Decl(superPropertyAccessNoError.ts, 37, 11))
|
|
|
|
return null;
|
|
}
|
|
|
|
set a(n) {
|
|
>a : Symbol(SomeDerivedClass.a, Decl(superPropertyAccessNoError.ts, 33, 5), Decl(superPropertyAccessNoError.ts, 39, 5))
|
|
>n : Symbol(n, Decl(superPropertyAccessNoError.ts, 41, 10))
|
|
|
|
var x = super.func();
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 42, 11), Decl(superPropertyAccessNoError.ts, 43, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 8, 21))
|
|
|
|
var x: string;
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 42, 11), Decl(superPropertyAccessNoError.ts, 43, 11))
|
|
}
|
|
|
|
static fn() {
|
|
>fn : Symbol(SomeDerivedClass.fn, Decl(superPropertyAccessNoError.ts, 44, 5))
|
|
|
|
var x = super.func();
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 47, 11), Decl(superPropertyAccessNoError.ts, 48, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 11, 5))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 11, 5))
|
|
|
|
var x: number;
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 47, 11), Decl(superPropertyAccessNoError.ts, 48, 11))
|
|
}
|
|
|
|
static get a() {
|
|
>a : Symbol(SomeDerivedClass.a, Decl(superPropertyAccessNoError.ts, 49, 5), Decl(superPropertyAccessNoError.ts, 55, 5))
|
|
|
|
var x = super.func();
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 52, 11), Decl(superPropertyAccessNoError.ts, 53, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 11, 5))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 11, 5))
|
|
|
|
var x: number;
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 52, 11), Decl(superPropertyAccessNoError.ts, 53, 11))
|
|
|
|
return null;
|
|
}
|
|
|
|
static set a(n) {
|
|
>a : Symbol(SomeDerivedClass.a, Decl(superPropertyAccessNoError.ts, 49, 5), Decl(superPropertyAccessNoError.ts, 55, 5))
|
|
>n : Symbol(n, Decl(superPropertyAccessNoError.ts, 57, 17))
|
|
|
|
var x = super.func();
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 58, 11), Decl(superPropertyAccessNoError.ts, 59, 11))
|
|
>super.func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 11, 5))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>func : Symbol(SomeBaseClass.func, Decl(superPropertyAccessNoError.ts, 11, 5))
|
|
|
|
var x: number;
|
|
>x : Symbol(x, Decl(superPropertyAccessNoError.ts, 58, 11), Decl(superPropertyAccessNoError.ts, 59, 11))
|
|
}
|
|
|
|
returnThis() {
|
|
>returnThis : Symbol(SomeDerivedClass.returnThis, Decl(superPropertyAccessNoError.ts, 60, 5))
|
|
|
|
return super.returnThis();
|
|
>super.returnThis : Symbol(SomeBaseClass.returnThis, Decl(superPropertyAccessNoError.ts, 15, 5))
|
|
>super : Symbol(SomeBaseClass, Decl(superPropertyAccessNoError.ts, 0, 0))
|
|
>returnThis : Symbol(SomeBaseClass.returnThis, Decl(superPropertyAccessNoError.ts, 15, 5))
|
|
}
|
|
}
|
|
|
|
let instance = new SomeDerivedClass();
|
|
>instance : Symbol(instance, Decl(superPropertyAccessNoError.ts, 67, 3))
|
|
>SomeDerivedClass : Symbol(SomeDerivedClass, Decl(superPropertyAccessNoError.ts, 20, 1))
|
|
|
|
instance.returnThis().fn();
|
|
>instance.returnThis().fn : Symbol(SomeDerivedClass.fn, Decl(superPropertyAccessNoError.ts, 27, 5))
|
|
>instance.returnThis : Symbol(SomeDerivedClass.returnThis, Decl(superPropertyAccessNoError.ts, 60, 5))
|
|
>instance : Symbol(instance, Decl(superPropertyAccessNoError.ts, 67, 3))
|
|
>returnThis : Symbol(SomeDerivedClass.returnThis, Decl(superPropertyAccessNoError.ts, 60, 5))
|
|
>fn : Symbol(SomeDerivedClass.fn, Decl(superPropertyAccessNoError.ts, 27, 5))
|
|
|