diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/analyzerPlugins.scala | 6 | ||||
-rw-r--r-- | test/files/run/deprecate-early-type-defs.check | 3 | ||||
-rw-r--r-- | test/files/run/deprecate-early-type-defs.flags | 1 | ||||
-rw-r--r-- | test/files/run/deprecate-early-type-defs.scala | 1 |
4 files changed, 9 insertions, 2 deletions
diff --git a/test/files/run/analyzerPlugins.scala b/test/files/run/analyzerPlugins.scala index b20a734fe6..4b297ff220 100644 --- a/test/files/run/analyzerPlugins.scala +++ b/test/files/run/analyzerPlugins.scala @@ -8,7 +8,9 @@ object Test extends DirectTest { def code = """ class testAnn extends annotation.TypeConstraint - class A(param: Double) extends { val x: Int = 1; val y = "two"; type T = A } with AnyRef { + class A(param: Double) extends { val x: Int = 1; val y = "two" } with AnyRef { + type T = A + val inferField = ("str": @testAnn) val annotField: Boolean @testAnn = false @@ -81,7 +83,7 @@ object Test extends DirectTest { output += s"pluginsPt($pt, ${treeClass(tree)})" pt } - + override def pluginsTyped(tpe: Type, typer: Typer, tree: Tree, mode: Mode, pt: Type): Type = { output += s"pluginsTyped($tpe, ${treeClass(tree)})" tpe diff --git a/test/files/run/deprecate-early-type-defs.check b/test/files/run/deprecate-early-type-defs.check new file mode 100644 index 0000000000..1ee01df13e --- /dev/null +++ b/test/files/run/deprecate-early-type-defs.check @@ -0,0 +1,3 @@ +deprecate-early-type-defs.scala:1: warning: early type members are deprecated. Move them to the regular body: the semantics are the same. +object Test extends { type T = Int } with App + ^ diff --git a/test/files/run/deprecate-early-type-defs.flags b/test/files/run/deprecate-early-type-defs.flags new file mode 100644 index 0000000000..c36e713ab8 --- /dev/null +++ b/test/files/run/deprecate-early-type-defs.flags @@ -0,0 +1 @@ +-deprecation
\ No newline at end of file diff --git a/test/files/run/deprecate-early-type-defs.scala b/test/files/run/deprecate-early-type-defs.scala new file mode 100644 index 0000000000..99e42166f2 --- /dev/null +++ b/test/files/run/deprecate-early-type-defs.scala @@ -0,0 +1 @@ +object Test extends { type T = Int } with App
\ No newline at end of file |