aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Flags.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-07-08 11:05:55 +0200
committerMartin Odersky <odersky@gmail.com>2013-07-11 10:07:32 +0200
commitc9679f6c0f3c8200e1b1f537e89488094cfc2576 (patch)
tree59f142f2b241049737bfb71838235a4451d40cc1 /src/dotty/tools/dotc/core/Flags.scala
parent0af96c0f5179104fca02cf1aa144c6176bdb71eb (diff)
downloaddotty-c9679f6c0f3c8200e1b1f537e89488094cfc2576.tar.gz
dotty-c9679f6c0f3c8200e1b1f537e89488094cfc2576.tar.bz2
dotty-c9679f6c0f3c8200e1b1f537e89488094cfc2576.zip
Added functionality to deal with function applications.
- Added Applications class to represent applications - Added Constraint class to represent type constraints - Added TyperState class to represent typer state - Added Diagnostic class to buffer errors and warnings - Added Inferencing class that contains some common functionality for type inferencing (this one's still rudimentary). - Added extractor for FunctionType in Definitions - Added desugaring of default parameters to default getters in Desugar - Added flags to deal with default parameters - Added substitutions that replace bound parameters
Diffstat (limited to 'src/dotty/tools/dotc/core/Flags.scala')
-rw-r--r--src/dotty/tools/dotc/core/Flags.scala16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala
index 9f4cce728..82fd86c05 100644
--- a/src/dotty/tools/dotc/core/Flags.scala
+++ b/src/dotty/tools/dotc/core/Flags.scala
@@ -291,8 +291,8 @@ object Flags {
/** A super accessor */
final val SuperAccessor = termFlag(27, "<superaccessor>")
- /** A parameter with a default value */
- final val DefaultParam = termFlag(28, "<defaultparam>")
+ /** A method that has default params */ // TODO: drop
+ final val DefaultParameterized = termFlag(28, "<defaultparam>")
/** Symbol is initialized to the default value, e.g. var x: T = _ */
final val DefaultInit = termFlag(29, "<defaultinit>")
@@ -360,6 +360,12 @@ object Flags {
/** A definition that's initialized before the super call (Scala 2.x only) */
final val Scala2PreSuper = termFlag(58, "<presuper>")
+ /** A method that is known to have inherited default parameters */
+ final val InheritedDefaultParams = termFlag(59, "<inherited-default-param>")
+
+ /** A method that is known to no default parameters */
+ final val NoDefaultParams = termFlag(60, "<no-default-param>")
+
// --------- Combined Flag Sets and Conjunctions ----------------------
/** Flags representing source modifiers */
@@ -437,6 +443,12 @@ object Flags {
/** A parameter or parameter accessor */
final val ParamOrAccessor = Param | Accessor
+ /** Has defined or inherited default parameters */
+ final val HasDefaultParams = DefaultParameterized | InheritedDefaultParams
+
+ /** Is a default parameter in Scala 2*/
+ final val DefaultParameter = allOf(Param, DefaultParameterized)
+
/** A Java interface */
final val JavaInterface = allOf(JavaDefined, Trait)