feat: add assertNoFun test
This commit is contained in:
parent
82bba1c63b
commit
75f166edcc
1 changed files with 7 additions and 0 deletions
|
|
@ -233,5 +233,12 @@ Assert that the pass under test produces `Decl`s that do not contain
|
|||
def assertDoesNotContainConstAfter (constName : Name) (msg : String) : TestInstaller :=
|
||||
assertForEachDeclAfterEachOccurence (fun _ decl => !decl.value.containsConst constName) msg
|
||||
|
||||
def assertNoFun : TestInstaller :=
|
||||
assertAfter do
|
||||
for decl in (← getDecls) do
|
||||
decl.value.forM fun
|
||||
| .fun .. => throwError "declaration `{decl.name}` contains a local function declaration"
|
||||
| _ => return ()
|
||||
|
||||
end Testing
|
||||
end Lean.Compiler.LCNF
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue