diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-21 12:44:03 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-21 12:44:03 +0100 |
commit | b6755f6927c07337b0819d7503f2c7b1674d892f (patch) | |
tree | 1758dff616c91e4d52e26cd3e407651aa3034fe1 | |
parent | 7d513b4f3342c17e8b603a43c40770d0f97424de (diff) | |
download | dotty-b6755f6927c07337b0819d7503f2c7b1674d892f.tar.gz dotty-b6755f6927c07337b0819d7503f2c7b1674d892f.tar.bz2 dotty-b6755f6927c07337b0819d7503f2c7b1674d892f.zip |
tests reorgs
Move some tests into proper slots + comments what they are.
-rw-r--r-- | tests/disabled/not-representable/pos/annotated-original/C_2.scala (renamed from tests/pending/pos/annotated-original/C_2.scala) | 0 | ||||
-rw-r--r-- | tests/disabled/not-representable/pos/annotated-original/M_1.scala (renamed from tests/pending/pos/annotated-original/M_1.scala) | 0 | ||||
-rw-r--r-- | tests/disabled/not-representable/pos/annotated-treecopy/Impls_Macros_1.scala (renamed from tests/pending/pos/annotated-treecopy/Impls_Macros_1.scala) | 0 | ||||
-rw-r--r-- | tests/disabled/not-representable/pos/annotated-treecopy/Test_2.scala (renamed from tests/pending/pos/annotated-treecopy/Test_2.scala) | 0 | ||||
-rw-r--r-- | tests/disabled/rewrite-needed/CustomGlobal.scala | 33 | ||||
-rw-r--r-- | tests/pending/pos/annotations.scala | 2 |
6 files changed, 35 insertions, 0 deletions
diff --git a/tests/pending/pos/annotated-original/C_2.scala b/tests/disabled/not-representable/pos/annotated-original/C_2.scala index 36a09ffe0..36a09ffe0 100644 --- a/tests/pending/pos/annotated-original/C_2.scala +++ b/tests/disabled/not-representable/pos/annotated-original/C_2.scala diff --git a/tests/pending/pos/annotated-original/M_1.scala b/tests/disabled/not-representable/pos/annotated-original/M_1.scala index 84a01bcce..84a01bcce 100644 --- a/tests/pending/pos/annotated-original/M_1.scala +++ b/tests/disabled/not-representable/pos/annotated-original/M_1.scala diff --git a/tests/pending/pos/annotated-treecopy/Impls_Macros_1.scala b/tests/disabled/not-representable/pos/annotated-treecopy/Impls_Macros_1.scala index 986287dfa..986287dfa 100644 --- a/tests/pending/pos/annotated-treecopy/Impls_Macros_1.scala +++ b/tests/disabled/not-representable/pos/annotated-treecopy/Impls_Macros_1.scala diff --git a/tests/pending/pos/annotated-treecopy/Test_2.scala b/tests/disabled/not-representable/pos/annotated-treecopy/Test_2.scala index 1c6b862ef..1c6b862ef 100644 --- a/tests/pending/pos/annotated-treecopy/Test_2.scala +++ b/tests/disabled/not-representable/pos/annotated-treecopy/Test_2.scala diff --git a/tests/disabled/rewrite-needed/CustomGlobal.scala b/tests/disabled/rewrite-needed/CustomGlobal.scala new file mode 100644 index 000000000..a5668bd7c --- /dev/null +++ b/tests/disabled/rewrite-needed/CustomGlobal.scala @@ -0,0 +1,33 @@ +package custom + +import scala.tools.nsc._, reporters._, typechecker._ + +/** Demonstration of a custom Global with a custom Typer, + * decoupled from trunk. Demonstration: + * +{{{ +scalac -d . CustomGlobal.scala && scala -nc -Yglobal-class custom.CustomGlobal \ + -e 'class Bippy(x: Int) ; def f = new Bippy(5)' + +I'm typing a Bippy! It's a ClassDef. +I'm typing a Bippy! It's a Ident. +I'm typing a Bippy! It's a DefDef. +}}} + * + */ +class CustomGlobal(currentSettings: Settings, reporter: Reporter) extends Global(currentSettings, reporter) { + override lazy val analyzer = new { + val global: CustomGlobal.this.type = CustomGlobal.this + } with Analyzer { + override def newTyper(context: Context): Typer = new CustomTyper(context) + + class CustomTyper(context : Context) extends Typer(context) { + override def typed(tree: Tree, mode: Mode, pt: Type): Tree = { + if (tree.summaryString contains "Bippy") + println("I'm typing a Bippy! It's a " + tree.shortClass + ".") + + super.typed(tree, mode, pt) + } + } + } +} diff --git a/tests/pending/pos/annotations.scala b/tests/pending/pos/annotations.scala index 9235a1ee6..be15a3dcb 100644 --- a/tests/pending/pos/annotations.scala +++ b/tests/pending/pos/annotations.scala @@ -1,3 +1,5 @@ +// Needs an implementation of beanproperty to work + class ann(i: Int) extends scala.annotation.Annotation class cfann(x: String) extends annotation.ClassfileAnnotation |