aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/pickling/ClassfileParser.scala2
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
index dbd8088bf..ad45f4d19 100644
--- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
@@ -150,7 +150,7 @@ class ClassfileParser(
val start = indexCoord(in.bp)
val jflags = in.nextChar
val sflags =
- if (method) FlagTranslation.methodFlags(jflags)
+ if (method) Flags.Method | FlagTranslation.methodFlags(jflags)
else FlagTranslation.fieldFlags(jflags)
val name = pool.getName(in.nextChar)
if (!(sflags is Flags.Private) || name == nme.CONSTRUCTOR || settings.optimise.value) {
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 4ea87bb7b..e054aaa3a 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -167,8 +167,9 @@ class Namer { typer: Typer =>
privateWithinClass(tree.mods), tree.pos, ctx.source.file))
case tree: MemberDef =>
val deferred = if (lacksDefinition(tree)) Deferred else EmptyFlags
+ val method = if (tree.isInstanceOf[DefDef]) Method else EmptyFlags
record(ctx.newSymbol(
- ctx.owner, tree.name.encode, tree.mods.flags | deferred,
+ ctx.owner, tree.name.encode, tree.mods.flags | deferred | method,
adjustIfModule(new Completer(tree), tree),
privateWithinClass(tree.mods), tree.pos))
case tree: Import =>