aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/annot-bootstrap.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-18 15:39:55 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-18 15:43:22 +0100
commit223fa2bea328fc53f87d6f9d0c28c67545e831af (patch)
tree0bfffb4a2168df6527779d4d97a87f7309ee333c /tests/pos/annot-bootstrap.scala
parente0bf1758ac32d69cf97d28f449cc0400755e3914 (diff)
downloaddotty-223fa2bea328fc53f87d6f9d0c28c67545e831af.tar.gz
dotty-223fa2bea328fc53f87d6f9d0c28c67545e831af.tar.bz2
dotty-223fa2bea328fc53f87d6f9d0c28c67545e831af.zip
More careful usage of unforced decls in classes.
1) Rename `decls` to `unforcedDecls` to make it clear that it is danegrous to use. 2) Prefer `info.decls` over `unforcedDecls`. This fixes the problem reported in #305 where the primary constructor was not found.
Diffstat (limited to 'tests/pos/annot-bootstrap.scala')
-rw-r--r--tests/pos/annot-bootstrap.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pos/annot-bootstrap.scala b/tests/pos/annot-bootstrap.scala
new file mode 100644
index 000000000..bef877dcd
--- /dev/null
+++ b/tests/pos/annot-bootstrap.scala
@@ -0,0 +1,8 @@
+package scala.annotation.unchecked
+
+// note: if the case class is not inside an object, the error disappears
+object test {
+ case class L(a: Int)
+}
+
+final class uncheckedVariance extends scala.annotation.StaticAnnotation {}