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

self reference no longer considered stable for use as an import qualifier #8207

Closed
scabug opened this issue Jan 29, 2014 · 7 comments
Closed

Comments

@scabug
Copy link

scabug commented Jan 29, 2014

The following compiles in Scala 2.10.3

class RichInt(val toInt: Int) extends AnyVal { me =>
  import me.{toInt => i}

  def squared: Long = i.toLong * i.toLong
}

But not in Scala 2.11.0-M8:

<console>:8: error: stable identifier required, but RichInt.this found.
        import me.{toInt => i}
               ^
@scabug
Copy link
Author

scabug commented Jan 29, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8207?orig=1
Reporter: @Sciss
Affected Versions: 2.11.0-M8
See #6815

@scabug
Copy link
Author

scabug commented Feb 6, 2014

@retronym said:
Regressed in #6815 / scala/scala#2374

@scabug
Copy link
Author

scabug commented Feb 6, 2014

@retronym said:
No value class needed, actually, updated description.

@scabug
Copy link
Author

scabug commented Feb 6, 2014

@xeno-by said:
If anything changes here, we will need to update scala/scala#3391.

@scabug
Copy link
Author

scabug commented Feb 6, 2014

@retronym said:
scala/scala#3476

@scabug
Copy link
Author

scabug commented Feb 6, 2014

@retronym said:
Eugene: I don't understand the connection.

@scabug
Copy link
Author

scabug commented Feb 6, 2014

@xeno-by said:
Adriaan's pull request removed the necessity to synchronize the volatileXXX bookkeeping variables, because now it's only used in typer. If we were to revert that change, we'd need to synchronize these variables again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants