Skip to content

Commit 7ada77c

Browse files
authored
Fixed stdlib builtins not working with typedoc (#1894)
* Fixed stdlib builtins not working with typedoc * Added the changetype instead of zero * Made suggested changes
1 parent 42883cb commit 7ada77c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

std/assembly/builtins.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export declare function select<T>(ifTrue: T, ifFalse: T, condition: bool): T;
170170

171171
// @ts-ignore: decorator
172172
@unsafe @builtin
173-
export declare function unreachable(): void;
173+
export declare function unreachable(): auto;
174174

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

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

23072307
// @ts-ignore: decorator
23082308
@builtin

0 commit comments

Comments
 (0)