2014-07-13 01:04:16 +02:00
|
|
|
//// [tests/cases/compiler/propertyIdentityWithPrivacyMismatch.ts] ////
|
|
|
|
|
|
|
|
//// [propertyIdentityWithPrivacyMismatch_0.ts]
|
|
|
|
declare module 'mod1' {
|
|
|
|
class Foo {
|
|
|
|
private n;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
declare module 'mod2' {
|
|
|
|
class Foo {
|
|
|
|
private n;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [propertyIdentityWithPrivacyMismatch_1.ts]
|
|
|
|
///<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)
|
|
|
|
class Foo1 {
|
|
|
|
private n;
|
|
|
|
}
|
|
|
|
class Foo2 {
|
|
|
|
private n;
|
|
|
|
}
|
|
|
|
var y: Foo1;
|
|
|
|
var y: Foo2;
|
|
|
|
|
|
|
|
//// [propertyIdentityWithPrivacyMismatch_0.js]
|
|
|
|
//// [propertyIdentityWithPrivacyMismatch_1.js]
|
|
|
|
define(["require", "exports"], function (require, exports) {
|
|
|
|
var x;
|
2014-08-15 01:36:33 +02:00
|
|
|
var x; // Should be error (mod1.Foo !== mod2.Foo)
|
2014-07-13 01:04:16 +02:00
|
|
|
var Foo1 = (function () {
|
|
|
|
function Foo1() {
|
|
|
|
}
|
|
|
|
return Foo1;
|
|
|
|
})();
|
|
|
|
var Foo2 = (function () {
|
|
|
|
function Foo2() {
|
|
|
|
}
|
|
|
|
return Foo2;
|
|
|
|
})();
|
|
|
|
var y;
|
|
|
|
var y;
|
|
|
|
});
|