raz / commit 1d7fac9c

commit
1d7fac9c1fda8cdf2071ccbe4eeb584f3e53f73f
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
c1711418
One wording for two types that don't mix; constants shown as written

"I32 and I64 are different types", with help on converting when both
are numbers, replaces "different types: ..." and "can't combine ...".
"/" on integers says it divides reals, not integers, and shows the
same division with div. A constant without a type of its own is named
as written: "found 1.5", not "found a real constant".

patch · log

17 files changed, +85 -50

doc/compiler.md (history) modified +6 -4

@@ -8,11 +8,11 @@
88
99 | File | Lines | Code | What |
1010 |---|---|---|---|
11-| `src/diag.pas` | 249 | 178 | Messages: positions, source excerpts, colour, counts |
12-| `src/scan.pas` | 660 | 529 | Symbols, literals, comments, positions |
11+| `src/diag.pas` | 260 | 187 | Messages: positions, source excerpts, colour, counts |
12+| `src/scan.pas` | 659 | 529 | Symbols, literals, comments, positions |
1313 | `src/sym.pas` | 526 | 437 | Types, objects, scopes, layout |
1414 | `src/x64.pas` | 682 | 548 | Code buffer, chunks, fixups, line notes, instruction encoder |
15-| `src/gen.pas` | 1,492 | 1,303 | Items: loading, storing, copying, frames, calls |
15+| `src/gen.pas` | 1,512 | 1,318 | Items: loading, storing, copying, frames, calls |
1616 | `src/parse.pas` | 2,094 | 1,908 | Declarations, statements, expressions, built-ins, recovery |
1717 | `src/link.pas` | 131 | 95 | Tree shaking, layout, patching |
1818 | `src/elf.pas` | 425 | 351 | Static and dynamic ELF, symbol table, line numbers |
@@ -233,7 +233,9 @@
233233 An item also carries `pos`, the stretch of source it came from, which
234234 the parser sets as it reads an expression; an error about an item is
235235 reported there (`MarkAt(x.pos, ...)`), and one about two operands
236-across both (`Join(x.pos, y.pos)`).
236+across both (`Join(x.pos, y.pos)`). `What` names an item for a
237+message: a constant without a type of its own as it is written
238+(`found 1.5`), anything else by its type.
237239
238240 Three routines move items towards the machine. `Value` brings a value
239241 into `rax`, loading it with the one instruction its size needs.

src/diag.pas modified +11 -0

@@ -37,6 +37,7 @@
3737 function PathOf(f: longint): shortstring;
3838 function LineOf(const p: TPos): longint;
3939 function Join(const p, q: TPos): TPos;
40+function Source(const p: TPos): shortstring;
4041 procedure Error(const p: TPos; const msg: shortstring);
4142 procedure Warning(const p: TPos; const msg: shortstring);
4243 procedure Note(const p: TPos; const msg: shortstring);
@@ -185,6 +186,16 @@
185186 begin
186187 Join := p;
187188 Join.b := q.b;
189+end;
190+
191+{ The text at p, at most the 255 bytes a shortstring holds }
192+function Source(const p: TPos): shortstring;
193+var n: longint;
194+begin
195+ n := p.b - p.a;
196+ if n > 255 then n := 255;
197+ SetLength(Source, n);
198+ Move(files[p.f].buf[p.a], Source[1], n);
188199 end;
189200
190201 { Messages }

src/gen.pas modified +37 -17

@@ -66,6 +66,7 @@
6666 depth: longint; { values pushed and not yet popped }
6767
6868 procedure MakeConst(var x: TItem; t: PType; v: int64);
69+function What(const x: TItem): shortstring;
6970 procedure MakeReal(var x: TItem; r: double);
7071 procedure MakeStr(var x: TItem);
7172 procedure MakeItem(var x: TItem; o: PObj);
@@ -201,6 +202,25 @@
201202 SetData(x.chunk, @sbuf, slen + 1, 1);
202203 end;
203204
205+{ An item for "found ...": a constant without a type of its own as it
206+ is written, so that "found 1.5" says what is wrong; else its type. }
207+function What(const x: TItem): shortstring;
208+begin
209+ if (x.mode = mConst) and ((x.typ = tConst) or (x.typ = tRConst)) then What := Source(x.pos)
210+ else What := TypeName(x.typ);
211+end;
212+
213+{ Two operands of different types. Numbers convert, so say how. }
214+procedure Mismatch(const x, y: TItem; xt, yt: PType);
215+var msg: shortstring;
216+begin
217+ msg := TypeName(xt) + ' and ' + TypeName(yt) + ' are different types';
218+ if (IsInt(xt) or (xt^.form = fReal)) and (IsInt(yt) or (yt^.form = fReal))
219+ and (xt <> tConst) and (xt <> tRConst) then
220+ MarkHelp(Join(x.pos, y.pos), msg, 'convert one to the other''s type, as in ' + TypeName(xt) + '(' + Source(y.pos) + ')')
221+ else MarkAt(Join(x.pos, y.pos), msg);
222+end;
223+
204224 { An item that is not a value, by what it is. }
205225 procedure NotValue(const x: TItem);
206226 begin
@@ -324,7 +344,7 @@
324344
325345 procedure LoadVar(var x: TItem; r: longint);
326346 begin
327- if not IsScalar(x.typ) then MarkAt(x.pos, 'expected a single value, found ' + TypeName(x.typ));
347+ if not IsScalar(x.typ) then MarkAt(x.pos, 'expected a single value, found ' + What(x));
328348 Load(r, MemOf(x, r), ScalarSize(x.typ), (x.typ^.form = fInt) and x.typ^.signed);
329349 end;
330350
@@ -565,7 +585,7 @@
565585 Value(x); PushRax; x.mode := mStack
566586 end else if (x.mode = mVar) and (x.typ^.form in [fArray, fSlice]) then
567587 Save(x)
568- else MarkAt(x.pos, 'expected an array, a slice or a pointer, found ' + TypeName(x.typ));
588+ else MarkAt(x.pos, 'expected an array, a slice or a pointer, found ' + What(x));
569589 end;
570590
571591 procedure Index(var x, y: TItem);
@@ -573,7 +593,7 @@
573593 begin
574594 t := x.typ;
575595 s := t^.base^.size;
576- if not IsInt(y.typ) then MarkAt(y.pos, 'an index is an integer, found ' + TypeName(y.typ));
596+ if not IsInt(y.typ) then MarkAt(y.pos, 'an index is an integer, found ' + What(y));
577597 if t^.form = fPtr then begin
578598 Value(y);
579599 if s <> 1 then ImulI(RAX, s);
@@ -611,7 +631,7 @@
611631
612632 procedure SliceLo(var lo: TItem);
613633 begin
614- if not IsInt(lo.typ) then MarkAt(lo.pos, 'an index is an integer, found ' + TypeName(lo.typ));
634+ if not IsInt(lo.typ) then MarkAt(lo.pos, 'an index is an integer, found ' + What(lo));
615635 Value(lo);
616636 PushRax;
617637 end;
@@ -621,7 +641,7 @@
621641 begin
622642 t := x.typ;
623643 s := t^.base^.size;
624- if not IsInt(hi.typ) then MarkAt(hi.pos, 'an index is an integer, found ' + TypeName(hi.typ));
644+ if not IsInt(hi.typ) then MarkAt(hi.pos, 'an index is an integer, found ' + What(hi));
625645 if x.vol then MarkAt(x.pos, 'can''t make a slice through a volatile pointer');
626646 Value(hi);
627647 MovRR(RDX, RAX);
@@ -676,7 +696,7 @@
676696 end else if IsInt(x.typ) then begin
677697 if x.mode = mConst then x.val := Cut(not x.val, x.typ)
678698 else begin Value(x); Unary(2, RAX); Norm(x.typ) end;
679- end else MarkAt(x.pos, '"not" needs a BOOL or an integer, found ' + TypeName(x.typ));
699+ end else MarkAt(x.pos, '"not" needs a BOOL or an integer, found ' + What(x));
680700 end;
681701
682702 function IsStrLike(t: PType): boolean;
@@ -815,7 +835,7 @@
815835 if y.mode in [mType, mBuiltin, mNone, mCase] then NotValue(y);
816836
817837 if (op in [sAnd, sOr]) and (xt^.form = fBool) then begin
818- if yt^.form <> fBool then MarkAt(y.pos, SymText(op) + ' needs BOOLs, found ' + TypeName(yt));
838+ if yt^.form <> fBool then MarkAt(y.pos, SymText(op) + ' needs BOOLs, found ' + What(y));
819839 if (x.mode = mConst) and (y.mode = mConst) then begin
820840 FixLink(L);
821841 if op = sAnd then x.val := x.val and y.val else x.val := x.val or y.val;
@@ -845,7 +865,7 @@
845865 { the type of the result, and the checks }
846866 t := nil; scale := 1; isPtr := false;
847867 if IsInt(xt) and IsInt(yt) then begin
848- if op = sSlash then MarkHelp(Join(x.pos, y.pos), '"/" is for reals, found ' + TypeName(xt), 'integers divide with "div"');
868+ if op = sSlash then MarkHelp(Join(x.pos, y.pos), '"/" divides reals, not integers', 'to divide integers, write ' + Source(x.pos) + ' div ' + Source(y.pos));
849869 if op in [sShl, sShr] then begin
850870 if xt^.form = fConst then t := tConst else t := xt
851871 end else if (xt^.form = fConst) and (yt^.form = fConst) then t := tConst
@@ -856,12 +876,12 @@
856876 if (y.mode = mConst) and not Fits(y.val, xt) then MarkAt(y.pos, IntStr(y.val) + ' doesn''t fit ' + TypeName(xt));
857877 t := xt
858878 end else if Same(xt, yt) then t := xt
859- else MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt));
879+ else Mismatch(x, y, xt, yt);
860880 end else if (xt^.form = fReal) and (yt^.form = fReal) then begin
861881 if not (op in Rel + [sPlus, sMinus, sTimes, sSlash]) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt));
862882 if xt = tRConst then t := yt
863883 else if (yt = tRConst) or Same(xt, yt) then t := xt
864- else MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt));
884+ else Mismatch(x, y, xt, yt);
865885 if (x.mode = mConst) and (x.typ <> t) then RealTo(x, t);
866886 if (y.mode = mConst) and (y.typ <> t) then RealTo(y, t);
867887 end else if (xt^.form = fBool) and (yt^.form = fBool) then begin
@@ -871,7 +891,7 @@
871891 t := xt; scale := xt^.base^.size; isPtr := true;
872892 if y.mode = mConst then y.typ := tI64;
873893 end else if (xt^.form = fPtr) and (yt^.form = fPtr) and (op = sMinus) then begin
874- if not Same(xt, yt) then MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt));
894+ if not Same(xt, yt) then Mismatch(x, y, xt, yt);
875895 t := tI64; scale := xt^.base^.size; isPtr := true;
876896 end else if (xt^.form in [fPtr, fProc, fNil, fError]) and (yt^.form in [fPtr, fProc, fNil, fError]) then begin
877897 if not (op in Rel) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt));
@@ -879,7 +899,7 @@
879899 if not (op in [sEql, sNeq]) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt));
880900 if (xt^.form <> fNil) and (yt^.form <> fNil) and not Same(xt, yt) then
881901 if not ((xt^.form = fPtr) and (yt^.form = fPtr) and Same(xt^.base, yt^.base)) then
882- MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt));
902+ Mismatch(x, y, xt, yt);
883903 t := tU64;
884904 end else if (xt^.form = fEnum) and Same(xt, yt) then begin
885905 if not (op in Rel) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt));
@@ -890,7 +910,7 @@
890910 end else if (op = sIn) and (yt^.form = fSet) and Same(xt, yt^.base) then
891911 t := yt
892912 else
893- MarkAt(Join(x.pos, y.pos), 'can''t combine ' + TypeName(xt) + ' and ' + TypeName(yt));
913+ Mismatch(x, y, xt, yt);
894914 unsign := (t^.form = fInt) and not t^.signed;
895915
896916 { constants }
@@ -1087,7 +1107,7 @@
10871107 c.obj := x.obj; c.code := x.obj^.isCode; c.ext := x.obj^.ext;
10881108 end else begin
10891109 c.obj := nil; c.code := false; c.ext := false;
1090- if x.typ^.form <> fProc then MarkAt(x.pos, 'expected a procedure, found ' + TypeName(x.typ));
1110+ if x.typ^.form <> fProc then MarkAt(x.pos, 'expected a procedure, found ' + What(x));
10911111 c.sig := x.typ; c.chunk := -1;
10921112 c.target := ToSlot(x);
10931113 end;
@@ -1121,7 +1141,7 @@
11211141 c.isF[c.n] := (p^.typ^.form = fReal) and not p^.isVar;
11221142 if p^.isVar then begin
11231143 if (a.mode <> mVar) or not a.isVar then MarkAt(a.pos, 'a var parameter needs a variable');
1124- if not Same(a.typ, p^.typ) then MarkAt(a.pos, 'a var parameter needs exactly ' + TypeName(p^.typ) + ', found ' + TypeName(a.typ));
1144+ if not Same(a.typ, p^.typ) then MarkAt(a.pos, 'a var parameter needs exactly ' + TypeName(p^.typ) + ', found ' + What(a));
11251145 if a.vol then MarkAt(a.pos, 'can''t pass through a volatile pointer to a var parameter');
11261146 Address(a, RAX);
11271147 s := AllocTemp(8, 8);
@@ -1244,7 +1264,7 @@
12441264 var p: int64;
12451265 begin
12461266 if x.typ^.form = fEnum then exit(ToSlot(x));
1247- if (x.mode <> mVar) or (x.typ^.form <> fVariant) then MarkAt(x.pos, 'match needs a variant or an enumeration, found ' + TypeName(x.typ));
1267+ if (x.mode <> mVar) or (x.typ^.form <> fVariant) then MarkAt(x.pos, 'match needs a variant or an enumeration, found ' + What(x));
12481268 Address(x, RAX);
12491269 p := AllocTemp(8, 8);
12501270 Store(Mem(RBP, p), RAX, 8);
@@ -1289,7 +1309,7 @@
12891309
12901310 procedure CondJump(var x: TItem; var L: longint);
12911311 begin
1292- if x.typ^.form <> fBool then MarkAt(x.pos, 'a condition is a BOOL, found ' + TypeName(x.typ));
1312+ if x.typ^.form <> fBool then MarkAt(x.pos, 'a condition is a BOOL, found ' + What(x));
12931313 Value(x);
12941314 TestRR(RAX, RAX);
12951315 Jcc(ccE, L);

src/parse.pas modified +9 -9

@@ -243,7 +243,7 @@
243243 var x: TItem;
244244 begin
245245 Expression(x, nil);
246- if not IsInt(x.typ) then MarkAt(x.pos, 'expected an integer constant, found ' + TypeName(x.typ));
246+ if not IsInt(x.typ) then MarkAt(x.pos, 'expected an integer constant, found ' + What(x));
247247 ConstExpr := ConstValue(x);
248248 end;
249249
@@ -574,7 +574,7 @@
574574 for i := 0 to n - 1 do begin
575575 if i > 0 then Expect(sComma);
576576 Expression(a, nil);
577- if not (IsScalar(a.typ) and (a.typ^.form <> fReal)) then MarkAt(a.pos, 'expected an integer or a pointer, found ' + TypeName(a.typ));
577+ if not (IsScalar(a.typ) and (a.typ^.form <> fReal)) then MarkAt(a.pos, 'expected an integer or a pointer, found ' + What(a));
578578 if a.typ^.form = fConst then Coerce(a, tI64);
579579 slots[i] := ToSlot(a);
580580 end;
@@ -584,7 +584,7 @@
584584 var p, a: TItem; t: PType; s: array[0..2] of int64; i, n: longint;
585585 begin
586586 Expression(p, nil);
587- if p.typ^.form <> fPtr then MarkAt(p.pos, 'expected a pointer, found ' + TypeName(p.typ));
587+ if p.typ^.form <> fPtr then MarkAt(p.pos, 'expected a pointer, found ' + What(p));
588588 t := p.typ^.base;
589589 if not (((t^.form = fInt) or ((t^.form = fPtr) and (which <> bXadd))) and (t^.size = 8)) then
590590 MarkAt(p.pos, 'expected an 8-byte integer or a pointer, found ' + TypeName(t));
@@ -625,7 +625,7 @@
625625 Expression(y, nil);
626626 if (y.typ^.form <> fPtr) or (y.typ^.base^.obj = nil) or (y.typ^.base^.obj^.module = nil)
627627 or (NameOf(y.typ^.base^.obj^.name) <> 'Allocator')
628- or (NameOf(y.typ^.base^.obj^.module^.name) <> 'Mem') then MarkAt(y.pos, 'NEW needs a ^Mem.Allocator, found ' + TypeName(y.typ));
628+ or (NameOf(y.typ^.base^.obj^.module^.name) <> 'Mem') then MarkAt(y.pos, 'NEW needs a ^Mem.Allocator, found ' + What(y));
629629 f := Find(y.typ^.base^.scope, Name('alloc'));
630630 s := ToSlot(y);
631631 Load(RAX, Mem(RBP, s), 8, false);
@@ -700,7 +700,7 @@
700700 Load(RAX, Mem(RAX, 8), 8, false);
701701 MakeConst(x, tI64, 0);
702702 x.mode := mReg;
703- end else MarkAt(y.pos, 'LEN needs an array or a slice, found ' + TypeName(y.typ));
703+ end else MarkAt(y.pos, 'LEN needs an array or a slice, found ' + What(y));
704704 end;
705705 bSyscall: begin
706706 n := 1;
@@ -708,7 +708,7 @@
708708 while (tok = sComma) and (n < 7) do begin
709709 Next;
710710 Expression(y, nil);
711- if not (IsScalar(y.typ) and (y.typ^.form <> fReal)) then MarkAt(y.pos, 'expected an integer or a pointer, found ' + TypeName(y.typ));
711+ if not (IsScalar(y.typ) and (y.typ^.form <> fReal)) then MarkAt(y.pos, 'expected an integer or a pointer, found ' + What(y));
712712 if y.typ^.form = fConst then Coerce(y, tI64);
713713 slots[n] := ToSlot(y);
714714 inc(n);
@@ -776,7 +776,7 @@
776776 case tok of
777777 sPeriod: begin
778778 Next;
779- if (x.mode <> mVar) or (x.typ^.form <> fRecord) then MarkAt(x.pos, 'expected a record, found ' + TypeName(x.typ));
779+ if (x.mode <> mVar) or (x.typ^.form <> fRecord) then MarkAt(x.pos, 'expected a record, found ' + What(x));
780780 if tok <> sIdent then Expected('a field');
781781 f := Find(x.typ^.scope, id);
782782 if f = nil then Mark(TypeName(x.typ) + ' has no field ' + NameOf(id));
@@ -915,11 +915,11 @@
915915 repeat
916916 if t = nil then Expression(e, nil) else Expression(e, t^.base);
917917 if t = nil then begin
918- if e.typ^.form <> fEnum then MarkAt(e.pos, 'a set holds names of an enumeration, found ' + TypeName(e.typ));
918+ if e.typ^.form <> fEnum then MarkAt(e.pos, 'a set holds names of an enumeration, found ' + What(e));
919919 t := SetOf(e.typ, e.pos);
920920 end;
921921 if not Same(e.typ, t^.base) then begin
922- if e.obj <> nil then s := NameOf(e.obj^.name) else s := TypeName(e.typ);
922+ if e.obj <> nil then s := NameOf(e.obj^.name) else s := What(e);
923923 MarkAt(e.pos, s + ' isn''t a name of ' + TypeName(t^.base));
924924 end;
925925 if e.mode = mConst then bits := bits or (int64(1) shl e.val)

src/scan.pas modified +4 -5

@@ -405,13 +405,12 @@
405405 end;
406406 end;
407407
408-{ The text of the file from byte a up to but not including b, at most
409- the 255 bytes a shortstring holds. }
408+{ The text of the file from byte a up to but not including b }
410409 function Text(a, b: longint): shortstring;
410+var p: TPos;
411411 begin
412- if b - a > 255 then b := a + 255;
413- SetLength(Text, b - a);
414- Move(cur.buf[a], Text[1], b - a);
412+ p.f := cur.f; p.a := a; p.b := b;
413+ Text := Source(p);
415414 end;
416415
417416 { One character of a character or string literal, at buf[pos]: its code

test/err/AtBinary.err modified +1 -1

@@ -1,4 +1,4 @@
1-test/err/AtBinary.raz:5:10: error: can't combine I64 and BOOL
1+test/err/AtBinary.raz:5:10: error: I64 and BOOL are different types
22 5 | x := (x + 2) * b;
33 | ^^^^^^^^^^^
44 raz: 1 error

test/err/AtPSetLit.err modified +1 -1

@@ -1,4 +1,4 @@
1-test/err/AtPSetLit.raz:6:14: error: an integer constant isn't a name of C
1+test/err/AtPSetLit.raz:6:14: error: 1 isn't a name of C
22 6 | s := {r, 1};
33 | ^
44 raz: 1 error

test/err/AtPtrMinus.err modified +1 -1

@@ -1,4 +1,4 @@
1-test/err/AtPtrMinus.raz:5:10: error: different types: ^I64 and ^I32
1+test/err/AtPtrMinus.raz:5:10: error: ^I64 and ^I32 are different types
22 5 | x := p - q;
33 | ^^^^^
44 raz: 1 error

test/err/DeclIntConst.err modified +1 -1

@@ -1,4 +1,4 @@
1-test/err/DeclIntConst.raz:3:9: error: expected an integer constant, found a real constant
1+test/err/DeclIntConst.raz:3:9: error: expected an integer constant, found 1.5
22 3 | var a: [1.5]I64;
33 | ^^^
44 raz: 1 error

test/err/DeclSetNames.err modified +1 -1

@@ -1,4 +1,4 @@
1-test/err/DeclSetNames.raz:6:16: error: a set holds names of an enumeration, found an integer constant
1+test/err/DeclSetNames.raz:6:16: error: a set holds names of an enumeration, found 1
22 6 | s := {} + {1};
33 | ^
44 raz: 1 error

test/err/DeclSyscallArg.err (history) modified +1 -1

@@ -1,4 +1,4 @@
1-test/err/DeclSyscallArg.raz:5:21: error: expected an integer or a pointer, found a real constant
1+test/err/DeclSyscallArg.raz:5:21: error: expected an integer or a pointer, found 1.5
22 5 | n := SYSCALL(1, 1.5);
33 | ^^^
44 raz: 1 error

test/err/GenIntReal.err modified +2 -1

@@ -1,4 +1,5 @@
1-test/err/GenIntReal.raz:6:10: error: can't combine I64 and F64
1+test/err/GenIntReal.raz:6:10: error: I64 and F64 are different types
22 6 | y := x + y;
33 | ^^^^^
4+help: convert one to the other's type, as in I64(y)
45 raz: 1 error

test/err/GenIntTypes.err modified +2 -1

@@ -1,4 +1,5 @@
1-test/err/GenIntTypes.raz:6:10: error: different types: I32 and I64
1+test/err/GenIntTypes.raz:6:10: error: I32 and I64 are different types
22 6 | b := a + b;
33 | ^^^^^
4+help: convert one to the other's type, as in I32(b)
45 raz: 1 error

test/err/GenSlash.err modified +2 -2

@@ -1,5 +1,5 @@
1-test/err/GenSlash.raz:6:10: error: "/" is for reals, found an integer constant
1+test/err/GenSlash.raz:6:10: error: "/" divides reals, not integers
22 6 | x := 6 / 3;
33 | ^^^^^
4-help: integers divide with "div"
4+help: to divide integers, write 6 div 3
55 raz: 1 error

test/err/GenSlashVar.err modified +2 -2

@@ -1,5 +1,5 @@
1-test/err/GenSlashVar.raz:6:10: error: "/" is for reals, found I64
1+test/err/GenSlashVar.raz:6:10: error: "/" divides reals, not integers
22 6 | x := x / y;
33 | ^^^^^
4-help: integers divide with "div"
4+help: to divide integers, write x div y
55 raz: 1 error

test/err/Mixed.err modified +2 -1

@@ -1,4 +1,5 @@
1-test/err/Mixed.raz:6:10: error: different types: F32 and F64
1+test/err/Mixed.raz:6:10: error: F32 and F64 are different types
22 6 | y := x + y;
33 | ^^^^^
4+help: convert one to the other's type, as in F32(y)
45 raz: 1 error

test/err/Recover.err modified +2 -2

@@ -10,13 +10,13 @@
1010 test/err/Recover.raz:16:10: error: y isn't declared
1111 16 | x := y + 1;
1212 | ^
13-test/err/Recover.raz:19:14: error: can't combine I64 and BOOL
13+test/err/Recover.raz:19:14: error: I64 and BOOL are different types
1414 19 | x := (x + 2) * b;
1515 | ^^^^^^^^^^^
1616 test/err/Recover.raz:20:17: error: z isn't declared
1717 20 | Out.int(z);
1818 | ^
19-test/err/Recover.raz:22:12: error: can't combine I64 and BOOL
19+test/err/Recover.raz:22:12: error: I64 and BOOL are different types
2020 22 | return x + true;
2121 | ^^^^^^^^
2222 test/err/Recover.raz:28:7: error: Q has no field c