Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong position for selectDynamic call #7463

Closed
scabug opened this issue May 8, 2013 · 2 comments
Closed

Wrong position for selectDynamic call #7463

scabug opened this issue May 8, 2013 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented May 8, 2013

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.

@scabug
Copy link
Author

scabug commented May 8, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7463?orig=1
Reporter: @sschaef
Affected Versions: 2.10.0
Other Milestones: 2.11.0-M8

@scabug scabug closed this as completed Nov 26, 2013
@scabug
Copy link
Author

scabug commented Mar 11, 2014

@ghik said (edited on Mar 11, 2014 1:02:00 PM UTC):
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).

@scabug scabug added this to the 2.10.4-RC1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants