Stream: t-compiler

Topic: General way to store additional inference information

B YI (Mar 12 2020 at 10:33, on Zulip):

I am trying to solve this issue. I think I've pinned down the reason. this function reports error when the generic parameter is bi-variant. The variance of parameter T in Foo is deduced from T in Bar. This information is lost. We only store the variance information of T. How do I differentiate those two T? What is the general way to store those kind of information?

Zoxc (Mar 12 2020 at 11:23, on Zulip):

fn crate_variances calculates the variances for all types. I suggest you try to make a function that calculates if the type have any direct usages of T, ideally sharing code with fn crate_variances.

Last update: Jun 04 2020 at 18:10UTC