1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

fix test type errors

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
This commit is contained in:
joshvera 2018-11-14 19:46:30 -05:00
parent dba7f17d48
commit c7040f6131
2 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,9 @@ import SpecHelpers
import qualified Data.Abstract.ScopeGraph as ScopeGraph
import qualified Data.Abstract.Heap as Heap
import Data.Text (pack)
import qualified Language.TypeScript.Assignment as TypeScript
import Data.Quieterm
import Data.Location
spec :: TaskConfig -> Spec
spec config = parallel $ do
@ -77,7 +80,7 @@ spec config = parallel $ do
it "fails exporting symbols not defined in the module" $ do
(_, res) <- evaluate ["bad-export.ts", "pip.ts", "a.ts", "foo.ts"]
res `shouldBe` Left (SomeError (inject @(BaseError EvalError) (BaseError (ModuleInfo "foo.ts") emptySpan (ExportError "foo.ts" (name "pip")))))
res `shouldBe` Left (SomeError (inject @(BaseError (EvalError Precise (Value (Quieterm (Sum TypeScript.Syntax) Location) Precise))) (BaseError (ModuleInfo "foo.ts") emptySpan (ExportError "foo.ts" (name "pip")))))
it "evaluates early return statements" $ do
(_, res) <- evaluate ["early-return.ts"]

View File

@ -74,7 +74,7 @@ newtype SpecEff = SpecEff
(Eff (ErrorC (Return Precise Val)
(Eff (AllocatorC Precise
(Eff (DerefC Precise Val
(Eff (ResumableC (BaseError EvalError)
(Eff (ResumableC (BaseError (EvalError Precise Val))
(Eff (ResumableC (BaseError (AddressError Precise Val))
(Eff (ResumableC (BaseError (ValueError SpecEff Precise))
(Eff (ResumableC (BaseError (HeapError Precise))