Skip to content

After version 1.38, putting a ternary as a generic parameter in a function call gives an incorrect error #3899

Description

@DatBrute

json.put("id", id == null ? null : id.longValue());

(json and id are both objects of our own types)
error over .put:

The method put(String, T) in the type Json is not applicable for the arguments (String, Long)Java(67108979)

lines without a ternary conditional operator, such as below, do not give an error

json.put("id", id.longValue());

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions