aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-11 12:12:06 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:11:21 +0200
commitb743a9b3b98c67fd4e86c7700bf24e3c1d19e2b2 (patch)
tree93306a00ee8d66171d316998aa241d9149a52908
parentd575e585389b025d7b8056bcb43fea67dddd15d0 (diff)
downloaddotty-b743a9b3b98c67fd4e86c7700bf24e3c1d19e2b2.tar.gz
dotty-b743a9b3b98c67fd4e86c7700bf24e3c1d19e2b2.tar.bz2
dotty-b743a9b3b98c67fd4e86c7700bf24e3c1d19e2b2.zip
Make inline methods and field effectively final
-rw-r--r--src/dotty/tools/dotc/core/Flags.scala2
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala
index bc5953a2c..cf3b23c91 100644
--- a/src/dotty/tools/dotc/core/Flags.scala
+++ b/src/dotty/tools/dotc/core/Flags.scala
@@ -530,7 +530,7 @@ object Flags {
final val MethodOrLazyOrDeferred = Method | Lazy | Deferred
/** Labeled `private` or `final` */
- final val PrivateOrFinal = Private | Final
+ final val PrivateOrFinalOrInline = Private | Final | Inline
/** A private method */
final val PrivateMethod = allOf(Private, Method)
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 9381f45dd..8a9e8494a 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -865,7 +865,7 @@ object SymDenotations {
/** A symbol is effectively final if it cannot be overridden in a subclass */
final def isEffectivelyFinal(implicit ctx: Context): Boolean =
- is(PrivateOrFinal) || !owner.isClass || owner.is(ModuleOrFinal) || owner.isAnonymousClass
+ is(PrivateOrFinalOrInline) || !owner.isClass || owner.is(ModuleOrFinal) || owner.isAnonymousClass
/** The class containing this denotation which has the given effective name. */
final def enclosingClassNamed(name: Name)(implicit ctx: Context): Symbol = {