summaryrefslogtreecommitdiff
path: root/test/trunccast.myr
blob: fa5c4d0a1c021db482a6f0f12773bbdd5822ea5b (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 : int8
	var y : int32

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