JShell should support declaring variables using pattern matching

XMLWordPrintable

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

      Using notation like:
      ---
      o instanceof String s
      //s declared here iff the above evaluates to true
      ---

      or possibly
      ---
      if (!(o instanceof String s)) throw new IllegalStateException();
      //s declared here iff the above didn't throw an exception
      ---

            Assignee:
            Jan Lahoda
            Reporter:
            Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: