Skip to content

Commit

Permalink
Fixed stdlib builtins not working with typedoc (AssemblyScript#1894)
Browse files Browse the repository at this point in the history
* Fixed stdlib builtins not working with typedoc

* Added the changetype instead of zero

* Made suggested changes
  • Loading branch information
torch2424 authored Jun 9, 2021
1 parent 42883cb commit 7ada77c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/assembly/builtins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export declare function select<T>(ifTrue: T, ifFalse: T, condition: bool): T;

// @ts-ignore: decorator
@unsafe @builtin
export declare function unreachable(): void;
export declare function unreachable(): auto;

// @ts-ignore: decorator
@builtin
Expand Down Expand Up @@ -2302,7 +2302,7 @@ export abstract class i31 { // FIXME: usage of 'new' requires a class :(

// @ts-ignore: decorator
@builtin
static new(value: i32): i31ref { return unreachable(); }
static new(value: i32): i31ref { return changetype<i31ref>(unreachable()); }

// @ts-ignore: decorator
@builtin
Expand Down

0 comments on commit 7ada77c

Please sign in to comment.