From 810db8540f259407decb4557aece0dfec4e58a03 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 19 Feb 2014 20:58:52 -0800 Subject: SI-6675 deprecation warning for auto-tupling in patterns NOTE: when the deprecation warning becomes an error, SI-6111 must become a `won't fix` --- .../scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala b/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala index 7858cb5586..d10eff1d8d 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/ScalacPatternExpanders.scala @@ -139,8 +139,8 @@ trait ScalacPatternExpanders { def acceptMessage = if (extractor.isErroneous) "" else s" to hold ${extractor.offeringString}" val requiresTupling = isUnapply && patterns.totalArity == 1 && productArity > 1 - if (settings.lint && requiresTupling && effectivePatternArity(args) == 1) - currentUnit.warning(sel.pos, s"${sel.symbol.owner} expects $productArity patterns$acceptMessage but crushing into $productArity-tuple to fit single pattern (SI-6675)") + if (requiresTupling && effectivePatternArity(args) == 1) + currentUnit.deprecationWarning(sel.pos, s"${sel.symbol.owner} expects $productArity patterns$acceptMessage but crushing into $productArity-tuple to fit single pattern (SI-6675)") val normalizedExtractor = if (requiresTupling) tupleExtractor(extractor) else extractor validateAligned(fn, Aligned(patterns, normalizedExtractor)) -- cgit v1.2.3