mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
This doesn't yet call the constructor or use provided parameters and just allocates raw memory
16 lines
227 B
TypeScript
16 lines
227 B
TypeScript
class Simple {
|
|
field: i32;
|
|
}
|
|
|
|
class Generic<T> {
|
|
field: T;
|
|
}
|
|
|
|
@global
|
|
declare function allocate_memory(size: usize): usize;
|
|
|
|
export function test(): void {
|
|
var simple = new Simple();
|
|
var generic = new Generic<f64>();
|
|
}
|