summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-06-24 15:19:05 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-06-24 18:10:42 +1000
commit1f7417c763fb199cacc6afedc6e54796916fd673 (patch)
treebd00d7e0e47be310172f01c758c01ca5430063c4 /test/files/pos
parent73f40564a6b19e8b15f0908c3e24f1a8fe405605 (diff)
parent1b09e12ef3b3fea1cab56bac893295f74de23b8b (diff)
downloadscala-1f7417c763fb199cacc6afedc6e54796916fd673.tar.gz
scala-1f7417c763fb199cacc6afedc6e54796916fd673.tar.bz2
scala-1f7417c763fb199cacc6afedc6e54796916fd673.zip
Merge branch '2.11.x' into merge/2.11.x-to-2.12.x-20150624
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/SI-4012-b.scala2
-rw-r--r--test/files/pos/delambdafy-patterns.scala2
-rw-r--r--test/files/pos/t6575b.scala2
-rw-r--r--test/files/pos/t6648.scala2
-rw-r--r--test/files/pos/t7200b.scala2
-rw-r--r--test/files/pos/t8947/Macro_1.scala2
-rw-r--r--test/files/pos/t9321.scala10
-rw-r--r--test/files/pos/t9356/Foo_2.scala6
-rw-r--r--test/files/pos/t9356/MyAnnotation.java12
-rw-r--r--test/files/pos/t9356/Test_3.scala3
10 files changed, 37 insertions, 6 deletions
diff --git a/test/files/pos/SI-4012-b.scala b/test/files/pos/SI-4012-b.scala
index 6bc8592766..f6d84963e4 100644
--- a/test/files/pos/SI-4012-b.scala
+++ b/test/files/pos/SI-4012-b.scala
@@ -6,7 +6,7 @@ object Sub extends Super[Int] {
// it is expected that super[Super].superb crashes, since
// specialization does parent class rewiring, and the super
// of Sub becomes Super$mcII$sp and not Super. But I consider
- // this normal behavior -- if you want, I can modify duplicatiors
+ // this normal behavior -- if you want, I can modify duplicators
// to make this work, but I consider it's best to keep this
// let the user know Super is not the superclass anymore.
// super[Super].superb - Vlad
diff --git a/test/files/pos/delambdafy-patterns.scala b/test/files/pos/delambdafy-patterns.scala
index 95d498629b..ca9eaa67e3 100644
--- a/test/files/pos/delambdafy-patterns.scala
+++ b/test/files/pos/delambdafy-patterns.scala
@@ -2,7 +2,7 @@ class DelambdafyPatterns {
def bar: Unit = ()
def wildcardPatternInTryCatch: Unit => Unit = (x: Unit) =>
// patterns in try..catch are preserved so we need to be
- // careful when it comes to free variable detction
+ // careful when it comes to free variable detection
// in particular a is _not_ free variable, also the
// `_` identifier has no symbol attached to it
try bar catch {
diff --git a/test/files/pos/t6575b.scala b/test/files/pos/t6575b.scala
index d3e58b2a16..c89424287a 100644
--- a/test/files/pos/t6575b.scala
+++ b/test/files/pos/t6575b.scala
@@ -1,5 +1,5 @@
// inferred types were okay here as Function nodes aren't
-// translated into anoymous subclasses of AbstractFunctionN
+// translated into anonymous subclasses of AbstractFunctionN
// until after the typer.
//
// So this test is just confirmation.
diff --git a/test/files/pos/t6648.scala b/test/files/pos/t6648.scala
index 9593ebfee9..b8f24870cc 100644
--- a/test/files/pos/t6648.scala
+++ b/test/files/pos/t6648.scala
@@ -10,7 +10,7 @@ class Transformer {
}
object transformer1 extends Transformer {
- // Adding explicit type arguments, or making the impilcit view
+ // Adding explicit type arguments, or making the implicit view
// seqToNodeSeq explicit avoids the crash
NodeSeq.foo {
// These both avoid the crash:
diff --git a/test/files/pos/t7200b.scala b/test/files/pos/t7200b.scala
index 9d579c6ef9..59be898fd0 100644
--- a/test/files/pos/t7200b.scala
+++ b/test/files/pos/t7200b.scala
@@ -10,7 +10,7 @@ trait Foo {
object O extends Foo {
def coflatMap[A <: T](f: A) = {
val f2 = coflatMap(f) // inferred in 2.9.2 / 2.10.0 as [Nothing]
- f2.t // so this does't type check.
+ f2.t // so this fails to type check.
f2
}
}
diff --git a/test/files/pos/t8947/Macro_1.scala b/test/files/pos/t8947/Macro_1.scala
index 4a5de3decb..ace389f339 100644
--- a/test/files/pos/t8947/Macro_1.scala
+++ b/test/files/pos/t8947/Macro_1.scala
@@ -35,7 +35,7 @@ object X {
// symtab.EmptyTree.setAttachments(symtab.NoPosition)
// }
//
- // To make this visible to the macro implementaiton, it will need to be compiled in an earlier stage,
+ // To make this visible to the macro implementation, it will need to be compiled in an earlier stage,
// e.g a separate SBT sub-project.
}
diff --git a/test/files/pos/t9321.scala b/test/files/pos/t9321.scala
new file mode 100644
index 0000000000..ed3a816656
--- /dev/null
+++ b/test/files/pos/t9321.scala
@@ -0,0 +1,10 @@
+object p {
+ trait A {
+ private[p] val qualifiedPrivateMember = 1
+ }
+
+ def useQualifiedPrivate(b: Mix) =
+ b.qualifiedPrivateMember // allowed
+}
+
+trait Mix extends p.A
diff --git a/test/files/pos/t9356/Foo_2.scala b/test/files/pos/t9356/Foo_2.scala
new file mode 100644
index 0000000000..ab7bb44d0e
--- /dev/null
+++ b/test/files/pos/t9356/Foo_2.scala
@@ -0,0 +1,6 @@
+class C
+
+trait Foo {
+ @annot.MyAnnotation(cls = classOf[C])
+ def function: Any = ???
+}
diff --git a/test/files/pos/t9356/MyAnnotation.java b/test/files/pos/t9356/MyAnnotation.java
new file mode 100644
index 0000000000..b6c00e7356
--- /dev/null
+++ b/test/files/pos/t9356/MyAnnotation.java
@@ -0,0 +1,12 @@
+package annot;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MyAnnotation {
+ Class<?> cls();
+}
diff --git a/test/files/pos/t9356/Test_3.scala b/test/files/pos/t9356/Test_3.scala
new file mode 100644
index 0000000000..fa1b76c9e1
--- /dev/null
+++ b/test/files/pos/t9356/Test_3.scala
@@ -0,0 +1,3 @@
+class Foo1 extends Foo
+
+class Foo2 extends Foo \ No newline at end of file