JShell: poor disambiguation of less-than from type-argument

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • 10
    • Affects Version/s: 9
    • Component/s: tools
    • None

      jshell> int a
      a ==> 0

      jshell> a < 4
      | Error:
      | illegal start of type
      | a < 4
      | ^

      jshell> int b
      b ==> 0

      jshell> a < b
      | Error:
      | reached end of file while parsing
      | a < b
      | ^

      ----

      Caused by

          t = term(EXPR | TYPE);

      In ReplParser.replUnit()

      Which causes JavacParser.typeArguments() to fail.

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: