Don't allow identifier duplicates

This commit is contained in:
2024-08-05 22:56:35 +02:00
parent 9cb9ab536f
commit a1863147f8
4 changed files with 51 additions and 17 deletions

View File

@ -63,7 +63,7 @@ spec = describe "nameAnalysis" $ do
case SymbolTable.lookup "main" <$> actual of
Right lookupResult
| Just (ProcedureInfo localTable _) <- lookupResult ->
localTable `shouldBe` expected
Just localTable `shouldBe` expected
_ -> expectationFailure "Procedure symbol not found"
it "puts variables into the local symbol table" $ do
@ -74,5 +74,5 @@ spec = describe "nameAnalysis" $ do
case SymbolTable.lookup "main" <$> actual of
Right lookupResult
| Just (ProcedureInfo localTable _) <- lookupResult ->
localTable `shouldBe` expected
Just localTable `shouldBe` expected
_ -> expectationFailure "Procedure symbol not found"