RFR: 8310905: [lw5] addressing review comments on null restricted types [v6]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Jul 14 00:47:22 UTC 2023
On Thu, 13 Jul 2023 22:35:41 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> addressing some review comments related to PR [1]
>>
>> [1] https://github.com/openjdk/valhalla/pull/872
>
> Vicente Romero has updated the pull request incrementally with two additional commits since the last revision:
>
> - addressing additional review comments
> - dont generate warnings for literals or constructor invocations
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 5407:
> 5405: public boolean hasSameNullability(Type t, Type s) {
> 5406: // special case for literals, a literal is always != null
> 5407: boolean isLiteral = s != null && s.getMetadata(TypeMetadata.ConstantValue.class) != null;
I believe this should be addressed at the level of the `isNullUnspecified` predicates. E.g. if something is a constant type, then you know it's null-restricted (e.g. because we infer it so). Once that's dealt with, I believe these higher-level methods here can stay unchanged?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/880#discussion_r1263167309
More information about the valhalla-dev
mailing list