mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-17 08:51:34 +00:00
Properly inline getters; Simplify blocks when last statement returns
This commit is contained in:
@ -7,12 +7,10 @@ export class Pointer<T> {
|
||||
return changetype<Pointer<T>>(offset);
|
||||
}
|
||||
|
||||
// FIXME: does not inline
|
||||
@inline get offset(): usize {
|
||||
return changetype<usize>(this);
|
||||
}
|
||||
|
||||
// FIXME: does not inline
|
||||
@inline get value(): T {
|
||||
return changetype<T>(changetype<usize>(this));
|
||||
}
|
||||
|
Reference in New Issue
Block a user