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

Behaviour of scala.Dynamic depends on implementation details of superclasses #5040

Closed
scabug opened this issue Sep 29, 2011 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Sep 29, 2011

This code compiles...

abstract class Prova2 extends Dynamic {
  def applyDynamic(m: String)(): Unit
  //private def privateMethod() = ()
}

object Prova extends App {
  val prova= new Prova2 {
    def applyDynamic(m: String)() = ()
  }
  prova.privateMethod()
}

... but if you uncomment that privateMethod declaration, it fails to compile:
Prova.scala:5: error: method privateMethod in class Prova2 cannot be accessed in Prova2
prova.privateMethod()
^

@scabug
Copy link
Author

scabug commented Sep 29, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5040?orig=1
Reporter: @jsalvata
Affected Versions: 2.9.2

@scabug
Copy link
Author

scabug commented Nov 13, 2011

@jsalvata said:
Sorry I didn't comment on this earlier.

I proposed a patch for this issue in scala/scala#98 -- together with a fix for #4536. Let me know if you need two separate patches.

@scabug
Copy link
Author

scabug commented May 3, 2012

@paulp said:
See my comment on #4536, which I will reproduce so you don't have to: "I don't know what happened, but that link to github is to an xml equality patch. Does the patch still exist somewhere?"

@scabug
Copy link
Author

scabug commented May 3, 2012

@jsalvata said:
Apparently repositories were renamed: scala/legacy-svn-scala#98

@scabug
Copy link
Author

scabug commented May 4, 2012

@paulp said:
Thanks. Things have moved far enough I had to reboot the code, but your participation has been appreciated. Fixed in 780bed7fbb .

@scabug scabug closed this as completed May 4, 2012
@scabug scabug added the dynamic label Apr 7, 2017
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants