Project

General

Profile

Bug #12145

Functions with conflicting return types are broken during incremental conversion

Added by Dănuț Filimon 14 days ago. Updated 14 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
Incremental Conversion

Related issues

Related to Conversion Tools - Feature #7169: drive conversion order using user-specified dependencies Review

History

#1 Updated by Dănuț Filimon 14 days ago

Examples:
  • func_ret_a.p:
    function fret returns character (): return "a". end.
    function fother returns character (): return "o". end.
    message fret() fother().
    
  • func_ret_b.p
    function fret returns integer (): return 1. end.
    message fret().
    
  • func_ret_caller.p
    message dynamic-function("fret").
    

Conversion reports WARNING: Duplicate function definition fret with different return types: character and integer during Post-Parse Fixups because a and b files contain the fret function with different return types, this means the caller ends up with an empty execute call (message(DYN_FUNC_CALL_SITE_1.clone().execute());)

Steps to reproduce:
  1. Run a full conversion
  2. Add a space to func_ret_a.p, then run incremental conversion
  3. Add a space to func_ret_caller.p, then run incremental conversion
  4. Add a space to func_ret_b.p, then run incremental conversion
  5. Add a space to func_ret_caller.p, then run incremental conversion

Caller now contains the following code: message(DYN_FUNC_CALL_SITE_1.clone().execute(integer.class)); which is wrong, we still have the same code we used for converting initially with zero actual logic changes.

#2 Updated by Dănuț Filimon 14 days ago

  • topics Incremental Conversion added

#3 Updated by Dănuț Filimon 14 days ago

  • Related to Feature #7169: drive conversion order using user-specified dependencies added

Also available in: Atom PDF