aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-07 11:05:02 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-20 13:02:40 +0100
commit7a04b119c9744262bd46c1795b811f56df9516a6 (patch)
treefb98dc39eff900b0dd1af4106ae84910c75fc417 /src/dotty/tools
parent574a148fd561a793ee522c2be18ee02214236d80 (diff)
downloaddotty-7a04b119c9744262bd46c1795b811f56df9516a6.tar.gz
dotty-7a04b119c9744262bd46c1795b811f56df9516a6.tar.bz2
dotty-7a04b119c9744262bd46c1795b811f56df9516a6.zip
Removed explicit tuplings from dotc codebase.
Eliminated all "Dotty deviations" which were due to lack of auto-tupling.
Diffstat (limited to 'src/dotty/tools')
-rw-r--r--src/dotty/tools/dotc/ast/Desugar.scala2
-rw-r--r--src/dotty/tools/dotc/config/Settings.scala2
-rw-r--r--src/dotty/tools/dotc/core/Contexts.scala2
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala2
-rw-r--r--src/dotty/tools/dotc/core/pickling/PickleBuffer.scala10
-rw-r--r--src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala
index 027c3238d..01aaf0b5f 100644
--- a/src/dotty/tools/dotc/ast/Desugar.scala
+++ b/src/dotty/tools/dotc/ast/Desugar.scala
@@ -728,7 +728,7 @@ object desugar {
*/
private object VarPattern {
def unapply(tree: Tree)(implicit ctx: Context): Option[VarInfo] = tree match {
- case id: Ident => Some((id, TypeTree())) // Dotty deviation: No auto-tupling
+ case id: Ident => Some(id, TypeTree())
case Typed(id: Ident, tpt) => Some((id, tpt))
case _ => None
}
diff --git a/src/dotty/tools/dotc/config/Settings.scala b/src/dotty/tools/dotc/config/Settings.scala
index 7f2ad2a4f..b3bf2f134 100644
--- a/src/dotty/tools/dotc/config/Settings.scala
+++ b/src/dotty/tools/dotc/config/Settings.scala
@@ -60,7 +60,7 @@ object Settings {
copy(aliases = aliases :+ abbrv)(idx)
def dependsOn[U](setting: Setting[U], value: U): Setting[T] =
- copy(depends = depends :+ ((setting, value)))(idx) // Dotty deviation: no auto-tupling
+ copy(depends = depends :+ (setting, value))(idx)
def valueIn(state: SettingsState): T =
state.value(idx).asInstanceOf[T]
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala
index 68daea440..8780b0bf6 100644
--- a/src/dotty/tools/dotc/core/Contexts.scala
+++ b/src/dotty/tools/dotc/core/Contexts.scala
@@ -273,7 +273,7 @@ object Contexts {
newctx.implicitsCache = null
newctx.setCreationTrace()
// Dotty deviation: Scala2x allows access to private members implicitCache and setCreationTrace
- // even from a subclass prefix. Dotty (and Java) do not. I think that's a bug in Scala2x.
+ // even from a subclass prefix. Dotty (and Java) do not. It's confirmed as a bug in Scala2x.
newctx.asInstanceOf[FreshContext]
}
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala
index bcf2bb74c..22e308062 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -292,7 +292,7 @@ class Definitions {
lazy val targs = ft.argInfos
if ((FunctionClasses contains tsym) &&
(targs.length - 1 <= MaxFunctionArity) &&
- (FunctionClass(targs.length - 1) == tsym)) Some((targs.init, targs.last)) // Dotty deviation: no auto-tupling
+ (FunctionClass(targs.length - 1) == tsym)) Some(targs.init, targs.last)
else None
}
}
diff --git a/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala b/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala
index 2bedcab92..ef2b4acb2 100644
--- a/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala
+++ b/src/dotty/tools/dotc/core/pickling/PickleBuffer.scala
@@ -229,8 +229,8 @@ object PickleBuffer {
PARAM -> Param,
PACKAGE -> Package,
MACRO -> Macro,
- BYNAMEPARAM -> ((Method, Covariant)), // Dotty deviation: no auto-tupling
- LABEL -> ((Label, Contravariant)), // Dotty deviation: no auto-tupling
+ BYNAMEPARAM -> (Method, Covariant),
+ LABEL -> (Label, Contravariant),
ABSOVERRIDE -> AbsOverride,
LOCAL -> Local,
JAVA -> JavaDefined,
@@ -238,16 +238,16 @@ object PickleBuffer {
STABLE -> Stable,
STATIC -> Static,
CASEACCESSOR -> CaseAccessor,
- DEFAULTPARAM -> ((DefaultParameterized, Trait)), // Dotty deviation: no auto-tupling
+ DEFAULTPARAM -> (DefaultParameterized, Trait),
BRIDGE -> Bridge,
ACCESSOR -> Accessor,
SUPERACCESSOR -> SuperAccessor,
PARAMACCESSOR -> ParamAccessor,
MODULEVAR -> Scala2ModuleVar,
LAZY -> Lazy,
- MIXEDIN -> ((MixedIn, Scala2Existential)), // Dotty deviation: no auto-tupling
+ MIXEDIN -> (MixedIn, Scala2Existential),
EXPANDEDNAME -> ExpandedName,
- IMPLCLASS -> ((Scala2PreSuper, ImplClass)), // Dotty deviation: no auto-tupling
+ IMPLCLASS -> (Scala2PreSuper, ImplClass),
SPECIALIZED -> Specialized,
DEFAULTINIT -> DefaultInit,
VBRIDGE -> VBridge,
diff --git a/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala b/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala
index 483228693..93e24b27f 100644
--- a/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala
+++ b/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala
@@ -21,7 +21,7 @@ trait UniqueMessagePositions extends Reporter {
override def isHidden(d: Diagnostic)(implicit ctx: Context): Boolean =
super.isHidden(d) || {
d.pos.exists && {
- positions get ((ctx.source, d.pos.point)) match { // Dotty deviation: no autotupling
+ positions get (ctx.source, d.pos.point) match {
case Some(s) if s.level >= d.severity.level => true
case _ => positions((ctx.source, d.pos.point)) = d.severity; false
}