aboutsummaryrefslogtreecommitdiff
path: root/tests/icon/reject/begin_unknown_function.zc
blob: 6a8e5b32c9fb3f07cb442326c33cc76a91538a66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
include rt;
include run;
include icon;
fn main() {
	// an address that is no function has no tokens to step: no frame, error status 4
	let frame = icon.begin_function(12345);
	rt.put_n(frame == 0); rt.put_c(' '); rt.put_n(icon.error()); rt.put_c(' ');
	// stepping or reading a missing frame does nothing
	rt.put_n(icon.step(0)); rt.put_c(10);
	return 0;
}