parent
095c7b2bfc
commit
44366382d3
2 changed files with 16 additions and 0 deletions
|
|
@ -458,6 +458,8 @@ def renameInaccessibles (mvarId : MVarId) (hs : TSyntaxArray ``binderIdent) : Ta
|
|||
match lctx.getAt? j with
|
||||
| none => pure ()
|
||||
| some localDecl =>
|
||||
if localDecl.isImplementationDetail then
|
||||
continue
|
||||
let inaccessible := !(extractMacroScopes localDecl.userName |>.equalScope callerScopes)
|
||||
let shadowed := found.contains localDecl.userName
|
||||
if inaccessible || shadowed then
|
||||
|
|
|
|||
14
tests/lean/run/5176.lean
Normal file
14
tests/lean/run/5176.lean
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class Foo where
|
||||
|
||||
class Bar extends Foo where
|
||||
bar : True
|
||||
|
||||
def foo : Foo := {}
|
||||
|
||||
example [Bar] : Bar := {
|
||||
foo with bar := by {
|
||||
rename_i inst
|
||||
guard_hyp inst : Bar
|
||||
trivial
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue