Java: Restrict attention to integral types in IntMultToLong.

This commit is contained in:
Anders Schack-Mulligen
2019-01-07 14:27:52 +01:00
parent 6f827140d7
commit 203c9fb9d8
2 changed files with 3 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ where
e.getType() = sourceType and
c.getConversionTarget() = destType and
destType.widerThan(sourceType) and
// restrict attention to integral types
destType instanceof IntegralType and
// not a trivial conversion
not c.isTrivial() and
// not an explicit conversion, which is probably intended by a user