New baselines.

This commit is contained in:
Anders Hejlsberg 2014-07-16 16:15:10 -07:00
parent 70f8057dc7
commit bc0be761cd
17 changed files with 129 additions and 293 deletions

View File

@ -13,12 +13,10 @@
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
module X.Y {
export module Point {
~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! A module declaration cannot be in a different file from a class or function with which it is merged
export var Origin = new Point(0, 0);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! Module declaration cannot be in different file from class or function with which it is merged
}
==== tests/cases/conformance/internalModules/DeclarationMerging/test.ts (0 errors) ====

View File

@ -8,12 +8,10 @@
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
module A {
export module Point {
~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! A module declaration cannot be in a different file from a class or function with which it is merged
export var Origin = { x: 0, y: 0 };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! Module declaration cannot be in different file from class or function with which it is merged
}
==== tests/cases/conformance/internalModules/DeclarationMerging/test.ts (1 errors) ====

View File

@ -1,12 +1,10 @@
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
module X.Y {
export module Point {
~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! A module declaration cannot be in a different file from a class or function with which it is merged
export var Origin = new Point(0, 0);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! Module declaration cannot be in different file from class or function with which it is merged
}
==== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts (0 errors) ====
@ -24,12 +22,10 @@
==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ====
module A {
~~~~~~~~~~
~
!!! A module declaration cannot be located prior to a class or function with which it is merged
export var Instance = new A();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~
!!! Module declaration cannot be located prior to class or function with which it is merged
// duplicate identifier
class A {

View File

@ -1,12 +1,10 @@
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
module A {
export module Point {
~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! A module declaration cannot be in a different file from a class or function with which it is merged
export var Origin = { x: 0, y: 0 };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! Module declaration cannot be in different file from class or function with which it is merged
}
==== tests/cases/conformance/internalModules/DeclarationMerging/function.ts (0 errors) ====
@ -21,12 +19,10 @@
module B {
export module Point {
~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
export var Origin = { x: 0, y: 0 };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
// duplicate identifier error
export function Point() {

View File

@ -72,13 +72,13 @@
// Ambient external module not in the global module
module M2 {
declare module 'nope' { }
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
// Ambient external module with a string literal name that isn't a top level external module name
declare module '../foo' { }
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~
!!! Ambient external module declaration cannot specify relative module name.
// Ambient external module with export assignment and other exported members

View File

@ -4,12 +4,10 @@
export = D;
declare module "ext" {
~~~~~~~~~~~~~~~~~~~~~~
export class C { }
~~~~~~~~~~~~~~~~~~~~~~
}
~
~~~~~
!!! Ambient external modules cannot be nested in other modules.
export class C { }
}
// Cannot resolve this ext module reference
import ext = require("ext");

View File

@ -1,16 +1,12 @@
==== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts (2 errors) ====
declare module "./relativeModule" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var x: string;
~~~~~~~~~~~~~~~~~~
}
~
~~~~~~~~~~~~~~~~~~
!!! Ambient external module declaration cannot specify relative module name.
var x: string;
}
declare module ".\\relativeModule" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
!!! Ambient external module declaration cannot specify relative module name.
var x: string;
~~~~~~~~~~~~~~~~~~
}
~
!!! Ambient external module declaration cannot specify relative module name.
}

View File

@ -30,13 +30,13 @@
function m2() { }; // ok since the module is not instantiated
module m2a { var y = 2; }
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
function m2a() { }; // error since the module is instantiated
module m2b { export var y = 2; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
function m2b() { }; // error since the module is instantiated
// should be errors to have function first
@ -60,8 +60,8 @@
class m3 { } // ok since the module is not instantiated
module m3a { var y = 2; }
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
class m3a { foo() { } } // error, class isn't ambient or declared before the module
class m3b { foo() { } }

View File

@ -4,21 +4,21 @@
function m2() { }; // ok since the module is not instantiated
module m2a { var y = 2; }
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
function m2a() { }; // error since the module is instantiated
module m2b { export var y = 2; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
function m2b() { }; // error since the module is instantiated
function m2c() { };
module m2c { export var y = 2; }
module m2cc { export var y = 2; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
~~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
function m2cc() { }; // error to have module first
module m2d { }

View File

@ -4,6 +4,6 @@
class m3 { } // ok since the module is not instantiated
module m3a { var y = 2; }
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
~~~
!!! A module declaration cannot be located prior to a class or function with which it is merged
class m3a { foo() { } } // error, class isn't ambient or declared before the module

View File

@ -3,10 +3,8 @@
==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ====
module D {
~~~~~~~~~~
~
!!! A module declaration cannot be in a different file from a class or function with which it is merged
export var y = "hi";
~~~~~~~~~~~~~~~~~~~~~~~~
}
~
!!! Module declaration cannot be in different file from class or function with which it is merged
D.y;

View File

@ -3,10 +3,8 @@
==== tests/cases/compiler/funduleSplitAcrossFiles_module.ts (1 errors) ====
module D {
~~~~~~~~~~
~
!!! A module declaration cannot be in a different file from a class or function with which it is merged
export var y = "hi";
~~~~~~~~~~~~~~~~~~~~~~~~
}
~
!!! Module declaration cannot be in different file from class or function with which it is merged
D.y;

View File

@ -5,12 +5,10 @@
~~~~~~~~~~~~~~~~
!!! Cannot find external module 'externalModule'.
declare module "m1" {
~~~~~~~~~~~~~~~~~~~~~
~~~~
!!! Ambient external modules cannot be nested in other modules.
import im2 = require("externalModule");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
!!! Cannot find external module 'externalModule'.
}
~
!!! Ambient external modules cannot be nested in other modules.

View File

@ -1,17 +1,12 @@
==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (2 errors) ====
module A.B.C {
~~~
~
!!! A module declaration cannot be located prior to a class or function with which it is merged
export class Point {
~~~~~~~~~~~~~~~~~~~~~~~~
x: number;
~~~~~~~~~~~~~~~~~~
y: number;
~~~~~~~~~~~~~~~~~~
}
~~~~~
}
~
!!! Module declaration cannot be located prior to class or function with which it is merged
module A {
export module B {

View File

@ -18,12 +18,10 @@
!!! Duplicate identifier 'z'.
module y {
~~~~~~~~~~
~
!!! A module declaration cannot be located prior to a class or function with which it is merged
var b;
~~~~~~~~~~~~~~
}
~~~~~
!!! Module declaration cannot be located prior to class or function with which it is merged
class y { } // error

View File

@ -23,36 +23,24 @@
declare export module "m1_M3_public" {
~~~~~~
!!! 'export' modifier must precede 'declare' modifier.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
declare module "m1_M4_private" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
import m1_im1_private = m1_M1_public;
export var m1_im1_private_v1_public = m1_im1_private.c1;
@ -177,24 +165,21 @@
declare module "abc" {
~~~~~~~
!!! A 'declare' modifier cannot be used in an already ambient context.
~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
}
module m2 {
module "abc2" {
~~~~~~~~~~~~~~~
}
~~~~~~~~~
~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
}
module "abc3" {
~~~~~~~~~~~~~~~
}
~~~~~
~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
}
module m2 {

View File

@ -21,36 +21,24 @@
}
export declare module "m1_M3_public" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
declare module "m1_M4_private" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
import m1_im1_private = m1_M1_public;
export var m1_im1_private_v1_public = m1_im1_private.c1;
@ -133,36 +121,24 @@
}
export declare module "m2_M3_public" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
declare module "m2_M4_private" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
import m1_im1_private = m2_M1_public;
export var m1_im1_private_v1_public = m1_im1_private.c1;
@ -235,20 +211,14 @@
}
export declare module "glo_M2_public" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~
}
~
~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
export module glo_M3_private {
export class c1 {
@ -261,20 +231,14 @@
}
export declare module "glo_M4_private" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export function f1();
~~~~~~~~~~~~~~~~~~~~~~~~~
export class c1 {
~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
export var v1: { new (): c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var v2: c1;
~~~~~~~~~~~~~~~~~~~~~~
}
~
~~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
export function f1();
export class c1 {
}
export var v1: { new (): c1; };
export var v2: c1;
}
import glo_im1_private = glo_M1_public;
@ -334,217 +298,135 @@
export declare module "use_glo_M1_public" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
import use_glo_M1_public = glo_M1_public;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M1_public_v1_public: { new (): use_glo_M1_public.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M1_public_v2_public: use_glo_M1_public;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
!!! Cannot find name 'use_glo_M1_public'.
export var use_glo_M1_public_v3_public: () => use_glo_M1_public.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M1_public_v1_private: { new (): use_glo_M1_public.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M1_public_v2_private: use_glo_M1_public;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
!!! Cannot find name 'use_glo_M1_public'.
var use_glo_M1_public_v3_private: () => use_glo_M1_public.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import use_glo_M2_public = require("glo_M2_public");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
!!! Cannot find external module 'glo_M2_public'.
export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M2_public_v2_public: use_glo_M2_public;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M2_public_v1_private: { new (): use_glo_M2_public.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M2_public_v2_private: use_glo_M2_public;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M2_public_v3_private: () => use_glo_M2_public.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
module m2 {
~~~~~~~~~~~~~~~
import errorImport = require("glo_M2_public");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Import declarations in an internal module cannot reference an external module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import nonerrorImport = glo_M1_public;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
module m5 {
~~~~~~~~~~~~~~~~~~~
import m5_errorImport = require("glo_M2_public");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Import declarations in an internal module cannot reference an external module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import m5_nonerrorImport = glo_M1_public;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
}
~~~~~
}
~
!!! Ambient external modules cannot be nested in other modules.
declare module "use_glo_M3_private" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
import use_glo_M3_private = glo_M3_private;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M3_private_v1_public: { new (): use_glo_M3_private.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M3_private_v2_public: use_glo_M3_private;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
!!! Cannot find name 'use_glo_M3_private'.
export var use_glo_M3_private_v3_public: () => use_glo_M3_private.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M3_private_v1_private: { new (): use_glo_M3_private.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M3_private_v2_private: use_glo_M3_private;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
!!! Cannot find name 'use_glo_M3_private'.
var use_glo_M3_private_v3_private: () => use_glo_M3_private.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import use_glo_M4_private = require("glo_M4_private");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
!!! Cannot find external module 'glo_M4_private'.
export var use_glo_M4_private_v1_public: { new (): use_glo_M4_private.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M4_private_v2_public: use_glo_M4_private;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export var use_glo_M4_private_v3_public: () => use_glo_M4_private.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M4_private_v1_private: { new (): use_glo_M4_private.c1; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M4_private_v2_private: use_glo_M4_private;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var use_glo_M4_private_v3_private: () => use_glo_M4_private.c1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
module m2 {
~~~~~~~~~~~~~~~
import errorImport = require("glo_M4_private");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Import declarations in an internal module cannot reference an external module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import nonerrorImport = glo_M3_private;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
module m5 {
~~~~~~~~~~~~~~~~~~~
import m5_errorImport = require("glo_M4_private");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Import declarations in an internal module cannot reference an external module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import m5_nonerrorImport = glo_M3_private;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
}
~~~~~
}
~
!!! Ambient external modules cannot be nested in other modules.
declare module "anotherParseError" {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
module m2 {
~~~~~~~~~~~~~~~
declare module "abc" {
~~~~~~~
!!! A 'declare' modifier cannot be used in an already ambient context.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
~~~~~~~~~
~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
}
~~~~~
module m2 {
~~~~~~~~~~~~~~~
module "abc2" {
~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~~~~~~~~~
~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~~~~~
module "abc3" {
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~~~~~
~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~
!!! Ambient external modules cannot be nested in other modules.
declare export module "anotherParseError2" {
~~~~~~
!!! 'export' modifier must precede 'declare' modifier.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
module m2 {
~~~~~~~~~~~~~~~
declare module "abc" {
~~~~~~~
!!! A 'declare' modifier cannot be used in an already ambient context.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~~~~~
~~~~~~~~~
~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
}
~~~~~
module m2 {
~~~~~~~~~~~~~~~
module "abc2" {
~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~~~~~~~~~
~~~~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~~~~~
module "abc3" {
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
~~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~~~~~
~~~~~
!!! Ambient external modules cannot be nested in other modules.
}
~
!!! Ambient external modules cannot be nested in other modules.
module m2 {
import m3 = require("use_glo_M1_public");