Skip to content

Commit 3707b09

Browse files
committed
Merge pull request scala#2930 from retronym/topic/patmat-inference-prep
Topic/patmat inference prep
2 parents 6c78a28 + bc9630e commit 3707b09

File tree

47 files changed

+19
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+19
-165
lines changed

src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ trait TypeDiagnostics {
285285
case xs => xs map (_ => "_") mkString (clazz.name + "[", ",", "]")
286286
})+ "`"
287287

288-
"\nNote: if you intended to match against the class, try "+ caseString
289-
288+
if (!clazz.exists) ""
289+
else "\nNote: if you intended to match against the class, try "+ caseString
290290
}
291291

292292
case class TypeDiag(tp: Type, sym: Symbol) extends Ordered[TypeDiag] {

test/files/neg/bad-advice.check

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bad-advice.scala:4: error: pattern type is incompatible with expected type;
2+
found : Bip.type
3+
required: Int
4+
case Bip => true
5+
^
6+
one error found

test/files/neg/bad-advice.flags

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Xfatal-warnings

test/files/neg/bad-advice.scala

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
object Bip
2+
object Test {
3+
def f(x: Int) = x match {
4+
case Bip => true
5+
}
6+
}

test/files/neg/macro-invalidret-nontree.check

-7
This file was deleted.

test/files/neg/macro-invalidret-nonuniversetree.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-context-bounds.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-context-bounds.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-ctx-badargc.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-ctx-badargc.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-ctx-badtype.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-ctx-badtype.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-ctx-badvarargs.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-ctx-badvarargs.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-ctx-noctx.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-ctx-noctx.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-implicit-params.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-implicit-params.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-params-badargc.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-params-badargc.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-params-badvarargs.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-params-badvarargs.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-params-namemismatch.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-params-namemismatch.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-tparams-badtype.check

-7
This file was deleted.

test/files/neg/macro-invalidsig-tparams-badtype.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-tparams-bounds-a.check

-4
This file was deleted.

test/files/neg/macro-invalidsig-tparams-bounds-a.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-tparams-bounds-b.check

-4
This file was deleted.

test/files/neg/macro-invalidsig-tparams-bounds-b.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-tparams-notparams-a.check

-4
This file was deleted.

test/files/neg/macro-invalidsig-tparams-notparams-a.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-tparams-notparams-b.check

-4
This file was deleted.

test/files/neg/macro-invalidsig-tparams-notparams-b.flags

-1
This file was deleted.

test/files/neg/macro-invalidsig-tparams-notparams-c.check

-4
This file was deleted.

test/files/neg/macro-invalidsig-tparams-notparams-c.flags

-1
This file was deleted.

test/files/neg/macro-invalidusage-badtargs-untyped.check

-18
This file was deleted.

test/files/neg/macro-invalidusage-badtargs-untyped.flags

-1
This file was deleted.

test/files/neg/t7494-cyclic-dependency.check

-1
This file was deleted.

test/files/run/idempotency-partial-functions.check

-2
This file was deleted.

test/files/run/t4574.check

-2
This file was deleted.

test/files/run/t5353.check

-2
This file was deleted.

test/files/run/t6329_repl_bug.check

-13
This file was deleted.

test/files/run/t6329_vanilla_bug.check

-2
This file was deleted.
File renamed without changes.
File renamed without changes.

tools/partest-ack

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ declare quiet failed update partest_debug
66
declare cotouched since sortCommand
77
declare -a ack_args partest_args scalac_args
88

9+
partest_args=( --show-diff )
910
base="$(cd "$(dirname "$0")"/.. && pwd)"
1011
cd "$base" || { echo "Could not change to base directory $base" && exit 1; }
1112
filesdir="test/files"
@@ -134,8 +135,8 @@ count=$(echo $(echo "$paths" | wc -w))
134135

135136
# Output a command line which will re-run these same tests.
136137
echo "# $count tests to run."
137-
printf "%-52s %s\n" "$base/test/partest ${partest_args[@]}" "\\"
138+
printf "%-52s %s\n" "$base/test/partest ${partest_args[*]}" "\\"
138139
for path in $paths; do printf " %-50s %s\n" "$path" "\\"; done
139-
echo ' ""'
140+
echo ""
140141

141-
test/partest "${partest_args[@]}" $paths
142+
test/partest ${partest_args[*]} $paths

0 commit comments

Comments
 (0)