2014-07-13 01:04:16 +02:00
|
|
|
// function then var
|
2014-10-01 02:15:18 +02:00
|
|
|
function y1() { } // error
|
2014-07-13 01:04:16 +02:00
|
|
|
var y1 = 1; // error
|
|
|
|
|
|
|
|
// function then function
|
2014-10-01 02:15:18 +02:00
|
|
|
function y2() { } // error
|
2014-07-13 01:04:16 +02:00
|
|
|
function y2() { } // error
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
function y2a() { } // error
|
2014-07-13 01:04:16 +02:00
|
|
|
var y2a = () => { } // error
|
|
|
|
|
|
|
|
// function then class
|
2014-10-01 02:15:18 +02:00
|
|
|
function y3() { } // error
|
2014-07-13 01:04:16 +02:00
|
|
|
class y3 { } // error
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
function y3a() { } // error
|
2014-07-13 01:04:16 +02:00
|
|
|
class y3a { public foo() { } } // error
|
|
|
|
|
|
|
|
// function then enum
|
2014-10-01 02:15:18 +02:00
|
|
|
function y4() { } // error
|
2014-07-13 01:04:16 +02:00
|
|
|
enum y4 { One } // error
|
|
|
|
|
|
|
|
// function then internal module
|
|
|
|
function y5() { }
|
|
|
|
module y5 { } // ok since module is not instantiated
|
|
|
|
|
|
|
|
function y5a() { }
|
|
|
|
module y5a { var y = 2; } // should be an error
|
|
|
|
|
|
|
|
function y5b() { }
|
|
|
|
module y5b { export var y = 3; } // should be an error
|
|
|
|
|
|
|
|
function y5c() { }
|
|
|
|
module y5c { export interface I { foo(): void } } // should be an error
|
|
|
|
|
|
|
|
// function then import, messes with other errors
|
|
|
|
//function y6() { }
|
|
|
|
//import y6 = require('');
|