when using a ClosureLiteral with a Param in the generator, i loose the type information (probably param and return type). The generation process stops with “cannot calculate type for closure literal”.
I m just wondering if there is a way to circumvent this situation in the generator (hinting the type somehow?). Of course, i could go with the interface.methodcall instead, but that wouldn t generate a nice literal in the generated code….
The issue with closure literal’s type not properly inferred at generation time is a tricky one. For optimization’s sake the types are computed “locally”, which may cause some information crucial for a proper type analysis to be lost, if the typesystem rules do not declare dependencies properly. But that is not the only possible cause for a miscalculated type.
To better understand your use case, could you provide some more details? If you believe this to be a bug, it’s probably better to just submit an issue in YouTrack.