File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/Lean/Elab/PreDefinition Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,10 @@ private def shouldGenCodeFor (preDef : PreDefinition) : Bool :=
135135 !preDef.kind.isTheorem && !preDef.modifiers.isNoncomputable
136136
137137private def compileDecl (decl : Declaration) : TermElabM Unit := do
138- Lean.compileDecl (logErrors := !(← read).isNoncomputableSection) decl
138+ Lean.compileDecl
139+ -- `meta` should disregard `noncomputable section`
140+ (logErrors := !(← read).isNoncomputableSection || decl.getTopLevelNames.any (isMeta (← getEnv)))
141+ decl
139142
140143register_builtin_option diagnostics.threshold.proofSize : Nat := {
141144 defValue := 16384
Original file line number Diff line number Diff line change @@ -496,3 +496,7 @@ Note: A private declaration `S.s` (from the current module) exists but would nee
496496-/
497497#guard_msgs in
498498@[ expose ] public def useS (s : S) := s.s
499+
500+ noncomputable section
501+ meta def m := S.s
502+ end
You can’t perform that action at this time.
0 commit comments