blob: f44fb32d478c8b7467b50608e3f86c516639e020 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// $Id$
class Bug361Global extends Bug361Trees
abstract class Bug361Trees { self: Bug361Global =>
abstract class Tree {
var pos: Int = 0
}
object posAssigner {
def atPos[T <: Tree](pos: Int, tree: T): T = {
tree.pos = pos; tree
}
}
def atPos[T <: Tree](pos: Int)(tree: T): T = posAssigner.atPos(pos, tree)
}
|