[typetools/checker-framework] 9ab161: Fix handling of primitives in TypesUtils#leastUppe...

0 views
Skip to first unread message

Artem Pyanykh

unread,
Apr 29, 2022, 11:15:29 AM4/29/22
to checker-fr...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/typetools/checker-framework
Commit: 9ab161404255b9b4f856117de69f9f34c319e8d4
https://github.com/typetools/checker-framework/commit/9ab161404255b9b4f856117de69f9f34c319e8d4
Author: Artem Pyanykh <artem....@gmail.com>
Date: 2022-04-29 (Fri, 29 Apr 2022)

Changed paths:
M javacutil/src/main/java/org/checkerframework/javacutil/TypesUtils.java

Log Message:
-----------
Fix handling of primitives in TypesUtils#leastUpperBound (#5129)

Summary:
The previous version would return incorrect lub in some cases, e.g.:
```
TypesUtils.leastUpperBound(t1=Integer, t2=int) == int
```
This is because int and Integer are assignable to each other, so just
checking assignability is not enough to figure out which type to return.


Reply all
Reply to author
Forward
0 new messages