![]() Previously, a type assertion on a nil interface would result in an out-of-bounds operand access, as we assumed it was a ptrtoint. This would usually result in an undefined value which happens not to have the same name as the asserted type (and therefore the assertion fails as expected). However, with an LLVM build with asserts, LLVM throws an assertion error: ``` interp.test: /home/niaow/go/src/github.com/tinygo-org/tinygo/llvm-project/llvm/include/llvm/IR/User.h:170: llvm::Value* llvm::User::getOperand(unsigned int) const: Assertion `i < NumUserOperands && "getOperand() out of range!"' failed. ``` This change handles a type code of 0 specially. |
||
---|---|---|
.. | ||
alloc.ll | ||
alloc.out.ll | ||
basic.ll | ||
basic.out.ll | ||
consteval.ll | ||
consteval.out.ll | ||
interface.ll | ||
interface.out.ll | ||
phi.ll | ||
phi.out.ll | ||
revert.ll | ||
revert.out.ll | ||
slice-copy.ll | ||
slice-copy.out.ll |