mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-16 22:35:41 +00:00
Avoid a bug where duplicate declarations were not being detected.
Estimated hours taken: 7 Branches: main Avoid a bug where duplicate declarations were not being detected. This prevented the compiler from bootstraping with MSVC in the grade none.gc.tr.debug. compiler/rtti.m: Remove the varset from the rtti_proc_label structure. This is because rtti_proc_label is used as part of the key for the decl_set structure and sometimes the varset contains all the variables in the proc and sometimes only the headvariables leading to different keys representing the same declaration. Instead record the prog_var and its name together in an assoc_list. compiler/code_util.m: compiler/ml_code_util.m: Handle the new rtti_proc_label structure.
This commit is contained in:
@@ -294,7 +294,7 @@ code_util__make_proc_label(ModuleInfo, PredId, ProcId, ProcLabel) :-
|
||||
code_util__make_proc_label_from_rtti(RttiProcLabel) = ProcLabel :-
|
||||
RttiProcLabel = rtti_proc_label(PredOrFunc, ThisModule,
|
||||
PredModule, PredName, PredArity, ArgTypes, _PredId, ProcId,
|
||||
_VarSet, _HeadVars, _ArgModes, _CodeModel,
|
||||
_HeadVarsWithNames, _ArgModes, _CodeModel,
|
||||
IsImported, _IsPseudoImported, _IsExported,
|
||||
IsSpecialPredInstance),
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user