@@ -115,7 +115,6 @@ defmodule Module.Types.Expr do
115115  end 
116116
117117  # <<...>>> 
118-   # TODO: here (including tests) 
119118  def  of_expr ( { :<<>> ,  _meta ,  args } ,  _expected ,  _expr ,  stack ,  context )  do 
120119    context  =  Of . binary ( args ,  :expr ,  stack ,  context ) 
121120    { binary ( ) ,  context } 
@@ -306,7 +305,6 @@ defmodule Module.Types.Expr do
306305  end 
307306
308307  # TODO: fn pat -> expr end 
309-   # TODO: here 
310308  def  of_expr ( { :fn ,  _meta ,  clauses } ,  _expected ,  _expr ,  stack ,  context )  do 
311309    [ { :-> ,  _ ,  [ head ,  _ ] }  |  _ ]  =  clauses 
312310    { patterns ,  _guards }  =  extract_head ( head ) 
@@ -399,8 +397,6 @@ defmodule Module.Types.Expr do
399397    |>  dynamic_unless_static ( stack ) 
400398  end 
401399
402-   # TODO: for pat <- expr do expr end 
403-   # TODO: here 
404400  def  of_expr ( { :for ,  meta ,  [ _  |  _ ]  =  args } ,  expected ,  expr ,  stack ,  context )  do 
405401    { clauses ,  [ [ { :do ,  block }  |  opts ] ] }  =  Enum . split ( args ,  - 1 ) 
406402    context  =  Enum . reduce ( clauses ,  context ,  & for_clause ( & 1 ,  stack ,  & 2 ) ) 
@@ -414,6 +410,7 @@ defmodule Module.Types.Expr do
414410      # because this is recursive. We need to infer the block type first. 
415411      of_clauses ( block ,  [ dynamic ( ) ] ,  expected ,  expr ,  :for_reduce ,  stack ,  { reduce_type ,  context } ) 
416412    else 
413+       # TODO: Use the collectable protocol for the output 
417414      into  =  Keyword . get ( opts ,  :into ,  [ ] ) 
418415      { into_wrapper ,  gradual? ,  context }  =  for_into ( into ,  meta ,  stack ,  context ) 
419416      { block_type ,  context }  =  of_expr ( block ,  @ pending ,  block ,  stack ,  context ) 
@@ -469,7 +466,6 @@ defmodule Module.Types.Expr do
469466    end 
470467  end 
471468
472-   # TODO: here 
473469  def  of_expr ( 
474470        { { :. ,  _ ,  [ remote ,  :apply ] } ,  _meta ,  [ mod ,  fun ,  args ] }  =  call , 
475471        expected , 
@@ -505,7 +501,6 @@ defmodule Module.Types.Expr do
505501    end 
506502  end 
507503
508-   # TODO: here 
509504  def  of_expr ( { { :. ,  _ ,  [ remote ,  name ] } ,  meta ,  args }  =  call ,  expected ,  _expr ,  stack ,  context )  do 
510505    { remote_type ,  context }  =  of_expr ( remote ,  atom ( ) ,  call ,  stack ,  context ) 
511506    { mods ,  context }  =  Of . modules ( remote_type ,  name ,  length ( args ) ,  call ,  meta ,  stack ,  context ) 
@@ -532,21 +527,18 @@ defmodule Module.Types.Expr do
532527  end 
533528
534529  # Super 
535-   # TODO: here 
536-   def  of_expr ( { :super ,  meta ,  args }  =  expr ,  _expected ,  _expr ,  stack ,  context )  when  is_list ( args )  do 
530+   def  of_expr ( { :super ,  meta ,  args }  =  call ,  expected ,  _expr ,  stack ,  context )  when  is_list ( args )  do 
537531    { _kind ,  fun }  =  Keyword . fetch! ( meta ,  :super ) 
538-     apply_local ( fun ,  args ,  expr ,  stack ,  context ) 
532+     apply_local ( fun ,  args ,  expected ,   call ,  stack ,  context ) 
539533  end 
540534
541535  # Local calls 
542-   # TODO: here 
543-   def  of_expr ( { fun ,  _meta ,  args }  =  expr ,  _expected ,  _expr ,  stack ,  context ) 
536+   def  of_expr ( { fun ,  _meta ,  args }  =  call ,  expected ,  _expr ,  stack ,  context ) 
544537      when  is_atom ( fun )  and  is_list ( args )  do 
545-     apply_local ( fun ,  args ,  expr ,  stack ,  context ) 
538+     apply_local ( fun ,  args ,  expected ,   call ,  stack ,  context ) 
546539  end 
547540
548541  # var 
549-   # TODO: here 
550542  def  of_expr ( var ,  expected ,  expr ,  stack ,  context )  when  is_var ( var )  do 
551543    if  stack . mode  ==  :traversal  do 
552544      { dynamic ( ) ,  context } 
@@ -631,7 +623,6 @@ defmodule Module.Types.Expr do
631623  defp  for_into ( binary ,  _meta ,  _stack ,  context )  when  is_binary ( binary ) , 
632624    do:  { [ :binary ] ,  false ,  context } 
633625
634-   # TODO: Use the collectable protocol for the output 
635626  defp  for_into ( into ,  meta ,  stack ,  context )  do 
636627    meta  = 
637628      case  into  do 
@@ -689,7 +680,7 @@ defmodule Module.Types.Expr do
689680
690681  ## General helpers 
691682
692-   defp  apply_local ( fun ,  args ,  { _ ,  meta ,  _ }  =  expr ,  stack ,  context )  do 
683+   defp  apply_local ( fun ,  args ,  _expected ,   { _ ,  meta ,  _ }  =  expr ,  stack ,  context )  do 
693684    { local_info ,  domain ,  context }  =  Apply . local_domain ( fun ,  args ,  meta ,  stack ,  context ) 
694685
695686    { args_types ,  context }  = 
0 commit comments