summaryrefslogtreecommitdiff
path: root/test/files/pos/t361.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t361.scala')
-rw-r--r--test/files/pos/t361.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/t361.scala b/test/files/pos/t361.scala
new file mode 100644
index 0000000000..1d19ecb523
--- /dev/null
+++ b/test/files/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)
+}