This commit is contained in:
dcode
2019-03-27 15:05:45 +01:00
parent bb1609c9ea
commit f7ad5f85ca
15 changed files with 9983 additions and 1295 deletions

View File

@ -8091,6 +8091,13 @@ export class Compiler extends DiagnosticEmitter {
var options = this.options;
var classType = classInstance.type;
if (!program.allocateMem) {
this.error(
DiagnosticCode.An_allocator_must_be_present_to_use_0,
reportNode.range, "new"
);
}
if (classInstance.hasDecorator(DecoratorFlags.UNMANAGED)) {
// memory.allocate(sizeof<T>())
this.currentType = classType;