Commit Graph

4 Commits

Author SHA1 Message Date
Tagir Valeev
3643ee6506 Fixes according to review IDEA-CR-61871
GitOrigin-RevId: 206247808adba050a5839ee8ac0be790bb53c8ac
2020-04-24 08:26:53 +00:00
Tagir Valeev
ec8510b0a6 PsiPolyExpressionUtil#isBooleanOrNumericType: do not check bounds
JLS 15.25 says: ...has return type boolean or Boolean. or ...is convertible to a numeric type.
JLS 5.1.8 says:
A type is said to be convertible to a numeric type if it is a numeric type (§4.2), or it is a reference type that may be converted to a numeric type by unboxing conversion.

Nothing about bounds
PolyConditionalExpressionWithTargetPrimitive test behavior matches Java 9+ now (with --release=8)

GitOrigin-RevId: fa14e909ad623a3ab6bb8355bbbe396003cd782c
2020-04-23 08:56:21 +00:00
Anna Kozlova
3e7b1dca62 conditional: treat nulls separately and accept them as numeric/boolean branches (IDEA-157025) 2016-06-03 15:28:58 +03:00
Anna Kozlova
a15905ae13 conditional expression type: check poly expression first (IDEA-148965) 2015-12-08 09:37:18 +01:00