jadams-tresys commented on a change in pull request #183: Fix type coerceion
between signed/unsigned types
URL: https://github.com/apache/incubator-daffodil/pull/183#discussion_r256872019
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dpath/NodeInfoUtils.scala
##########
@@ -113,24 +113,34 @@ object NodeInfoUtils {
case (Float, _) => (Float, Float)
case (_, Integer) => (Integer, Integer)
case (Integer, _) => (Integer, Integer)
+ case (lat, NonNegativeInteger) if (lat.isInstanceOf[SignedInteger.Kind])
=> (Integer, Integer)
Review comment:
The second case works and cleans up the code a lot. I think I was
overthinking things with the if statements.
I've pushed up the changes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services