Add a compiler flag that enables a warning about inferred intersection types

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      It would be convenient to have a flag that would enable warnings for intersection types that might be inferred for the following code: List.of(1, "").
      Similar flags exist in Scala 2 -Xlint:infer-any and in Scala 3 -Winfer-union. Kotlin has an issue requesting a similar flag: https://youtrack.jetbrains.com/issue/KT-23121/Show-warnings-for-types-inferred-to-Any.


            Assignee:
            Unassigned
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: