mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
35 lines
507 B
TypeScript
35 lines
507 B
TypeScript
//// [tests/cases/compiler/createArray.ts] ////
|
|
|
|
//// [createArray.ts]
|
|
var na=new number[];
|
|
|
|
class C {
|
|
}
|
|
|
|
new C[];
|
|
var ba=new boolean[];
|
|
var sa=new string[];
|
|
function f(s:string):number { return 0;
|
|
}
|
|
if (ba[14]) {
|
|
na[2]=f(sa[3]);
|
|
}
|
|
|
|
new C[1]; // not an error
|
|
|
|
//// [createArray.js]
|
|
"use strict";
|
|
var na = new number[];
|
|
class C {
|
|
}
|
|
new C[];
|
|
var ba = new boolean[];
|
|
var sa = new string[];
|
|
function f(s) {
|
|
return 0;
|
|
}
|
|
if (ba[14]) {
|
|
na[2] = f(sa[3]);
|
|
}
|
|
new C[1]; // not an error
|