Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-183

Parser broken on final qualifier in for loop header

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.6
    • Component/s: Parser

      Description

      I downloaded the set of book projects from the BlueJ website to use as a test set. In the chapter11 directory is a project called "imageviewer-final". Load that up and look at the ImageViewer class. Down near the very bottom, there is a for-each loop that breaks the parser. The scope highlighting makes the problem obvious, but it is definitely a parser problem, not a scope highlighting problem. I've attached a screenshot. The parser thinks that the method ends at the close-parenthesis on that line (and there is a problem with the for-loop ending at the colon too), and hence all the scope highlighting after that point is screwed up. Removing the "final" qualifier from the variable declaration in the for-loop header fixes the problem, so that must be what is confusing the parser.

        Attachments

          Activity

            People

            • Assignee:
              davmac Davin McCall
              Reporter:
              nccb Neil Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: