summaryrefslogtreecommitdiff
path: root/test/junit
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-07 11:10:15 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-07 11:10:15 +1000
commit7830b4689a5f9962011f117c9b866a939795e58a (patch)
treecc3e0a2bbf67d350775d44dbe648ea2e37451c1c /test/junit
parent000de44e3b1f1c0c4bc30eda8ef155548714a6af (diff)
parent17992f672f7d5663654a1ea365dfd1dad7061410 (diff)
downloadscala-7830b4689a5f9962011f117c9b866a939795e58a.tar.gz
scala-7830b4689a5f9962011f117c9b866a939795e58a.tar.bz2
scala-7830b4689a5f9962011f117c9b866a939795e58a.zip
Merge pull request #4083 from retronym/ticket/8947
SI-8947 Avoid cross talk between tag materializers and reify
Diffstat (limited to 'test/junit')
-rw-r--r--test/junit/scala/tools/nsc/symtab/CannotHaveAttrsTest.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/junit/scala/tools/nsc/symtab/CannotHaveAttrsTest.scala b/test/junit/scala/tools/nsc/symtab/CannotHaveAttrsTest.scala
index d424f12710..69931c9e24 100644
--- a/test/junit/scala/tools/nsc/symtab/CannotHaveAttrsTest.scala
+++ b/test/junit/scala/tools/nsc/symtab/CannotHaveAttrsTest.scala
@@ -64,4 +64,16 @@ class CannotHaveAttrsTest {
assertThrows[IllegalArgumentException] { t.setType(tpe) }
}
}
+
+ class Attach
+ @Test
+ def attachmentsAreIgnored = {
+ attrlessTrees.foreach { t =>
+ t.setAttachments(NoPosition.update(new Attach))
+ assert(t.attachments == NoPosition)
+ t.updateAttachment(new Attach)
+ assert(t.attachments == NoPosition)
+ t.removeAttachment[Attach] // no exception
+ }
+ }
}