From d575e585389b025d7b8056bcb43fea67dddd15d0 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 10 Sep 2016 20:58:34 +0200 Subject: Make inline a keyword `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks. --- src/dotty/tools/dotc/core/Flags.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Flags.scala') diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala index 0cdae6b98..bc5953a2c 100644 --- a/src/dotty/tools/dotc/core/Flags.scala +++ b/src/dotty/tools/dotc/core/Flags.scala @@ -450,7 +450,7 @@ object Flags { AccessFlags | Module | Package | Deferred | Final | MethodOrHKCommon | Param | ParamAccessor | Scala2ExistentialCommon | Mutable.toCommonFlags | InSuperCall | Touched | JavaStatic | CovariantOrOuter | ContravariantOrLabel | ExpandedName | AccessorOrSealed | CaseAccessorOrBaseTypeArg | Fresh | Frozen | Erroneous | ImplicitCommon | Permanent | Synthetic | - LazyOrTrait | SuperAccessorOrScala2x | SelfNameOrImplClass + Inline | LazyOrTrait | SuperAccessorOrScala2x | SelfNameOrImplClass assert(FromStartFlags.isTermFlags && FromStartFlags.isTypeFlags) // TODO: Should check that FromStartFlags do not change in completion @@ -541,6 +541,9 @@ object Flags { /** A type parameter with synthesized name */ final val ExpandedTypeParam = allOf(ExpandedName, TypeParam) + /** An inline method */ + final val InlineMethod = allOf(Inline, Method) + /** A parameter or parameter accessor */ final val ParamOrAccessor = Param | ParamAccessor -- cgit v1.2.3