diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-19 15:21:34 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-19 15:21:34 +0100 |
commit | 63c582b39ba8a248c9d6ad23db2224ea4a809a58 (patch) | |
tree | d953fd9c0b8b8e7c6f22158e27dff9db8944d745 /tests/pending/pos/CustomGlobal.scala | |
parent | 73d008317a6afaa0fea103ec0c84a39386f7d776 (diff) | |
download | dotty-63c582b39ba8a248c9d6ad23db2224ea4a809a58.tar.gz dotty-63c582b39ba8a248c9d6ad23db2224ea4a809a58.tar.bz2 dotty-63c582b39ba8a248c9d6ad23db2224ea4a809a58.zip |
Test re-org.
Moved some working test to pos. I wonder why they were in pending? They did work for me.
Diffstat (limited to 'tests/pending/pos/CustomGlobal.scala')
-rw-r--r-- | tests/pending/pos/CustomGlobal.scala | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/pending/pos/CustomGlobal.scala b/tests/pending/pos/CustomGlobal.scala deleted file mode 100644 index a5668bd7c..000000000 --- a/tests/pending/pos/CustomGlobal.scala +++ /dev/null @@ -1,33 +0,0 @@ -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) - } - } - } -} |