summaryrefslogtreecommitdiff
path: root/test/trunccast.myr
blob: 14f283ed32d932979edee2da1b1b97ed6bdb5b7e (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 : uint8)
	std.exit((x % 73 : int))
}