[fine] Tweak syntax for assertions to make me happier

This commit is contained in:
John Doty 2024-01-06 07:54:00 -08:00
parent 758aef4db9
commit 8835d9eaf2
12 changed files with 104 additions and 25 deletions

View file

@ -1,4 +1,4 @@
112 - "twenty five";
"twenty five" - 112;
// type-error: 4 cannot apply binary operator '-' to expressions of type 'f64' (on the left) and 'string' (on the right)
// type-error: 35 cannot apply binary operator '-' to expressions of type 'string' (on the left) and 'f64' (on the right)
// @type-error: 4 cannot apply binary operator '-' to expressions of type 'f64' (on the left) and 'string' (on the right)
// @type-error: 35 cannot apply binary operator '-' to expressions of type 'string' (on the left) and 'f64' (on the right)

View file

@ -1,2 +1,2 @@
if true { "blarg" } else { 23 }
// type-error: 0 the type of the `then` branch (string) must match the type of the `else` branch (f64)
// @type-error: 0 the type of the `then` branch (string) must match the type of the `else` branch (f64)

View file

@ -1,2 +1,2 @@
if 23 { "what" } else { "the" }
// type-error: 0 conditions must yield a boolean
// @type-error: 0 conditions must yield a boolean

View file

@ -1,2 +1,2 @@
if (if false { true }) { 32 } else { 23 }
// type-error: 4 the type of the `then` branch (bool) must match the type of the `else` branch (())
// @type-error: 4 the type of the `then` branch (bool) must match the type of the `else` branch (())

View file

@ -1,2 +1,2 @@
- "twenty five";
// type-error: 0 cannot apply unary operator '-' to value of type string
// @type-error: 0 cannot apply unary operator '-' to value of type string