GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1348

Wrong syntax highlighting when a method parameter named "owner" is referenced within the body of a closure used inside that method

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.6.1.M1
    • Fix Version/s: None
    • Component/s: Inferencing Engine
    • Labels:
    • Number of attachments :
      0

      Description

      Consider the following interface:

      package test;
      
      public interface I
      {
      	String getProp();
      }
      

      and the following Groovy class:

      package test
      
      class A {
      	String myMethod(I owner) {
      		doNothing { return owner.prop }
      	}
      
      	Object doNothing(Closure<Object> c) {
      		return c.call()
      	}
      }
      

      Look at the body of myMethod. The prop property of owner is underlined because at that point owner is not recognized as the "owner" method parameter of myMethod: the parser seems to think it's the owner of the closure, although the "mark occurences" and the "go to declaration" features work correctly.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Mauro Molinari
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: