Improve error locations

This commit is contained in:
2026-02-07 16:55:33 -08:00
parent d1729afea7
commit bca61f95a0
9 changed files with 78 additions and 43 deletions

21
tests/ErrorDup.newt.fail Normal file
View File

@@ -0,0 +1,21 @@
*** Process tests/ErrorDup.newt
module ErrorDup
ERROR at tests/ErrorDup.newt:5:6--5:9: Nat already declared
data Nat = Z | S Nat
data Nat = Z | S Nat
^^^
ERROR at tests/ErrorDup.newt:7:8--7:11: Nat already declared
data Nat = Z | S Nat
record Nat where
^^^
ERROR at tests/ErrorDup.newt:9:7--9:10: Nat already declared
record Nat where
class Nat where
^^^
Compile failed