fix: duplicate private instance name avoidance under the module system (#9914)

This commit is contained in:
Sebastian Ullrich 2025-08-14 11:03:41 +01:00 committed by GitHub
parent 6b3aed29b9
commit 6e1451dbd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -1386,7 +1386,9 @@ def elabMutualDef (ds : Array Syntax) : CommandElabM Unit := do
let modifiers ← elabModifiers ⟨d[0]⟩
if ds.size > 1 && modifiers.isNonrec then
throwErrorAt d "invalid use of 'nonrec' modifier in 'mutual' block"
let mut view ← mkDefView modifiers d[1]
let mut view ←
withExporting (isExporting := modifiers.visibility.isInferredPublic (← getEnv)) do
mkDefView modifiers d[1]
if view.kind != .example && view.value matches `(declVal| := rfl) then
view := view.markDefEq
let fullHeaderRef := mkNullNode #[d[0], view.headerRef]

View file

@ -1,5 +1,7 @@
#include "util/options.h"
// Dear CI, please update stage 0
namespace lean {
options get_default_options() {
options opts;