Commit e2d66af3 authored by Artem Alimarine's avatar Artem Alimarine
Browse files

fixed bug with field indexes in StdGeneric

now sd_field_nr used instead of fs_index
parent 9e72ebd0
......@@ -608,6 +608,7 @@ where
, td_arity_expr
, num_conses_expr
, td_conses_expr
// TODO: module_name_expr
]
predefs heaps
......@@ -719,7 +720,9 @@ where
build_field_dsc group_index cons_dsc_ds field_dsc_ds {fs_ident, fs_index} (modules, heaps)
# name_expr = makeStringExpr fs_ident.id_name
# index_expr = makeIntExpr fs_index
# ({sd_field_nr}, modules)
= modules! [td_module].com_selector_defs.[fs_index]
# index_expr = makeIntExpr sd_field_nr
# (cons_expr, heaps) = buildFunApp main_module_index cons_dsc_ds [] heaps
# (body_expr, heaps)
= buildPredefConsApp PD_CGenericFieldDescriptor
......@@ -1088,7 +1091,7 @@ where
= build_case_expr case_patterns heaps
// REC case
build_case_field var body_expr heaps
build_case_rec var body_expr heaps
# pat = buildPredefConsPattern PD_ConsREC [var] body_expr predefs
# {pds_module, pds_def} = predefs.[PD_TypeREC]
# case_patterns = AlgebraicPatterns {glob_module = pds_module, glob_object = pds_def} [pat]
......
Supports Markdown
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