fix: wrapInstance: do not leak via un-reducible instances (#13441)

This PR ensures that if wrapInstance encounters an instance that cannot
be reduced to a constructor, the wrapping definition is left at
semireducible transparency to avoid leakage.
This commit is contained in:
Sebastian Ullrich 2026-04-20 08:41:32 +02:00 committed by GitHub
parent cc9a217df8
commit 10338ed1b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -145,7 +145,6 @@ public partial def wrapInstance (inst expectedType : Expr) (compile : Bool := tr
else
let name ← mkAuxDeclName
let wrapped ← mkAuxDefinition name expectedType inst (compile := false)
setReducibilityStatus name .implicitReducible
if isMeta then modifyEnv (markMeta · name)
if compile then
compileDecls (logErrors := logCompileErrors) #[name]

View file

@ -46,7 +46,7 @@ instCD2._aux_1
#guard_msgs in
#print instCD2
/--
info: @[implicit_reducible] private def instCD2._aux_1 : C D2 :=
info: private def instCD2._aux_1 : C D2 :=
instCI2
-/
#guard_msgs in