mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-22 03:01:55 +00:00
Add a more helpful error message when you haven't defined an allocator (#108)
Also adds a system for writing tests that assert that certain error codes are triggered so that I could test this.
This commit is contained in:
committed by
Daniel Wirtz
parent
edf4aaa966
commit
558ed78cc9
8
tests/compiler/new-without-allocator.ts
Normal file
8
tests/compiler/new-without-allocator.ts
Normal file
@ -0,0 +1,8 @@
|
||||
// Expect error: TS2304: Cannot find name 'allocate_memory'.
|
||||
// Expect error: AS214: An allocator must be declared to allocate memory. Try importing allocator/arena or allocator/tlsf.
|
||||
class A {}
|
||||
|
||||
export function test(): i32 {
|
||||
var a = new A();
|
||||
return 3;
|
||||
}
|
Reference in New Issue
Block a user