summaryrefslogtreecommitdiff
path: root/test/files/pos/t6204-a.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-08-08 12:46:06 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-08-09 01:06:03 +0200
commit2ba6774766ec695fef36e605472100922b56b91f (patch)
treee301e49987c43d4291b8043a71f6f566149deccc /test/files/pos/t6204-a.scala
parent1183f0639ea684d9462c2caf47fb1c41623a86d8 (diff)
downloadscala-2ba6774766ec695fef36e605472100922b56b91f.tar.gz
scala-2ba6774766ec695fef36e605472100922b56b91f.tar.bz2
scala-2ba6774766ec695fef36e605472100922b56b91f.zip
SI-5756 correctly reifies local module classes
Unlike module classes that are going to be pickled (which are reified as `<their module reification>.moduleClass), module classes of local modules need to be reified as symbol defs. Otherwise we get a stack overflow: 1) Local modules are deemed to be free terms, 2) All free symbols are reified together with their type signature (so that they can be a) inspected by anyone interested, b) compiled at runtime), 3) Reifying a type signature of a module involves reifying its module class, 4) Reifying a module class involves reifying a module and calling its module class, <ad infinitum> This stack overflow doesn't happen for locatable modules, because they don't need to have their type signatures reified (these signatures can later be loaded from pickles if it becomes necessary).
Diffstat (limited to 'test/files/pos/t6204-a.scala')
-rw-r--r--test/files/pos/t6204-a.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t6204-a.scala b/test/files/pos/t6204-a.scala
new file mode 100644
index 0000000000..bd8d5c437e
--- /dev/null
+++ b/test/files/pos/t6204-a.scala
@@ -0,0 +1,9 @@
+import scala.reflect.runtime.universe._
+
+object Bish {
+ def m {
+ object Bash {
+ typeOf[Option[_]]
+ }
+ }
+} \ No newline at end of file