[JSCodeGen] Assign a reference of function or array to a Variant variable

Issue #189 resolved
Toky Olivier Razanakotonarivo created an issue

Is it normal please that we cannot assign a reference of function or array to a Variant variable?

Something like this doesn’t work:

  type 
    TFunc = procedure();

  //***************
  var v: Variant;
  var arr: Array of Variant;
  var CB: TFunc;

  v := CB; //Compilation Error
  v := arr; //Compilation Error

The workaround is now:

type 
    TFunc = procedure();

  //***************
  var v: Variant;
  var arr: Array of Variant;
  var CB: TFunc;

  asm
    @v = @CB;
    @v = @arr;
  end;

Comments (3)

  1. Log in to comment