TypeScript/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.errors.txt

34 lines
1.4 KiB
Plaintext
Raw Normal View History

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'.
2014-07-13 01:04:16 +02:00
==== 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'.
2014-07-13 01:04:16 +02:00
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'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/propertyIdentityWithPrivacyMismatch_0.ts (0 errors) ====
declare module 'mod1' {
class Foo {
private n;
}
}
declare module 'mod2' {
class Foo {
private n;
}
}