summaryrefslogtreecommitdiff
path: root/test/trunccast.myr
blob: 11e96e81c1821236b15fc92a959a1225ed29c60b (plain)
1
2
3
4
5
6
7
8
9
10
use std
/* should truncate y when casting to x, exiting with status 15 */
const main = {
	var x : uint8
	var y : int32

	y = 9999
	x = y castto(uint8)
	std.exit((x % 73) castto(int))
}