aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/config/OutputDirs.scala6
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/config/OutputDirs.scala b/src/dotty/tools/dotc/config/OutputDirs.scala
index 8b81ba992..a87eb9bce 100644
--- a/src/dotty/tools/dotc/config/OutputDirs.scala
+++ b/src/dotty/tools/dotc/config/OutputDirs.scala
@@ -39,7 +39,7 @@ class OutputDirs {
/** Set the single output directory. From now on, all files will
* be dumped in there, regardless of previous calls to 'add'.
*/
- def setSingleOutput(outDir: String) {
+ def setSingleOutput(outDir: String): Unit = {
val dst = AbstractFile.getDirectory(outDir)
setSingleOutput(checkDir(dst, outDir, true))
}
@@ -49,11 +49,11 @@ class OutputDirs {
/** Set the single output directory. From now on, all files will
* be dumped in there, regardless of previous calls to 'add'.
*/
- def setSingleOutput(dir: AbstractFile) {
+ def setSingleOutput(dir: AbstractFile): Unit = {
singleOutDir = Some(dir)
}
- def add(src: AbstractFile, dst: AbstractFile) {
+ def add(src: AbstractFile, dst: AbstractFile): Unit = {
singleOutDir = None
outputDirs ::= ((src, dst))
}
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 47b10c4aa..6514a6a01 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -598,7 +598,8 @@ trait Applications extends Compatibility { self: Typer =>
}
def seqSelector = defn.RepeatedParamType.appliedTo(unapplyResult.elemType :: Nil)
def getSelectors(tp: Type): List[Type] =
- if (defn.isProductSubType(tp)) productSelectors(tp) else tp :: Nil
+ if (defn.isProductSubType(tp) && args.length > 1) productSelectors(tp)
+ else tp :: Nil
def getTp = extractorMemberType(unapplyResult, nme.get)
// println(s"unapply $unapplyResult ${extractorMemberType(unapplyResult, nme.isDefined)}")