From 1d7fac9c1fda8cdf2071ccbe4eeb584f3e53f73f Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Sun, 11 Oct 2026 10:08:47 +0100 Subject: [PATCH] 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". --- diff --git a/doc/compiler.md b/doc/compiler.md index 094c4b6..fd06608 100644 --- a/doc/compiler.md +++ b/doc/compiler.md @@ -8,11 +8,11 @@ | File | Lines | Code | What | |---|---|---|---| -| `src/diag.pas` | 249 | 178 | Messages: positions, source excerpts, colour, counts | -| `src/scan.pas` | 660 | 529 | Symbols, literals, comments, positions | +| `src/diag.pas` | 260 | 187 | Messages: positions, source excerpts, colour, counts | +| `src/scan.pas` | 659 | 529 | Symbols, literals, comments, positions | | `src/sym.pas` | 526 | 437 | Types, objects, scopes, layout | | `src/x64.pas` | 682 | 548 | Code buffer, chunks, fixups, line notes, instruction encoder | -| `src/gen.pas` | 1,492 | 1,303 | Items: loading, storing, copying, frames, calls | +| `src/gen.pas` | 1,512 | 1,318 | Items: loading, storing, copying, frames, calls | | `src/parse.pas` | 2,094 | 1,908 | Declarations, statements, expressions, built-ins, recovery | | `src/link.pas` | 131 | 95 | Tree shaking, layout, patching | | `src/elf.pas` | 425 | 351 | Static and dynamic ELF, symbol table, line numbers | @@ -233,7 +233,9 @@ An item also carries `pos`, the stretch of source it came from, which the parser sets as it reads an expression; an error about an item is reported there (`MarkAt(x.pos, ...)`), and one about two operands -across both (`Join(x.pos, y.pos)`). +across both (`Join(x.pos, y.pos)`). `What` names an item for a +message: a constant without a type of its own as it is written +(`found 1.5`), anything else by its type. Three routines move items towards the machine. `Value` brings a value into `rax`, loading it with the one instruction its size needs. diff --git a/src/diag.pas b/src/diag.pas index 43085f8..a337177 100644 --- a/src/diag.pas +++ b/src/diag.pas @@ -37,6 +37,7 @@ function PathOf(f: longint): shortstring; function LineOf(const p: TPos): longint; function Join(const p, q: TPos): TPos; +function Source(const p: TPos): shortstring; procedure Error(const p: TPos; const msg: shortstring); procedure Warning(const p: TPos; const msg: shortstring); procedure Note(const p: TPos; const msg: shortstring); @@ -185,6 +186,16 @@ begin Join := p; Join.b := q.b; +end; + +{ The text at p, at most the 255 bytes a shortstring holds } +function Source(const p: TPos): shortstring; +var n: longint; +begin + n := p.b - p.a; + if n > 255 then n := 255; + SetLength(Source, n); + Move(files[p.f].buf[p.a], Source[1], n); end; { Messages } diff --git a/src/gen.pas b/src/gen.pas index 7190205..cc6a099 100644 --- a/src/gen.pas +++ b/src/gen.pas @@ -66,6 +66,7 @@ depth: longint; { values pushed and not yet popped } procedure MakeConst(var x: TItem; t: PType; v: int64); +function What(const x: TItem): shortstring; procedure MakeReal(var x: TItem; r: double); procedure MakeStr(var x: TItem); procedure MakeItem(var x: TItem; o: PObj); @@ -201,6 +202,25 @@ SetData(x.chunk, @sbuf, slen + 1, 1); end; +{ An item for "found ...": a constant without a type of its own as it + is written, so that "found 1.5" says what is wrong; else its type. } +function What(const x: TItem): shortstring; +begin + if (x.mode = mConst) and ((x.typ = tConst) or (x.typ = tRConst)) then What := Source(x.pos) + else What := TypeName(x.typ); +end; + +{ Two operands of different types. Numbers convert, so say how. } +procedure Mismatch(const x, y: TItem; xt, yt: PType); +var msg: shortstring; +begin + msg := TypeName(xt) + ' and ' + TypeName(yt) + ' are different types'; + if (IsInt(xt) or (xt^.form = fReal)) and (IsInt(yt) or (yt^.form = fReal)) + and (xt <> tConst) and (xt <> tRConst) then + MarkHelp(Join(x.pos, y.pos), msg, 'convert one to the other''s type, as in ' + TypeName(xt) + '(' + Source(y.pos) + ')') + else MarkAt(Join(x.pos, y.pos), msg); +end; + { An item that is not a value, by what it is. } procedure NotValue(const x: TItem); begin @@ -324,7 +344,7 @@ procedure LoadVar(var x: TItem; r: longint); begin - if not IsScalar(x.typ) then MarkAt(x.pos, 'expected a single value, found ' + TypeName(x.typ)); + if not IsScalar(x.typ) then MarkAt(x.pos, 'expected a single value, found ' + What(x)); Load(r, MemOf(x, r), ScalarSize(x.typ), (x.typ^.form = fInt) and x.typ^.signed); end; @@ -565,7 +585,7 @@ Value(x); PushRax; x.mode := mStack end else if (x.mode = mVar) and (x.typ^.form in [fArray, fSlice]) then Save(x) - else MarkAt(x.pos, 'expected an array, a slice or a pointer, found ' + TypeName(x.typ)); + else MarkAt(x.pos, 'expected an array, a slice or a pointer, found ' + What(x)); end; procedure Index(var x, y: TItem); @@ -573,7 +593,7 @@ begin t := x.typ; s := t^.base^.size; - if not IsInt(y.typ) then MarkAt(y.pos, 'an index is an integer, found ' + TypeName(y.typ)); + if not IsInt(y.typ) then MarkAt(y.pos, 'an index is an integer, found ' + What(y)); if t^.form = fPtr then begin Value(y); if s <> 1 then ImulI(RAX, s); @@ -611,7 +631,7 @@ procedure SliceLo(var lo: TItem); begin - if not IsInt(lo.typ) then MarkAt(lo.pos, 'an index is an integer, found ' + TypeName(lo.typ)); + if not IsInt(lo.typ) then MarkAt(lo.pos, 'an index is an integer, found ' + What(lo)); Value(lo); PushRax; end; @@ -621,7 +641,7 @@ begin t := x.typ; s := t^.base^.size; - if not IsInt(hi.typ) then MarkAt(hi.pos, 'an index is an integer, found ' + TypeName(hi.typ)); + if not IsInt(hi.typ) then MarkAt(hi.pos, 'an index is an integer, found ' + What(hi)); if x.vol then MarkAt(x.pos, 'can''t make a slice through a volatile pointer'); Value(hi); MovRR(RDX, RAX); @@ -676,7 +696,7 @@ end else if IsInt(x.typ) then begin if x.mode = mConst then x.val := Cut(not x.val, x.typ) else begin Value(x); Unary(2, RAX); Norm(x.typ) end; - end else MarkAt(x.pos, '"not" needs a BOOL or an integer, found ' + TypeName(x.typ)); + end else MarkAt(x.pos, '"not" needs a BOOL or an integer, found ' + What(x)); end; function IsStrLike(t: PType): boolean; @@ -815,7 +835,7 @@ if y.mode in [mType, mBuiltin, mNone, mCase] then NotValue(y); if (op in [sAnd, sOr]) and (xt^.form = fBool) then begin - if yt^.form <> fBool then MarkAt(y.pos, SymText(op) + ' needs BOOLs, found ' + TypeName(yt)); + if yt^.form <> fBool then MarkAt(y.pos, SymText(op) + ' needs BOOLs, found ' + What(y)); if (x.mode = mConst) and (y.mode = mConst) then begin FixLink(L); if op = sAnd then x.val := x.val and y.val else x.val := x.val or y.val; @@ -845,7 +865,7 @@ { the type of the result, and the checks } t := nil; scale := 1; isPtr := false; if IsInt(xt) and IsInt(yt) then begin - if op = sSlash then MarkHelp(Join(x.pos, y.pos), '"/" is for reals, found ' + TypeName(xt), 'integers divide with "div"'); + 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)); if op in [sShl, sShr] then begin if xt^.form = fConst then t := tConst else t := xt end else if (xt^.form = fConst) and (yt^.form = fConst) then t := tConst @@ -856,12 +876,12 @@ if (y.mode = mConst) and not Fits(y.val, xt) then MarkAt(y.pos, IntStr(y.val) + ' doesn''t fit ' + TypeName(xt)); t := xt end else if Same(xt, yt) then t := xt - else MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt)); + else Mismatch(x, y, xt, yt); end else if (xt^.form = fReal) and (yt^.form = fReal) then begin if not (op in Rel + [sPlus, sMinus, sTimes, sSlash]) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt)); if xt = tRConst then t := yt else if (yt = tRConst) or Same(xt, yt) then t := xt - else MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt)); + else Mismatch(x, y, xt, yt); if (x.mode = mConst) and (x.typ <> t) then RealTo(x, t); if (y.mode = mConst) and (y.typ <> t) then RealTo(y, t); end else if (xt^.form = fBool) and (yt^.form = fBool) then begin @@ -871,7 +891,7 @@ t := xt; scale := xt^.base^.size; isPtr := true; if y.mode = mConst then y.typ := tI64; end else if (xt^.form = fPtr) and (yt^.form = fPtr) and (op = sMinus) then begin - if not Same(xt, yt) then MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt)); + if not Same(xt, yt) then Mismatch(x, y, xt, yt); t := tI64; scale := xt^.base^.size; isPtr := true; end else if (xt^.form in [fPtr, fProc, fNil, fError]) and (yt^.form in [fPtr, fProc, fNil, fError]) then begin if not (op in Rel) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt)); @@ -879,7 +899,7 @@ if not (op in [sEql, sNeq]) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt)); if (xt^.form <> fNil) and (yt^.form <> fNil) and not Same(xt, yt) then if not ((xt^.form = fPtr) and (yt^.form = fPtr) and Same(xt^.base, yt^.base)) then - MarkAt(Join(x.pos, y.pos), 'different types: ' + TypeName(xt) + ' and ' + TypeName(yt)); + Mismatch(x, y, xt, yt); t := tU64; end else if (xt^.form = fEnum) and Same(xt, yt) then begin if not (op in Rel) then MarkAt(Join(x.pos, y.pos), SymText(op) + ' doesn''t apply to ' + TypeName(xt)); @@ -890,7 +910,7 @@ end else if (op = sIn) and (yt^.form = fSet) and Same(xt, yt^.base) then t := yt else - MarkAt(Join(x.pos, y.pos), 'can''t combine ' + TypeName(xt) + ' and ' + TypeName(yt)); + Mismatch(x, y, xt, yt); unsign := (t^.form = fInt) and not t^.signed; { constants } @@ -1087,7 +1107,7 @@ c.obj := x.obj; c.code := x.obj^.isCode; c.ext := x.obj^.ext; end else begin c.obj := nil; c.code := false; c.ext := false; - if x.typ^.form <> fProc then MarkAt(x.pos, 'expected a procedure, found ' + TypeName(x.typ)); + if x.typ^.form <> fProc then MarkAt(x.pos, 'expected a procedure, found ' + What(x)); c.sig := x.typ; c.chunk := -1; c.target := ToSlot(x); end; @@ -1121,7 +1141,7 @@ c.isF[c.n] := (p^.typ^.form = fReal) and not p^.isVar; if p^.isVar then begin if (a.mode <> mVar) or not a.isVar then MarkAt(a.pos, 'a var parameter needs a variable'); - if not Same(a.typ, p^.typ) then MarkAt(a.pos, 'a var parameter needs exactly ' + TypeName(p^.typ) + ', found ' + TypeName(a.typ)); + if not Same(a.typ, p^.typ) then MarkAt(a.pos, 'a var parameter needs exactly ' + TypeName(p^.typ) + ', found ' + What(a)); if a.vol then MarkAt(a.pos, 'can''t pass through a volatile pointer to a var parameter'); Address(a, RAX); s := AllocTemp(8, 8); @@ -1244,7 +1264,7 @@ var p: int64; begin if x.typ^.form = fEnum then exit(ToSlot(x)); - if (x.mode <> mVar) or (x.typ^.form <> fVariant) then MarkAt(x.pos, 'match needs a variant or an enumeration, found ' + TypeName(x.typ)); + if (x.mode <> mVar) or (x.typ^.form <> fVariant) then MarkAt(x.pos, 'match needs a variant or an enumeration, found ' + What(x)); Address(x, RAX); p := AllocTemp(8, 8); Store(Mem(RBP, p), RAX, 8); @@ -1289,7 +1309,7 @@ procedure CondJump(var x: TItem; var L: longint); begin - if x.typ^.form <> fBool then MarkAt(x.pos, 'a condition is a BOOL, found ' + TypeName(x.typ)); + if x.typ^.form <> fBool then MarkAt(x.pos, 'a condition is a BOOL, found ' + What(x)); Value(x); TestRR(RAX, RAX); Jcc(ccE, L); diff --git a/src/parse.pas b/src/parse.pas index 55b752f..ba86129 100644 --- a/src/parse.pas +++ b/src/parse.pas @@ -243,7 +243,7 @@ var x: TItem; begin Expression(x, nil); - if not IsInt(x.typ) then MarkAt(x.pos, 'expected an integer constant, found ' + TypeName(x.typ)); + if not IsInt(x.typ) then MarkAt(x.pos, 'expected an integer constant, found ' + What(x)); ConstExpr := ConstValue(x); end; @@ -574,7 +574,7 @@ for i := 0 to n - 1 do begin if i > 0 then Expect(sComma); Expression(a, nil); - if not (IsScalar(a.typ) and (a.typ^.form <> fReal)) then MarkAt(a.pos, 'expected an integer or a pointer, found ' + TypeName(a.typ)); + if not (IsScalar(a.typ) and (a.typ^.form <> fReal)) then MarkAt(a.pos, 'expected an integer or a pointer, found ' + What(a)); if a.typ^.form = fConst then Coerce(a, tI64); slots[i] := ToSlot(a); end; @@ -584,7 +584,7 @@ var p, a: TItem; t: PType; s: array[0..2] of int64; i, n: longint; begin Expression(p, nil); - if p.typ^.form <> fPtr then MarkAt(p.pos, 'expected a pointer, found ' + TypeName(p.typ)); + if p.typ^.form <> fPtr then MarkAt(p.pos, 'expected a pointer, found ' + What(p)); t := p.typ^.base; if not (((t^.form = fInt) or ((t^.form = fPtr) and (which <> bXadd))) and (t^.size = 8)) then MarkAt(p.pos, 'expected an 8-byte integer or a pointer, found ' + TypeName(t)); @@ -625,7 +625,7 @@ Expression(y, nil); if (y.typ^.form <> fPtr) or (y.typ^.base^.obj = nil) or (y.typ^.base^.obj^.module = nil) or (NameOf(y.typ^.base^.obj^.name) <> 'Allocator') - or (NameOf(y.typ^.base^.obj^.module^.name) <> 'Mem') then MarkAt(y.pos, 'NEW needs a ^Mem.Allocator, found ' + TypeName(y.typ)); + or (NameOf(y.typ^.base^.obj^.module^.name) <> 'Mem') then MarkAt(y.pos, 'NEW needs a ^Mem.Allocator, found ' + What(y)); f := Find(y.typ^.base^.scope, Name('alloc')); s := ToSlot(y); Load(RAX, Mem(RBP, s), 8, false); @@ -700,7 +700,7 @@ Load(RAX, Mem(RAX, 8), 8, false); MakeConst(x, tI64, 0); x.mode := mReg; - end else MarkAt(y.pos, 'LEN needs an array or a slice, found ' + TypeName(y.typ)); + end else MarkAt(y.pos, 'LEN needs an array or a slice, found ' + What(y)); end; bSyscall: begin n := 1; @@ -708,7 +708,7 @@ while (tok = sComma) and (n < 7) do begin Next; Expression(y, nil); - if not (IsScalar(y.typ) and (y.typ^.form <> fReal)) then MarkAt(y.pos, 'expected an integer or a pointer, found ' + TypeName(y.typ)); + if not (IsScalar(y.typ) and (y.typ^.form <> fReal)) then MarkAt(y.pos, 'expected an integer or a pointer, found ' + What(y)); if y.typ^.form = fConst then Coerce(y, tI64); slots[n] := ToSlot(y); inc(n); @@ -776,7 +776,7 @@ case tok of sPeriod: begin Next; - if (x.mode <> mVar) or (x.typ^.form <> fRecord) then MarkAt(x.pos, 'expected a record, found ' + TypeName(x.typ)); + if (x.mode <> mVar) or (x.typ^.form <> fRecord) then MarkAt(x.pos, 'expected a record, found ' + What(x)); if tok <> sIdent then Expected('a field'); f := Find(x.typ^.scope, id); if f = nil then Mark(TypeName(x.typ) + ' has no field ' + NameOf(id)); @@ -915,11 +915,11 @@ repeat if t = nil then Expression(e, nil) else Expression(e, t^.base); if t = nil then begin - if e.typ^.form <> fEnum then MarkAt(e.pos, 'a set holds names of an enumeration, found ' + TypeName(e.typ)); + if e.typ^.form <> fEnum then MarkAt(e.pos, 'a set holds names of an enumeration, found ' + What(e)); t := SetOf(e.typ, e.pos); end; if not Same(e.typ, t^.base) then begin - if e.obj <> nil then s := NameOf(e.obj^.name) else s := TypeName(e.typ); + if e.obj <> nil then s := NameOf(e.obj^.name) else s := What(e); MarkAt(e.pos, s + ' isn''t a name of ' + TypeName(t^.base)); end; if e.mode = mConst then bits := bits or (int64(1) shl e.val) diff --git a/src/scan.pas b/src/scan.pas index 1ebd6c9..71c8ea7 100644 --- a/src/scan.pas +++ b/src/scan.pas @@ -405,13 +405,12 @@ end; end; -{ The text of the file from byte a up to but not including b, at most - the 255 bytes a shortstring holds. } +{ The text of the file from byte a up to but not including b } function Text(a, b: longint): shortstring; +var p: TPos; begin - if b - a > 255 then b := a + 255; - SetLength(Text, b - a); - Move(cur.buf[a], Text[1], b - a); + p.f := cur.f; p.a := a; p.b := b; + Text := Source(p); end; { One character of a character or string literal, at buf[pos]: its code diff --git a/test/err/AtBinary.err b/test/err/AtBinary.err index 5f1e4ce..02f54a4 100644 --- a/test/err/AtBinary.err +++ b/test/err/AtBinary.err @@ -1,4 +1,4 @@ -test/err/AtBinary.raz:5:10: error: can't combine I64 and BOOL +test/err/AtBinary.raz:5:10: error: I64 and BOOL are different types 5 | x := (x + 2) * b; | ^^^^^^^^^^^ raz: 1 error diff --git a/test/err/AtPSetLit.err b/test/err/AtPSetLit.err index 65b8873..eea54c9 100644 --- a/test/err/AtPSetLit.err +++ b/test/err/AtPSetLit.err @@ -1,4 +1,4 @@ -test/err/AtPSetLit.raz:6:14: error: an integer constant isn't a name of C +test/err/AtPSetLit.raz:6:14: error: 1 isn't a name of C 6 | s := {r, 1}; | ^ raz: 1 error diff --git a/test/err/AtPtrMinus.err b/test/err/AtPtrMinus.err index 3a76d15..67f195e 100644 --- a/test/err/AtPtrMinus.err +++ b/test/err/AtPtrMinus.err @@ -1,4 +1,4 @@ -test/err/AtPtrMinus.raz:5:10: error: different types: ^I64 and ^I32 +test/err/AtPtrMinus.raz:5:10: error: ^I64 and ^I32 are different types 5 | x := p - q; | ^^^^^ raz: 1 error diff --git a/test/err/DeclIntConst.err b/test/err/DeclIntConst.err index 5682fc0..b7bc453 100644 --- a/test/err/DeclIntConst.err +++ b/test/err/DeclIntConst.err @@ -1,4 +1,4 @@ -test/err/DeclIntConst.raz:3:9: error: expected an integer constant, found a real constant +test/err/DeclIntConst.raz:3:9: error: expected an integer constant, found 1.5 3 | var a: [1.5]I64; | ^^^ raz: 1 error diff --git a/test/err/DeclSetNames.err b/test/err/DeclSetNames.err index b6f1a95..e962abd 100644 --- a/test/err/DeclSetNames.err +++ b/test/err/DeclSetNames.err @@ -1,4 +1,4 @@ -test/err/DeclSetNames.raz:6:16: error: a set holds names of an enumeration, found an integer constant +test/err/DeclSetNames.raz:6:16: error: a set holds names of an enumeration, found 1 6 | s := {} + {1}; | ^ raz: 1 error diff --git a/test/err/DeclSyscallArg.err b/test/err/DeclSyscallArg.err index 4f530cb..93ed16d 100644 --- a/test/err/DeclSyscallArg.err +++ b/test/err/DeclSyscallArg.err @@ -1,4 +1,4 @@ -test/err/DeclSyscallArg.raz:5:21: error: expected an integer or a pointer, found a real constant +test/err/DeclSyscallArg.raz:5:21: error: expected an integer or a pointer, found 1.5 5 | n := SYSCALL(1, 1.5); | ^^^ raz: 1 error diff --git a/test/err/GenIntReal.err b/test/err/GenIntReal.err index ad5f617..5a4652f 100644 --- a/test/err/GenIntReal.err +++ b/test/err/GenIntReal.err @@ -1,4 +1,5 @@ -test/err/GenIntReal.raz:6:10: error: can't combine I64 and F64 +test/err/GenIntReal.raz:6:10: error: I64 and F64 are different types 6 | y := x + y; | ^^^^^ +help: convert one to the other's type, as in I64(y) raz: 1 error diff --git a/test/err/GenIntTypes.err b/test/err/GenIntTypes.err index fd97aae..08f3db2 100644 --- a/test/err/GenIntTypes.err +++ b/test/err/GenIntTypes.err @@ -1,4 +1,5 @@ -test/err/GenIntTypes.raz:6:10: error: different types: I32 and I64 +test/err/GenIntTypes.raz:6:10: error: I32 and I64 are different types 6 | b := a + b; | ^^^^^ +help: convert one to the other's type, as in I32(b) raz: 1 error diff --git a/test/err/GenSlash.err b/test/err/GenSlash.err index 67fa35f..8373b44 100644 --- a/test/err/GenSlash.err +++ b/test/err/GenSlash.err @@ -1,5 +1,5 @@ -test/err/GenSlash.raz:6:10: error: "/" is for reals, found an integer constant +test/err/GenSlash.raz:6:10: error: "/" divides reals, not integers 6 | x := 6 / 3; | ^^^^^ -help: integers divide with "div" +help: to divide integers, write 6 div 3 raz: 1 error diff --git a/test/err/GenSlashVar.err b/test/err/GenSlashVar.err index bfabd16..ff18df7 100644 --- a/test/err/GenSlashVar.err +++ b/test/err/GenSlashVar.err @@ -1,5 +1,5 @@ -test/err/GenSlashVar.raz:6:10: error: "/" is for reals, found I64 +test/err/GenSlashVar.raz:6:10: error: "/" divides reals, not integers 6 | x := x / y; | ^^^^^ -help: integers divide with "div" +help: to divide integers, write x div y raz: 1 error diff --git a/test/err/Mixed.err b/test/err/Mixed.err index a75acd8..6f59d05 100644 --- a/test/err/Mixed.err +++ b/test/err/Mixed.err @@ -1,4 +1,5 @@ -test/err/Mixed.raz:6:10: error: different types: F32 and F64 +test/err/Mixed.raz:6:10: error: F32 and F64 are different types 6 | y := x + y; | ^^^^^ +help: convert one to the other's type, as in F32(y) raz: 1 error diff --git a/test/err/Recover.err b/test/err/Recover.err index e3b39be..dc112f0 100644 --- a/test/err/Recover.err +++ b/test/err/Recover.err @@ -10,13 +10,13 @@ test/err/Recover.raz:16:10: error: y isn't declared 16 | x := y + 1; | ^ -test/err/Recover.raz:19:14: error: can't combine I64 and BOOL +test/err/Recover.raz:19:14: error: I64 and BOOL are different types 19 | x := (x + 2) * b; | ^^^^^^^^^^^ test/err/Recover.raz:20:17: error: z isn't declared 20 | Out.int(z); | ^ -test/err/Recover.raz:22:12: error: can't combine I64 and BOOL +test/err/Recover.raz:22:12: error: I64 and BOOL are different types 22 | return x + true; | ^^^^^^^^ test/err/Recover.raz:28:7: error: Q has no field c