This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Cryptic specialization bug

No replies
Sciss
Joined: 2008-12-17,
User offline. Last seen 28 weeks 5 days ago.

what would you do with the following issue:

def no[ S <: Sys[ S ], @specialized( Long ) M, D <: Space[ D ]](
t: SkipOctree[ S, D, D#Point ], euclideanDist: DistanceMeasure[ M, D ]) {
t.system.atomic( implicit tx => () )
}

-->
[error] Parameter type in structural refinement may not refer to an abstract type defined outside that refinement
[error] t.system.atomic( implicit tx => () )
[error] ^

versus (remove implicit in tx):

def yes1[ S <: Sys[ S ], @specialized( Long ) M, D <: Space[ D ]](
t: SkipOctree[ S, D, D#Point ], euclideanDist: DistanceMeasure[ M, D ]) {
t.system.atomic( tx => () )
}

and (remove specialization of M):

def yes2[ S <: Sys[ S ], M, D <: Space[ D ]](
t: SkipOctree[ S, D, D#Point ], euclideanDist: DistanceMeasure[ M, D ]) {
t.system.atomic( implicit tx => () )
}

although this looks like a serious bug to me, i simply can't make a standalone case in less than a day's time (the bug appears after i added a method to SkipOctree which is completely unrelated to the above code). file a bug nevertheless?

best, -sciss-

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland