aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/const_local.zc
blob: 83c423cabcb06f8e25f33d33e8360a55cfd3997f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// a local const without a type takes its initializer's type and can't be written.
include rt;
fn main() {
	const k = 6, j = k * 7;
	const half = 2.5;
	const name = "zc";
	int typed = j;
	rt.put_n(k); rt.put_c(32); rt.put_n(typed); rt.put_c(32);
	if (half > 2.0) rt.put_s(name);
	rt.put_c(10);
}