File: statics.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 1,242 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
tests/cases/compiler/statics.ts(6,18): error TS2339: Property 'g' does not exist on type 'C'.
tests/cases/compiler/statics.ts(23,33): error TS2339: Property 'g' does not exist on type 'C'.


==== tests/cases/compiler/statics.ts (2 errors) ====
    module M {
        export class C {
            x: number;
            constructor(public c1: number, public c2: number, c3: number) {
                this.x = C.y+this.c1+this.c2+c3;
                this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub);
                     ~
!!! error TS2339: Property 'g' does not exist on type 'C'.
            }
    
            static priv=2;
            static pub=3;
            static y=C.priv;
            static f(n:number) {
                return "wow: "+(n+C.y+C.pub+C.priv);
    
            }        
        }
        var c=C.y;
        export function f() {
            var result="";
            result+=(c);
            result+=(new C(0,1,2).x);
            result+=(C.f(10));
            result+=(new C(5,10,20).g(C.y));
                                    ~
!!! error TS2339: Property 'g' does not exist on type 'C'.
            return result;
        }
    }
    
    M.f();