diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/applydynamic_sip.flags | 1 | ||||
-rw-r--r-- | test/files/run/interop_typetags_are_manifests.flags | 1 | ||||
-rw-r--r-- | test/files/run/macro-openmacros.flags | 3 | ||||
-rw-r--r-- | test/files/run/macro-parse-position.flags | 1 | ||||
-rw-r--r-- | test/files/run/macroPlugins-macroExpand.flags | 1 | ||||
-rw-r--r-- | test/files/run/macroPlugins-typedMacroBody.flags | 1 | ||||
-rw-r--r-- | test/files/run/t6327.flags | 1 | ||||
-rw-r--r-- | test/files/run/t6663.flags | 1 | ||||
-rw-r--r-- | test/files/run/t6731.flags | 1 | ||||
-rw-r--r-- | test/files/run/t8196.check | 7 | ||||
-rw-r--r-- | test/files/run/t8196.scala | 51 | ||||
-rw-r--r-- | test/files/run/t8442.check | 1 | ||||
-rw-r--r-- | test/files/run/t8442/A_1.java | 4 | ||||
-rw-r--r-- | test/files/run/t8442/B_1.java | 3 | ||||
-rw-r--r-- | test/files/run/t8442/C_2.scala | 5 | ||||
-rw-r--r-- | test/files/run/t8442/Test.scala | 29 | ||||
-rw-r--r-- | test/files/run/virtpatmat_staging.flags | 1 |
17 files changed, 111 insertions, 1 deletions
diff --git a/test/files/run/applydynamic_sip.flags b/test/files/run/applydynamic_sip.flags index 1141f97507..ba6d37305e 100644 --- a/test/files/run/applydynamic_sip.flags +++ b/test/files/run/applydynamic_sip.flags @@ -1 +1,2 @@ +-Yrangepos:false -language:dynamics diff --git a/test/files/run/interop_typetags_are_manifests.flags b/test/files/run/interop_typetags_are_manifests.flags new file mode 100644 index 0000000000..ea7fc37e1a --- /dev/null +++ b/test/files/run/interop_typetags_are_manifests.flags @@ -0,0 +1 @@ +-Yrangepos:false diff --git a/test/files/run/macro-openmacros.flags b/test/files/run/macro-openmacros.flags index cd66464f2f..2433c055a4 100644 --- a/test/files/run/macro-openmacros.flags +++ b/test/files/run/macro-openmacros.flags @@ -1 +1,2 @@ --language:experimental.macros
\ No newline at end of file +-Yrangepos:false +-language:experimental.macros diff --git a/test/files/run/macro-parse-position.flags b/test/files/run/macro-parse-position.flags new file mode 100644 index 0000000000..ea7fc37e1a --- /dev/null +++ b/test/files/run/macro-parse-position.flags @@ -0,0 +1 @@ +-Yrangepos:false diff --git a/test/files/run/macroPlugins-macroExpand.flags b/test/files/run/macroPlugins-macroExpand.flags new file mode 100644 index 0000000000..ea7fc37e1a --- /dev/null +++ b/test/files/run/macroPlugins-macroExpand.flags @@ -0,0 +1 @@ +-Yrangepos:false diff --git a/test/files/run/macroPlugins-typedMacroBody.flags b/test/files/run/macroPlugins-typedMacroBody.flags new file mode 100644 index 0000000000..ea7fc37e1a --- /dev/null +++ b/test/files/run/macroPlugins-typedMacroBody.flags @@ -0,0 +1 @@ +-Yrangepos:false diff --git a/test/files/run/t6327.flags b/test/files/run/t6327.flags new file mode 100644 index 0000000000..ea7fc37e1a --- /dev/null +++ b/test/files/run/t6327.flags @@ -0,0 +1 @@ +-Yrangepos:false diff --git a/test/files/run/t6663.flags b/test/files/run/t6663.flags new file mode 100644 index 0000000000..ea7fc37e1a --- /dev/null +++ b/test/files/run/t6663.flags @@ -0,0 +1 @@ +-Yrangepos:false diff --git a/test/files/run/t6731.flags b/test/files/run/t6731.flags new file mode 100644 index 0000000000..ea7fc37e1a --- /dev/null +++ b/test/files/run/t6731.flags @@ -0,0 +1 @@ +-Yrangepos:false diff --git a/test/files/run/t8196.check b/test/files/run/t8196.check new file mode 100644 index 0000000000..b32f42cf07 --- /dev/null +++ b/test/files/run/t8196.check @@ -0,0 +1,7 @@ +t8196.scala:26: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses + form2.g1 // comment this line in order to make the test pass + ^ +warning: there were 2 feature warning(s); re-run with -feature for details +Scope{ + final private val f1: Int +} diff --git a/test/files/run/t8196.scala b/test/files/run/t8196.scala new file mode 100644 index 0000000000..e219ac166b --- /dev/null +++ b/test/files/run/t8196.scala @@ -0,0 +1,51 @@ +import scala.reflect.runtime.{ universe => ru } + +object Test extends App { + + trait FormTrait { + + val runtimeMirror = ru.runtimeMirror(this.getClass.getClassLoader) + val instanceMirror = runtimeMirror.reflect(this) + val members = instanceMirror.symbol.typeSignature.members + def fields = members.filter(_.typeSignature <:< ru.typeOf[Int]) + } + + val f = () => { + + class Form1 extends FormTrait { + val f1 = 5 + } + val form1 = new Form1 + + println(form1.fields) + + val form2 = new FormTrait { + val g1 = new Form1 + } + + form2.g1 // comment this line in order to make the test pass + () + } + + val g = () => { + // Reported as SI-8195, same root cause + trait Form { + + private val runtimeMirror = ru.runtimeMirror(this.getClass.getClassLoader) + private val instanceMirror = runtimeMirror.reflect(this) + private val members = instanceMirror.symbol.typeSignature.members + + } + + val f1 = new Form { + val a = 1 + } + + val f2 = new Form { + val b = f1.a + } + } + + f() + g() +} diff --git a/test/files/run/t8442.check b/test/files/run/t8442.check new file mode 100644 index 0000000000..ce9e8b52ff --- /dev/null +++ b/test/files/run/t8442.check @@ -0,0 +1 @@ +pos: NoPosition Class A_1 not found - continuing with a stub. WARNING diff --git a/test/files/run/t8442/A_1.java b/test/files/run/t8442/A_1.java new file mode 100644 index 0000000000..227451eecd --- /dev/null +++ b/test/files/run/t8442/A_1.java @@ -0,0 +1,4 @@ +@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) +public @interface A_1 { + +}
\ No newline at end of file diff --git a/test/files/run/t8442/B_1.java b/test/files/run/t8442/B_1.java new file mode 100644 index 0000000000..1680684495 --- /dev/null +++ b/test/files/run/t8442/B_1.java @@ -0,0 +1,3 @@ +public class B_1 { + @A_1 public String get() { return ""; } +} diff --git a/test/files/run/t8442/C_2.scala b/test/files/run/t8442/C_2.scala new file mode 100644 index 0000000000..d75d4bd910 --- /dev/null +++ b/test/files/run/t8442/C_2.scala @@ -0,0 +1,5 @@ +class C_2 { + def foo(b: B_1) { + b.get() + } +} diff --git a/test/files/run/t8442/Test.scala b/test/files/run/t8442/Test.scala new file mode 100644 index 0000000000..ff6da4e206 --- /dev/null +++ b/test/files/run/t8442/Test.scala @@ -0,0 +1,29 @@ +import scala.tools.partest._ +import java.io.File + +object Test extends StoreReporterDirectTest { + def code = ??? + + def compileCode(code: String) = { + val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator") + compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(code) + } + + def app = """ + class C_2 { + def foo(b: B_1) { + b.get() + } + } + """ + + def show(): Unit = { + val tClass = new File(testOutput.path, "A_1.class") + assert(tClass.exists) + assert(tClass.delete()) + + // Expecting stub symbol warning, but no stack trace! + compileCode(app) + println(filteredInfos.mkString("\n")) + } +} diff --git a/test/files/run/virtpatmat_staging.flags b/test/files/run/virtpatmat_staging.flags index 48fd867160..0a22f7c729 100644 --- a/test/files/run/virtpatmat_staging.flags +++ b/test/files/run/virtpatmat_staging.flags @@ -1 +1,2 @@ +-Yrangepos:false -Xexperimental |