Project

General

Profile

Bug #2419

Type mismatch error in the converted code when integer literal passed to decimal parameter

Added by Hynek Cihlar over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/12/2014
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Hynek Cihlar over 9 years ago

The following piece of code converts to uncompilable Java code.

function foo returns integer (input p as dec):
   return 0.
end.

foo(1).

The above is converted to (showing only the relevant part):

   public void execute()
   {
      externalProcedure(new Block()
      {
         public void body()
         {
            foo(new integer(1));
         }
      });
   }

   public integer foo(final decimal _p)
   {
      return function(integer.class, new Block()
      {
         decimal p = new decimal(_p);

         public void body()
         {
            returnNormal(0);
         }
      });
   }

Also available in: Atom PDF