You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GenICode the definition of adapt has several questionable cases that do not seem reachable. Need to investigate and either comment why they are necessary and add tests, or remove them if they are dead code.
This defines conforms as either a subtype relation or the case when from is null and to is nothing. When would we have a null when we expect nothing?
valconforms= (from <:< to) || (from ==NullReference&& to ==NothingReference)
This is saying if we have a throwable and a non-throwable is expected then we should emit a cast? Why would we get here?
And why do we need this special case? It's saying that from conformed with to, but that to is a LONG and from was int sized but that shouldn't happen, because conforms is defined as the subtype relation <:< and INT isn't a subtype of LONG however, removing it breaks test/files/run/t107.scala
case _ =>// widen subrange typesif (from.isIntSizedType && to ==LONG)
coerce(INT, LONG)
The text was updated successfully, but these errors were encountered:
@JamesIry said:
I think the first two are legacies from early iterations on bolting "Null" and "Nothing" into the JVM. If I whack them the don't break any tests.
The last one does break a test if removed. So I'll look into why we need it.
In GenICode the definition of adapt has several questionable cases that do not seem reachable. Need to investigate and either comment why they are necessary and add tests, or remove them if they are dead code.
This defines conforms as either a subtype relation or the case when from is null and to is nothing. When would we have a null when we expect nothing?
This is saying if we have a throwable and a non-throwable is expected then we should emit a cast? Why would we get here?
And why do we need this special case? It's saying that from conformed with to, but that to is a LONG and from was int sized but that shouldn't happen, because conforms is defined as the subtype relation <:< and INT isn't a subtype of LONG however, removing it breaks test/files/run/t107.scala
The text was updated successfully, but these errors were encountered: