diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-12 13:01:28 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:12:28 +0200 |
commit | 845b689a4a652fa79a7d0621f5ebe15bbf9225c7 (patch) | |
tree | ce308233797b8b032b25c8ed29b6663da8742340 /src/dotty/tools/dotc/core/Flags.scala | |
parent | b559aff35d6d365284fc1e05a3ca49a17551df29 (diff) | |
download | dotty-845b689a4a652fa79a7d0621f5ebe15bbf9225c7.tar.gz dotty-845b689a4a652fa79a7d0621f5ebe15bbf9225c7.tar.bz2 dotty-845b689a4a652fa79a7d0621f5ebe15bbf9225c7.zip |
Add inline for vals
- allow inline as an alternative to final for vals
(final is retained for backwards compatibility for now)
- allow inline for parameters
- check that rhs of inline value has a constant type
- check that arguments to inline value parameters have constant type
- check that inline members are not deferred
- make inline members effectively final
Diffstat (limited to 'src/dotty/tools/dotc/core/Flags.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Flags.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala index cf3b23c91..1a1182c7b 100644 --- a/src/dotty/tools/dotc/core/Flags.scala +++ b/src/dotty/tools/dotc/core/Flags.scala @@ -556,6 +556,12 @@ object Flags { /** A type parameter or type parameter accessor */ final val TypeParamOrAccessor = TypeParam | TypeParamAccessor + /** A deferred member or a parameter accessor (these don't have right hand sides) */ + final val DeferredOrParamAccessor = Deferred | ParamAccessor + + /** value that's final or inline */ + final val FinalOrInline = Final | Inline + /** If symbol of a type alias has these flags, prefer the alias */ final val AliasPreferred = TypeParam | BaseTypeArg | ExpandedName |