summaryrefslogtreecommitdiff
path: root/test/files/pos/bug361.scala
blob: ea48187a2b06ebdc57ecabf7a7b18401c580566b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class bug361Global with bug361Trees;

abstract class bug361Trees: 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);
}