diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-04 13:24:18 -0700 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-04 13:24:18 -0700 |
commit | abc88346a0e296a44fd9627e2a4fea6d609f7771 (patch) | |
tree | 8846935ac1a5d6243a48028b56da6b65dae9e4b6 /core/src/main | |
parent | 8a9e1ade269f644664fd4499f65dfa445ab2ac55 (diff) | |
download | mill-abc88346a0e296a44fd9627e2a4fea6d609f7771.tar.gz mill-abc88346a0e296a44fd9627e2a4fea6d609f7771.tar.bz2 mill-abc88346a0e296a44fd9627e2a4fea6d609f7771.zip |
Mark `Cacher#T`-related things as protected, since you shouldn't access them from outside the class body
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/forge/Target.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/scala/forge/Target.scala b/core/src/main/scala/forge/Target.scala index ba18184c..a6e977ae 100644 --- a/core/src/main/scala/forge/Target.scala +++ b/core/src/main/scala/forge/Target.scala @@ -33,9 +33,9 @@ abstract class Target[T] extends Target.Ops[T]{ object Target{ trait Cacher{ - val cacherLazyMap = mutable.Map.empty[sourcecode.Enclosing, Target[_]] - def T[T](t: T): Target[T] = macro impl[T] - def T[T](t: => Target[T])(implicit c: sourcecode.Enclosing): Target[T] = { + private[this] val cacherLazyMap = mutable.Map.empty[sourcecode.Enclosing, Target[_]] + protected[this] def T[T](t: T): Target[T] = macro impl[T] + protected[this] def T[T](t: => Target[T])(implicit c: sourcecode.Enclosing): Target[T] = { cacherLazyMap.getOrElseUpdate(c, t).asInstanceOf[Target[T]] } } |