lean4-htt/tests/lean/private.lean.expected.out
Kyle Miller 5e952598dc
fix: let private names be unresolved in the pretty printer, fix shadowing bug when pp.universes is true (#8617)
This PR fixes (1) an issue where private names are not unresolved when
they are pretty printed, (2) an issue where in `pp.universes` mode names
were allowed to shadow local names, (3) an issue where in `match`
patterns constants shadowing locals wouldn't use `_root_`, and (4) an
issue where tactics might have an incorrect "try this" when
`pp.fullNames` is set. Adds more delaboration tests for name
unresolution.

It also cleans up the `delabConst` delaborator so that it uses
`unresolveNameGlobalAvoidingLocals`, rather than doing any local context
analysis itself. The `inPattern` logic has been removed; it was a
heuristic added back in #575, but it now leads to incorrect results (and
in `match` patterns, local names shadow constants in name resolution).
2025-06-03 23:37:35 +00:00

13 lines
504 B
Text

Bla.foo == "world" : Bool
private.lean:14:12-14:15: error: private declaration 'Bla.foo' has already been declared
foo == 0 : Bool
Bla.foo : String
Boo.Bla.boo == "world" : Bool
Boo.Bla.boo ++ "world" : String
Boo.Bla.boo == "world" : Bool
Boo.boo == 100 : Bool
Boo.Bla.boo == "world" : Bool
Boo.boo == 100 : Bool
Nat.mul10 x : Nat
private.lean:65:12-65:13: error: a non-private declaration 'y' has already been declared
private.lean:68:4-68:5: error: a private declaration 'z' has already been declared