aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/Desugar.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-10-06 19:23:07 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-12 10:48:58 +0200
commit2ca36a96aee3f2e5cc9073b8970659180f839f95 (patch)
tree2d131e0d44218258eb26d8c1edab3425c57bf85d /src/dotty/tools/dotc/ast/Desugar.scala
parentf244287fdba4ccf64e2404285b713cee599448ba (diff)
downloaddotty-2ca36a96aee3f2e5cc9073b8970659180f839f95.tar.gz
dotty-2ca36a96aee3f2e5cc9073b8970659180f839f95.tar.bz2
dotty-2ca36a96aee3f2e5cc9073b8970659180f839f95.zip
Create setters also for private vars
Reason: We might need hooks for data representation transformations also for private vars. Private[this] vars in non-trait classes remain setterless.
Diffstat (limited to 'src/dotty/tools/dotc/ast/Desugar.scala')
-rw-r--r--src/dotty/tools/dotc/ast/Desugar.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala
index d7bbdf2bb..dba3872cb 100644
--- a/src/dotty/tools/dotc/ast/Desugar.scala
+++ b/src/dotty/tools/dotc/ast/Desugar.scala
@@ -90,7 +90,7 @@ object desugar {
def valDef(vdef: ValDef)(implicit ctx: Context): Tree = {
val ValDef(mods, name, tpt, rhs) = vdef
def setterNeeded =
- (mods is Mutable) && ctx.owner.isClass && (!(mods is Private) || (ctx.owner is Trait))
+ (mods is Mutable) && ctx.owner.isClass && (!(mods is PrivateLocal) || (ctx.owner is Trait))
if (setterNeeded) {
// todo: copy of vdef as getter needed?
// val getter = ValDef(mods, name, tpt, rhs) withPos vdef.pos ?