We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Environment.find?
1 parent be51365 commit 9982babCopy full SHA for 9982bab
src/Lean/Environment.lean
@@ -454,6 +454,9 @@ private partial def AsyncConsts.findRec? (aconsts : AsyncConsts) (declName : Nam
454
let c ← aconsts.findPrefix? declName
455
if c.constInfo.name == declName then
456
return c
457
+ -- If privacy is the only difference between `declName` and `findPrefix?` result, we can assume
458
+ -- `declName` does not exist according to the `add` invariant
459
+ guard <| privateToUserName c.constInfo.name != privateToUserName declName
460
let aconsts ← c.consts.get.get? AsyncConsts
461
AsyncConsts.findRec? aconsts declName
462
0 commit comments