summaryrefslogtreecommitdiff
path: root/test/files/pos/bug361.scala
blob: 1e490c3812e672ed53d2f1a5687832d7216fccb6 (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);
}