Commit d74e4c8a authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl
Browse files

allow multiple dependencies on the same generic function but with different...

allow multiple dependencies on the same generic function but with different generic dependency variables
parent 5c0cb62e
......@@ -162,10 +162,6 @@ where
= (acc, (gen_defs, modules, check_generic_dep_error gd_ident "already implicitly depends on itself" cs))
| isMember gen_dep acc
= (acc, (gen_defs, modules, check_generic_dep_error gd_ident "duplicate generic dependency" cs))
// TODO: TvN: This check is to prevent duplicate dependencies with different generic dependency variables
// See functions: generics1.build_specialized_expr and generics1.specialize_type_var
| isMember gen_dep.gd_index [gd_index \\ {gd_index} <- acc]
= (acc, (gen_defs, modules, check_generic_dep_error gd_ident "dependency occurs multiple times with different generic dependency variables, but only one occurrence of the same generic function as a dependency is currently allowed" cs))
= ([gen_dep:acc], (gen_defs, modules, cs))
resolve_dependency_index gen_dep=:{gd_ident} cs
......
This diff is collapsed.
......@@ -1162,7 +1162,6 @@ cNotVarNumber :== -1
| TVI_ConsInstance !DefinedSymbol //AA: generic cons instance function
| TVI_Normalized !Int /* MV - position of type variable in its definition */
| TVI_Expr !Bool !Expression /* AA: Expression corresponding to the type var during generic specialization */
| TVI_Exprs ![(GlobalIndex, Expression)] /* List of expressions corresponding to the type var during generic specialization */
| TVI_Iso !DefinedSymbol !DefinedSymbol !DefinedSymbol
| TVI_GenTypeVarNumber !Int
| TVI_TypeVarArgN !Int // type argument number in module backendconvert
......
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