candid icon indicating copy to clipboard operation
candid copied to clipboard

Fix ty() for reference

Open chenyan-dfinity opened this issue 2 years ago • 1 comments

The current design of Func and Service cannot produce correct implementation of ty(), because you cannot decide the type for Func::ty(). ty() for references is only defined at the value level, not at the type level.

Two possible solutions:

  1. Use closure and trait to represent function and service references
  2. Special case on ty() when it's a reference. But it breaks compositionally...

chenyan-dfinity avatar Sep 03 '21 17:09 chenyan-dfinity

Any ETA on this? I'm about to embark on implementing this generally in Azle and wondering if this might come out soon.

lastmjs avatar Jun 22 '22 21:06 lastmjs