Skip to content

UnitConstants.day conflicts with IntelliJ's auto organize imports and 'd' suffix for doubles #728

@EotT123

Description

@EotT123

When using IntelliJ IDEA with auto organize imports enabled, a conflict occurs when referencing manifold.science.util.UnitConstants.day. IntelliJ interprets day incorrectly due to the 'd' suffix used for double literals.

import static manifold.science.util.UnitConstants.*;

Time time = 1.2day;

The code is parsed as 1.2d ay, where 'd' is incorrectly interpreted as the double suffix, and ay is an unrecognized symbol.
IntelliJ removes the static import of day, as it is unused.
This results in a compilation error: Cannot resolve symbol 'ay'

The same issue also occurs with manifold.science.measures.TimeUnit.Day;

(This behavior is also visible in GitHub's syntax highlighting.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions