diff options
Diffstat (limited to 'tests/pos/t361.scala')
-rw-r--r-- | tests/pos/t361.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos/t361.scala b/tests/pos/t361.scala new file mode 100644 index 000000000..1d19ecb52 --- /dev/null +++ b/tests/pos/t361.scala @@ -0,0 +1,16 @@ +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) +} |