aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-04-13 11:43:37 +0200
committerGitHub <noreply@github.com>2017-04-13 11:43:37 +0200
commitb8ed254e38480eb8892eccd897d525d977d9e6a7 (patch)
tree902b9c8fa209f730746ef84dc895ff2710badd24 /compiler/src/dotty/tools/dotc/typer/Typer.scala
parent46e3395693b6f8749aa0b01b41b7d643f3bef5dc (diff)
parent3e04b6f3aa4e4088220f199bd6aa5c6644c22354 (diff)
downloaddotty-b8ed254e38480eb8892eccd897d525d977d9e6a7.tar.gz
dotty-b8ed254e38480eb8892eccd897d525d977d9e6a7.tar.bz2
dotty-b8ed254e38480eb8892eccd897d525d977d9e6a7.zip
Merge pull request #2249 from dotty-staging/revert-product
Revert <: Product requierment in pattern matching
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala
index 4bf938fd4..02538671e 100644
--- a/compiler/src/dotty/tools/dotc/typer/Typer.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -759,7 +759,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
/** Is `formal` a product type which is elementwise compatible with `params`? */
def ptIsCorrectProduct(formal: Type) = {
isFullyDefined(formal, ForceDegree.noBottom) &&
- Applications.canProductMatch(formal) &&
+ defn.isProductSubType(formal) &&
Applications.productSelectorTypes(formal).corresponds(params) {
(argType, param) =>
param.tpt.isEmpty || argType <:< typedAheadType(param.tpt).tpe