Commit bc604bdb authored by thomie's avatar thomie
Browse files

Update assert to fix retc001 and retc002 (#9243)

Since 2223e196, maybe_old_linkable can
be Nothing even with an up-to-date interface file. This happens when
compiling with --make -fno-code -fwrite-interface.

See also Note [Recompilation checking when typechecking only] in

This fixes retc001 and retc002 when ghc_debugged.

Differential Revision:
parent 3448f982
...@@ -186,7 +186,7 @@ compileOne' m_tc_result mHscMessage ...@@ -186,7 +186,7 @@ compileOne' m_tc_result mHscMessage
case e of case e of
Left iface -> Left iface ->
do details <- genModDetails hsc_env iface do details <- genModDetails hsc_env iface
MASSERT(isJust maybe_old_linkable) MASSERT(isJust maybe_old_linkable || isNoLink (ghcLink dflags))
return (HomeModInfo{ hm_details = details, return (HomeModInfo{ hm_details = details,
hm_iface = iface, hm_iface = iface,
hm_linkable = maybe_old_linkable }) hm_linkable = maybe_old_linkable })
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment