fix: make the name in dependsOnNoncomputable clickable (#9207)
This PR makes the offending declaration clickable in the error message produced when something should be marked `noncomputable`.
This commit is contained in:
parent
2cf6c2ddc9
commit
bd06e07624
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ def isTrivialConstructorApp? (declName : Name) (args : Array Arg) : ToMonoM (Opt
|
|||
|
||||
def checkFVarUse (fvarId : FVarId) : ToMonoM Unit := do
|
||||
if let some declName := (← get).noncomputableVars.get? fvarId then
|
||||
throwNamedError lean.dependsOnNoncomputable f!"failed to compile definition, consider marking it as 'noncomputable' because it depends on '{declName}', which is 'noncomputable'"
|
||||
throwNamedError lean.dependsOnNoncomputable m!"failed to compile definition, consider marking it as 'noncomputable' because it depends on '{.ofConstName declName}', which is 'noncomputable'"
|
||||
|
||||
def checkFVarUseDeferred (resultFVar fvarId : FVarId) : ToMonoM Unit := do
|
||||
if let some declName := (← get).noncomputableVars.get? fvarId then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue