zeek/auxil/spicy/tests/hilti/optimization/peephole-error-push-pop.hlt
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

20 lines
411 B
Plaintext

# @TEST-EXEC: hiltic -V -p %INPUT >opt.hlt
# @TEST-EXEC: btest-diff opt.hlt
#
# @TEST-DOC: Test removal of redundant __error assignments.
module Test {
type Foo = struct {
method void test();
int<64> __error; # name is internal, hence compiling with -V; type does not matter
};
function void Foo::test() {
local int<64> __error;
(*self).__error = __error;
__error = (*self).__error;
}
}