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

Scalala and @specialized don't get along with Scala 2.9.x #4541

Closed
scabug opened this issue May 4, 2011 · 9 comments
Closed

Scalala and @specialized don't get along with Scala 2.9.x #4541

scabug opened this issue May 4, 2011 · 9 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented May 4, 2011

=== What steps will reproduce the problem ===

Checkout Scalala from my repo at the following points.

Run: sbt update; sbt compile

Branch: https://github.com/retronym/Scalala/commits/scala-2.9-take2

https://github.com/retronym/Scalala/tree/b64ee3647f9654d83c58391644e1f6c8c54faacd

https://github.com/retronym/Scalala/tree/e32202b6c0ee925cbab4d943d5bcbedf37f7aa2d

=== What is the expected behavior? ===

Successful compilation, as per -no-specialization

=== What do you see instead? ===

Compilation failure.

=== Additional information ===

I haven't had time to isolate these yet. But I wanted to post a bug to make this issue visible in the lead up to 2.9.0.

=== What versions of the following are you using? ===

  • Scala: 2.9.0.RC3
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 4, 2011

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 4, 2011

Daniel Ramage (dramage) said:
There are multiple problems - one regarding 'protected' on specialized vars that are constructor parameters (which retronym worked around) and at least one more with no obvious workaround. In both cases the compiler crashes and burns.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 4, 2011

@dragos said:
Does it work with 2.8.1?

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 4, 2011

Daniel Ramage (dramage) said:
Same errors in 2.8.1

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 23, 2011

Matthew Pocock (drdozer) said:
I'm still seeing this against 2.9.0-1 when trying to build SparseArray from scalala.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 28, 2011

@axel22 said (edited on Sep 28, 2011 4:38:33 PM UTC):
Can you point me to an example in the source code which uses protected on specialized constructor parameter vars, and the examples of other problems? It would be easier to construct a smaller snippet where this fails and work with that.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 28, 2011

Matthew Pocock (drdozer) said:
Try to build the SparseArray class with the constructor args set to private. The compilation will fail. You have to scope the protected access to get it to build.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 29, 2011

@axel22 said:
A short failing snippet:

@SerialVersionUID(1L)
final class SparseArray[@specialized T](private var data : Array[T]) extends Serializable {
  def use(inData : Array[T]) = {
    data = inData;
  }
  
  def set(that : SparseArray[T]) = {
    use(that.data.clone)
  }
}
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 11, 2011

Commit Message Bot (anonymous) said:
(prokopec in r25988) Work in progress on #4541.

No review.

@scabug scabug closed this Jun 18, 2012
@scabug scabug added this to the 2.10.0-M4 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.