Details

      Description

      After a transformation of selectDynamic the position for the transformed method is not correctly set. For example

      object X {
        val d = new D
        d.method
      }
      import language.dynamics
      class D extends Dynamic {
        def selectDynamic(name: String) = name
      }
      

      results in (with "scalac -Yrangepos -Xprint-pos -Xprint:parser,typer")

      //after parser
          [29:37]d.method
      
      //after typer
          [29:30][29:30][29]X.this.d.selectDynamic([29]"method")
      

      where the 29 before the string argument in selectDynamic is wrong.

      This was discussed before at https://groups.google.com/d/topic/scala-internals/RgHUcvfh9aU/discussion. Jason also did a quick fix.

        Activity

        Hide
        Roman Janusz added a comment - - edited

        Isn't the position for the entire dynamic selection ([29:30]) also wrong? Should it not be [29:37], just as after parsing? If so, it's still not fixed (at least in 2.10.4-RC3, don't know about 2.11).

        Show
        Roman Janusz added a comment - - edited Isn't the position for the entire dynamic selection ( [29:30] ) also wrong? Should it not be [29:37] , just as after parsing? If so, it's still not fixed (at least in 2.10.4-RC3, don't know about 2.11).

          People

          • Assignee:
            Simon Schäfer
            Reporter:
            Simon Schäfer
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development