diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Tc/Gen/Foreign.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Gen/Foreign.hs b/compiler/GHC/Tc/Gen/Foreign.hs index caa7feeca7..31c42f86d6 100644 --- a/compiler/GHC/Tc/Gen/Foreign.hs +++ b/compiler/GHC/Tc/Gen/Foreign.hs @@ -341,9 +341,10 @@ tcCheckFIType arg_tys res_ty idecl@(CImport src (L lc cconv) (L ls safety) mh checkForeignRes nonIOok checkSafe (isFFIPrimResultTy dflags) res_ty return (CImport src (L lc cconv) (L ls safety) mh (CFunction target)) | cconv == JavaScriptCallConv = do + cconv' <- checkCConv (Right idecl) cconv checkCg (Right idecl) backendValidityOfCImport -- leave the rest to the JS backend (at least for now) - return (CImport src (L lc cconv) (L ls safety) mh (CFunction target)) + return (CImport src (L lc cconv') (L ls safety) mh (CFunction target)) | otherwise = do -- Normal foreign import checkCg (Right idecl) backendValidityOfCImport cconv' <- checkCConv (Right idecl) cconv |