@@ -255,28 +255,24 @@ defmodule Module.Types.Of do
255255 type = specifier_type ( kind , right )
256256 expr = { :<<>> , meta , args }
257257
258- context =
258+ { _type , context } =
259259 case kind do
260260 :match ->
261- case Module.Types.Pattern . of_match_var ( left , type , expr , stack , context ) do
262- { :ok , _type , context } -> context
263- { :error , context } -> context
264- end
261+ Module.Types.Pattern . of_match_var ( left , type , expr , stack , context )
265262
266263 :guard ->
267264 case Module.Types.Pattern . of_guard ( left , type , expr , stack , context ) do
268- { :ok , _type , context } -> context
269- { :error , context } -> context
265+ { :ok , type , context } -> { type , context }
266+ { :error , context } -> { dynamic ( ) , context }
270267 end
271268
272269 :expr ->
273270 case Module.Types.Expr . of_expr ( left , stack , context ) do
274271 { :ok , actual , context } ->
275- { _type , context } = intersect ( actual , type , expr , stack , context )
276- context
272+ intersect ( actual , type , expr , stack , context )
277273
278274 { :error , context } ->
279- context
275+ { dynamic ( ) , context }
280276 end
281277 end
282278
0 commit comments