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
Dynamic is broken. #4536
Comments
Imported From: https://issues.scala-lang.org/browse/SI-4536?orig=1
|
@dragos said: |
@dcsobral said: The compiler should not do that. Furthermore, IMHO, any non-abstract class extending Dynamic should implement applyDynamic or an error should be returned. |
@jsalvata said: (1) Preventing the compiler running away by stopping it dynamically applying a call to "applyDynamic". This is sufficient to stop this bug proper, but puts the weight on the client, as the error only shows up at the point of call. (2) Forbidding any subclassing of scala.Dynamic without declaring an applyDynamic member -- even traits or abstract classes. Forbidding it only for concrete classes is not sufficient because intermediate abstract classes would cause the error in (1) to come up, which could be pretty mysterious if it's a library class and the user doesn't even know about Dynamic. Note that with change (2), the only way to run into (1) will be to call a dynamic method on scala.Dynamic directly or some class file compiled with an older version of the compiler. Please review the patch carefully both in concept and in implementation, as I am not a computer language theorist and it's my first attempt at changing the scala compiler. Tomorrow I'll try to find out how to add test cases and create some for this change. |
@jsalvata said (edited on Sep 29, 2011 6:51:21 AM UTC): |
@jsalvata said: |
@jsalvata said (edited on Oct 2, 2011 5:19:50 PM UTC): |
@paulp said: |
@paulp said: |
@jsalvata said: "U" stands for "Universal", but apparently the time dimension is not included. |
@paulp said: |
applyDynamic goes into an infinite loop, calling "applyDynamic" on itself. For instance, try the pastie at http://pastie.org/pastes/1469174/text . But my guess is anything will be the same.
The text was updated successfully, but these errors were encountered: