mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-21 18:51:43 +00:00
Make sure constant locals are inlined, see #6
This commit is contained in:
8
tests/compiler/inlining.ts
Normal file
8
tests/compiler/inlining.ts
Normal file
@ -0,0 +1,8 @@
|
||||
const constantGlobal = 1;
|
||||
|
||||
export function test(): i32 {
|
||||
const constantLocal = 2;
|
||||
return constantGlobal + constantLocal;
|
||||
}
|
||||
|
||||
assert(test() == 3);
|
Reference in New Issue
Block a user