Interpolated string with non-existing variable doesn't break

I have the following test code:

var test := 123.456;
writeLn($"Value is: {testu}");

One might expect that this would break, but instead it just assumes “test” and outputs the value of it.

I do get a warning saying “Did you mean test”, but I would expect an error.

Afaik this behaviour only occurs when there’s one character after the variable name. It does break when I use more, like:

var test := 123.456;
writeLn($"Value is: {testuu}");

Tested in Fire on 2524.

It is an error, but a recoverable one. You have the “Treat Fixable Errors as Warnings” option on.

1 Like

I’m quickly going to turn that off then. Errors are my honest friends. :slight_smile:

1 Like