File: cloduleStaticMembers.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (24 lines) | stat: -rw-r--r-- 825 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
tests/cases/compiler/cloduleStaticMembers.ts(6,18): error TS2341: Property 'x' is private and only accessible within class 'Clod'.
tests/cases/compiler/cloduleStaticMembers.ts(7,13): error TS2304: Cannot find name 'x'.
tests/cases/compiler/cloduleStaticMembers.ts(10,13): error TS2304: Cannot find name 'y'.


==== tests/cases/compiler/cloduleStaticMembers.ts (3 errors) ====
    class Clod {
        private static x = 10;
        public static y = 10;
    }
    module Clod {
        var p = Clod.x;
                     ~
!!! error TS2341: Property 'x' is private and only accessible within class 'Clod'.
        var q = x;
                ~
!!! error TS2304: Cannot find name 'x'.
    
        var s = Clod.y;
        var t = y; 
                ~
!!! error TS2304: Cannot find name 'y'.
    }