mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-27 16:02:16 +00:00
21 lines
429 B
TypeScript
21 lines
429 B
TypeScript
import { register_count, link_count, unlink_count } from "./_dummy";
|
|
|
|
@start export function main(): void {}
|
|
|
|
class Ref {}
|
|
|
|
// should register only
|
|
|
|
var global: Ref = new Ref();
|
|
var globalRef = changetype<usize>(global);
|
|
assert(register_count == 1);
|
|
assert(link_count == 0);
|
|
assert(unlink_count == 0);
|
|
|
|
// should register only
|
|
|
|
global = new Ref();
|
|
assert(register_count == 2);
|
|
assert(link_count == 0);
|
|
assert(unlink_count == 0);
|