aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/core/Flags.scala3
-rw-r--r--src/dotty/tools/dotc/core/pickling/ClassfileParser.scala7
2 files changed, 10 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala
index b9e901735..68125f73e 100644
--- a/src/dotty/tools/dotc/core/Flags.scala
+++ b/src/dotty/tools/dotc/core/Flags.scala
@@ -342,6 +342,9 @@ object Flags {
/** Symbol is a Java-style varargs method */
final val JavaVarargs = termFlag(38, "<varargs>")
+ /** Symbol is a Java default method */
+ final val DefaultMethod = termFlag(39, "<defaultmethod>")
+
// Flags following this one are not pickled
/** Denotation is in train of being loaded and completed, used to catch cyclic dependencies */
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
index a7620bd9f..bde723c9c 100644
--- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
+++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala
@@ -496,6 +496,13 @@ class ClassfileParser(
case tpnme.ExceptionsATTR =>
parseExceptions(attrLen)
+ case tpnme.CodeATTR =>
+ if (sym.owner is Flags.Interface) {
+ sym.setFlag(Flags.DefaultMethod)
+ ctx.log(s"$sym in ${sym.owner} is a java8+ default method.")
+ }
+ in.skip(attrLen)
+
case _ =>
}
in.bp = end