Error Lab
Every diagnostic below is the real output of ptc, not a mock-up. Pick a mistake, read how the compiler teaches the canonical form, then flip to the fix.
No implicit conversions
Mixing Int and Float silently is a classic source of rounding surprises. POLYTONE asks you to pick the numeric world you want.
let price = 10 + 2.5The compiler answers
error: expected Int, found Float (line 1, column 18)let price = 10.0 + 2.5
print("{price}")Fixed — and it runs
12.5