summaryrefslogtreecommitdiff
path: root/test-nsc/files/pos/bug361.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test-nsc/files/pos/bug361.scala')
-rw-r--r--test-nsc/files/pos/bug361.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test-nsc/files/pos/bug361.scala b/test-nsc/files/pos/bug361.scala
new file mode 100644
index 0000000000..f48c906246
--- /dev/null
+++ b/test-nsc/files/pos/bug361.scala
@@ -0,0 +1,18 @@
+// $Id$
+
+class Bug361Global extends 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);
+}