2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/qualify.ts (8 errors) ====
|
|
|
|
module M {
|
|
|
|
export var m=0;
|
|
|
|
export module N {
|
|
|
|
export var n=1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module M {
|
|
|
|
export module N {
|
|
|
|
var y=m;
|
|
|
|
var x=n+y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module T {
|
|
|
|
export interface I {
|
|
|
|
p;
|
|
|
|
}
|
|
|
|
export module U {
|
|
|
|
var z:I=3;
|
2014-07-19 02:30:06 +02:00
|
|
|
~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'number' is not assignable to type 'I':
|
|
|
|
!!! Property 'p' is missing in type 'Number'.
|
|
|
|
export interface I2 {
|
|
|
|
q;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module Peer {
|
|
|
|
export module U2 {
|
|
|
|
var z:T.U.I2=3;
|
2014-07-19 02:30:06 +02:00
|
|
|
~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'number' is not assignable to type 'I2':
|
|
|
|
!!! Property 'q' is missing in type 'Number'.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module Everest {
|
|
|
|
export module K1 {
|
|
|
|
export interface I3 {
|
|
|
|
zeep;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export module K2 {
|
|
|
|
export interface I4 {
|
|
|
|
z;
|
|
|
|
}
|
|
|
|
var v1:I4;
|
|
|
|
var v2:K1.I3=v1;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'I4' is not assignable to type 'I3':
|
|
|
|
!!! Property 'zeep' is missing in type 'I4'.
|
|
|
|
var v3:K1.I3[]=v1;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'I4' is not assignable to type 'I3[]':
|
|
|
|
!!! Property 'concat' is missing in type 'I4'.
|
|
|
|
var v4:()=>K1.I3=v1;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'I4' is not assignable to type '() => I3'.
|
|
|
|
var v5:(k:K1.I3)=>void=v1;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'I4' is not assignable to type '(k: I3) => void'.
|
|
|
|
var v6:{k:K1.I3;}=v1;
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'I4' is not assignable to type '{ k: I3; }':
|
|
|
|
!!! Property 'k' is missing in type 'I4'.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I {
|
|
|
|
k;
|
|
|
|
}
|
|
|
|
|
|
|
|
var y:I;
|
|
|
|
var x:T.I=y;
|
2014-07-19 02:30:06 +02:00
|
|
|
~
|
2014-07-13 01:04:16 +02:00
|
|
|
!!! Type 'I' is not assignable to type 'I':
|
|
|
|
!!! Property 'p' is missing in type 'I'.
|
|
|
|
|
|
|
|
|