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:
Alan Pierce
2018-05-22 03:09:05 -07:00
committed by Daniel Wirtz
parent edf4aaa966
commit 558ed78cc9
5 changed files with 46 additions and 0 deletions

View 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;
}