aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-11-19 00:56:32 +0100
committerMartin Odersky <odersky@gmail.com>2016-11-19 00:56:32 +0100
commitddec688b6e165c68cdd9a33dac968ee4a09b447a (patch)
treef97c80652f2b55abe67a387a6b331a128c5cb45b /src
parent30bd586417693fed39045420548b82e9616f0111 (diff)
downloaddotty-ddec688b6e165c68cdd9a33dac968ee4a09b447a.tar.gz
dotty-ddec688b6e165c68cdd9a33dac968ee4a09b447a.tar.bz2
dotty-ddec688b6e165c68cdd9a33dac968ee4a09b447a.zip
Fix memory leak
The lazy val `dummyTree` acquires a type because of copy-on-write and that type can refer via lastDenotation to a context base.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/typer/ProtoTypes.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/ProtoTypes.scala b/src/dotty/tools/dotc/typer/ProtoTypes.scala
index 08f566d49..5eef096db 100644
--- a/src/dotty/tools/dotc/typer/ProtoTypes.scala
+++ b/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -477,7 +477,7 @@ object ProtoTypes {
def apply(tp: Type) = wildApprox(tp, this)
}
- @sharable private lazy val dummyTree = untpd.Literal(Constant(null))
+ @sharable private def dummyTree = untpd.Literal(Constant(null))
/** Dummy tree to be used as an argument of a FunProto or ViewProto type */
object dummyTreeOfType {