summaryrefslogtreecommitdiff
path: root/src/interactive
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-01-09 13:43:32 -0800
committerJason Zaugg <jzaugg@gmail.com>2014-01-09 13:43:32 -0800
commite089cafb5fd02e2457bafde3252da3a771d3180e (patch)
treee4f54289554e90fcc24218a58e9c2fbd3d93a713 /src/interactive
parent572b092495ebf1075064d90d7b9bbc90dec2ac76 (diff)
parent94eb751d0063b80e7bca542b9c243900527f9028 (diff)
downloadscala-e089cafb5fd02e2457bafde3252da3a771d3180e.tar.gz
scala-e089cafb5fd02e2457bafde3252da3a771d3180e.tar.bz2
scala-e089cafb5fd02e2457bafde3252da3a771d3180e.zip
Merge pull request #3342 from xeno-by/topic/pres-compiler-macros
Presentation compiler friendliness for macros
Diffstat (limited to 'src/interactive')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/Global.scala4
-rw-r--r--src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala
index 27f10ff00a..b55a573029 100644
--- a/src/interactive/scala/tools/nsc/interactive/Global.scala
+++ b/src/interactive/scala/tools/nsc/interactive/Global.scala
@@ -88,7 +88,6 @@ trait InteractiveAnalyzer extends Analyzer {
}
}
-
/** The main class of the presentation compiler in an interactive environment such as an IDE
*/
class Global(settings: Settings, _reporter: Reporter, projectName: String = "") extends {
@@ -105,6 +104,9 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
import definitions._
+ if (!settings.Ymacroexpand.isSetByUser)
+ settings.Ymacroexpand.value = settings.MacroExpand.Discard
+
val debugIDE: Boolean = settings.YpresentationDebug.value
val verboseIDE: Boolean = settings.YpresentationVerbose.value
diff --git a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
index bc490d8d45..343986a45d 100644
--- a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
+++ b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
@@ -94,7 +94,7 @@ private[tests] trait CoreTestDefs
askAllSources(HyperlinkMarker) { pos =>
askTypeAt(pos)(NullReporter)
} { (pos, tree) =>
- if(tree.symbol == compiler.NoSymbol) {
+ if(tree.symbol == compiler.NoSymbol || tree.symbol == null) {
reporter.println("\nNo symbol is associated with tree: "+tree)
}
else {