summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-04-25 21:13:29 +0300
committerEugene Burmako <xeno.by@gmail.com>2012-04-25 21:56:36 +0300
commitb242637ee1fc6db79992a67073219ec87150d06a (patch)
tree828d854e66c4bfc8d7008bf726e893f730ed920b /src
parent5cf9499731255078de62c8f3704fa596b564bf0e (diff)
downloadscala-b242637ee1fc6db79992a67073219ec87150d06a.tar.gz
scala-b242637ee1fc6db79992a67073219ec87150d06a.tar.bz2
scala-b242637ee1fc6db79992a67073219ec87150d06a.zip
diagnostics for SI-5692
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
index 52648380ec..192cc94b90 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
@@ -62,9 +62,16 @@ abstract class Pickler extends SubComponent {
// when we pickle it: so let's report an error instead. We know next
// to nothing about what happened, but our supposition is a lot better
// than "bad type: <error>" in terms of explanatory power.
- for (t <- unit.body ; if t.isErroneous) {
- unit.error(t.pos, "erroneous or inaccessible type")
- return
+ for (t <- unit.body) {
+ if (t.isErroneous) {
+ unit.error(t.pos, "erroneous or inaccessible type")
+ return
+ }
+
+ if (!t.isDef && t.hasSymbol && t.symbol.isTermMacro) {
+ unit.error(t.pos, "macro has not been expanded")
+ return
+ }
}
pickle(unit.body)