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.
One way to build text
String concatenation with + competes with interpolation and formats — two spellings for one idea. POLYTONE keeps only interpolation.
let greeting = "Hello, " + "world"The compiler answers
error: there is no '+' on Text — concatenate with interpolation: "{a}{b}" (line 1, column 16)let who = "world"
let greeting = "Hello, {who}"
print(greeting)Fixed — and it runs
Hello, world