kotlin-spec icon indicating copy to clipboard operation
kotlin-spec copied to clipboard

Use of top type in smart cast analysis transfer function

Open leanderBehr opened this issue 1 year ago • 0 comments

In the definition of the transfer function, $\top$ is used for the second element of the type pair as the "default". As far as I understand, $\top$ this is Any? and in that position would mean that the expression is smart cast to non-nullable.

For example in the rule for x == null this would mean that approxNegationType(N) = approxNegationType(Any?) = Any. Am I misunderstanding this or should the $\top$ s be $\bot$ s?

leanderBehr avatar Jun 08 '23 11:06 leanderBehr