File: propertyIdentityWithPrivacyMismatch.errors.txt

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (36 lines) | stat: -rw-r--r-- 1,648 bytes parent folder | download | duplicates (4)
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
tests/cases/compiler/propertyIdentityWithPrivacyMismatch_1.ts(5,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'x' must be of type 'Foo', but here has type 'Foo'.
tests/cases/compiler/propertyIdentityWithPrivacyMismatch_1.ts(13,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'y' must be of type 'Foo1', but here has type 'Foo2'.


==== tests/cases/compiler/propertyIdentityWithPrivacyMismatch_1.ts (2 errors) ====
    ///<reference path='propertyIdentityWithPrivacyMismatch_0.ts'/>
    import m1 = require('mod1');
    import m2 = require('mod2');
    var x: m1.Foo;
    var x: m2.Foo; // Should be error (mod1.Foo !== mod2.Foo)
        ~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'x' must be of type 'Foo', but here has type 'Foo'.
!!! related TS6203 tests/cases/compiler/propertyIdentityWithPrivacyMismatch_1.ts:4:5: 'x' was also declared here.
    class Foo1 {
        private n;
    }
    class Foo2 {
        private n;
    }
    var y: Foo1;
    var y: Foo2;
        ~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'y' must be of type 'Foo1', but here has type 'Foo2'.
!!! related TS6203 tests/cases/compiler/propertyIdentityWithPrivacyMismatch_1.ts:12:5: 'y' was also declared here.
==== tests/cases/compiler/propertyIdentityWithPrivacyMismatch_0.ts (0 errors) ====
    declare module 'mod1' {
        class Foo {
            private n;
        }
    }
    declare module 'mod2' {
        class Foo {
            private n;
        }
    }