mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-07 02:21:55 +00:00
fixes
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user