vbscript: Return "Name redefined" error for duplicate declarations.

When a name is defined twice (Const/Const, Dim/Const, Const/Dim, Dim/Dim, Sub vs Const/Dim, Class vs Const/Dim/Function, duplicate class members), Windows returns VBScript error 1041 ("Name redefined"). Wine was returning E_FAIL.

Store source locations in const_decl_t, dim_decl_t, function_decl_t, and class_decl_t so errors point to the duplicate name. Also fix duplicate Sub/Function/Property/Dim detection inside classes, including the case where a Property collides with an existing Sub/Function.

Edited by Francis De Brabandere

Merge request reports

Loading