diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-11 13:02:53 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-11 13:02:53 -0700 |
commit | 1850ddf380789e364813111282af5ff11e65b52c (patch) | |
tree | 38ae4b5f4f56cf5e24b7ac639b4fb297c171f070 /src/scaladoc | |
parent | c85a507ba815643faacd8e07270efbd83b700846 (diff) | |
download | scala-1850ddf380789e364813111282af5ff11e65b52c.tar.gz scala-1850ddf380789e364813111282af5ff11e65b52c.tar.bz2 scala-1850ddf380789e364813111282af5ff11e65b52c.zip |
Corralling Modes into a smaller pen.
Attempting to reduce the frequency of low-level operations
with modes. I mean stuff like this:
if ((mode & (EXPRmode | LHSmode)) == EXPRmode)
THey don't make those ten line boolean guards any easier
to understand. Hopefully this will lead us toward eliminating
some of the modes entirely, or at least better isolating
their logic rather than having it interspersed at arbitrary
points throughout the typer.
Modes are in their entirety a leaked implementation detail.
Typing a tree requires a tree and optionally an expected type.
It shouldn't require a bucket of state bits. In subsequent
commits I will start eliminating them.
This commit also breaks adapt down into more digestible chunks.
Diffstat (limited to 'src/scaladoc')
-rw-r--r-- | src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala index 6cefe34887..8d29bce27e 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala @@ -170,7 +170,7 @@ trait ModelFactoryImplicitSupport { val newContext = context.makeImplicit(context.ambiguousErrors) newContext.macrosEnabled = false val newTyper = global.analyzer.newTyper(newContext) - newTyper.silent(_.typed(appliedTree, EXPRmode, WildcardType), reportAmbiguousErrors = false) match { + newTyper.silent(_.typed(appliedTree), reportAmbiguousErrors = false) match { case global.analyzer.SilentResultValue(t: Tree) => t case global.analyzer.SilentTypeError(err) => |