aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-01-28 20:38:36 +0100
committerGitHub <noreply@github.com>2017-01-28 20:38:36 +0100
commit6e8933ccc40bbfe1a92c32c2d8314fd6facef12a (patch)
treea2a741e5e1c19caaab034a46c940cbbbd1a74eef /compiler/src/dotty/tools/dotc/typer
parentd5201d3da5b6edb1abc61b51f125c0a3fd56000c (diff)
parentfc2f9314be7281e24e4ce7434f97cc42cb2f01d4 (diff)
downloaddotty-6e8933ccc40bbfe1a92c32c2d8314fd6facef12a.tar.gz
dotty-6e8933ccc40bbfe1a92c32c2d8314fd6facef12a.tar.bz2
dotty-6e8933ccc40bbfe1a92c32c2d8314fd6facef12a.zip
Merge pull request #1896 from dotty-staging/fix/bootstrap
Add sbt-based bootstrap
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/ImportInfo.scala11
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala b/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala
index a5657890e..f7efb2ac2 100644
--- a/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala
+++ b/compiler/src/dotty/tools/dotc/typer/ImportInfo.scala
@@ -30,7 +30,16 @@ object ImportInfo {
class ImportInfo(symf: => Symbol, val selectors: List[untpd.Tree],
symNameOpt: Option[TermName], val isRootImport: Boolean = false)(implicit ctx: Context) {
- lazy val sym = symf
+ // Dotty deviation: we cannot use a lazy val here for the same reason
+ // that we cannot use one for `DottyPredefModuleRef`.
+ def sym = {
+ if (mySym == null) {
+ mySym = symf
+ assert(mySym != null)
+ }
+ mySym
+ }
+ private[this] var mySym: Symbol = _
/** The (TermRef) type of the qualifier of the import clause */
def site(implicit ctx: Context): Type = {