Regexp literal support; Properly resolve statically inherited members

This commit is contained in:
dcodeIO
2018-01-07 15:07:46 +01:00
parent d8fa04f910
commit 7c8670ac35
10 changed files with 169 additions and 88 deletions

View File

@ -212,6 +212,11 @@ export function compileCall(compiler: Compiler, prototype: FunctionPrototype, ty
case "isNaN": // isNaN<T>(value: T) -> bool
compiler.currentType = Type.bool;
// if (operands.length != 1) {
// compiler.error(DiagnosticCode.Expected_0_arguments_but_got_1, reportNode.range, "1", operands.length.toString(10));
// return module.createUnreachable();
// }
// TODO: infer type argument if omitted
if (!validateCall(compiler, typeArguments, 1, operands, 1, reportNode))
return module.createUnreachable();
if ((<Type[]>typeArguments)[0].isAnyInteger)