Labeled switch: glitch?

Zig beginner here. Using version 0.13.0-dev.211+6a65561e3 in Windows 11. When I try to run or compile this:

const std = @import("std");

pub fn main() void {
	const n: u8 = 2;
	sw: switch (n) {
		1 => continue :sw 4,
		2 => continue :sw 4,
		3 => continue :sw 4,
		4 => {
			std.debug.print("We're at prong 4!\n", .{});
		},
		else => {
			std.debug.print("We dropped into 'else'!\n", .{});
		}
	}
}

I get this:

error: expected ',' after switch prong 1 = continue :sw 4,

But the expected ‘,’ is plainly there. Am I missing something, or doing something wrong? Many thanks in advance.

Labeled switch was only introduced in Zig 0.14

1 Like

Aha. Well that answers that! :grinning_face: Thank you. :folded_hands: