8000 Add a check for dereferencing dyn* · repos-javascript-compilers/LLJS@77df6ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 77df6ae

Browse files
committed
Add a check for dereferencing dyn*
1 parent 7dcd206 commit 77df6ae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,7 @@
10411041

10421042
if (op === "*") {
10431043
check(this, ty instanceof PointerType, "cannot dereference non-pointer type " + quote(tystr(ty, 0)));
1044+
check(this, ty.base, "cannot dereference " + quote(tystr(ty, 0)));
10441045
return cast(this, ty.base);
10451046
}
10461047

0 commit comments

Comments
 (0)
0