2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/primaryExpressionMods.ts(7,8): error TS2304: Cannot find name 'M'.
|
|
|
|
tests/cases/compiler/primaryExpressionMods.ts(11,8): error TS2304: Cannot find name 'm'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/primaryExpressionMods.ts (2 errors) ====
|
|
|
|
module M
|
|
|
|
{
|
|
|
|
export interface P { x: number; y: number; }
|
|
|
|
export var a = 1;
|
|
|
|
}
|
|
|
|
var p: M.P; // Used as ModuleName
|
|
|
|
var m: M = M; // Used as TypeName and PrimaryExpression (error on TypeName)
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'M'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var m2: typeof M = M; // Used as PrimaryExpression in TypeQuery
|
|
|
|
var x1 = M.a; // Used as PrimaryExpression
|
|
|
|
var x2 = m.a; // Same as M.a
|
|
|
|
var q: m.P; // Error
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'm'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|