Skip to content

Commit

Permalink
New Scala 2.12.0-M4 pattern match warnings
Browse files Browse the repository at this point in the history
	* src/test/scala/scala/xml/PatternMatching.scala (SI_4124): Add
	wildcard default case match to quiet warnings that appear with
	with Scala version 2.12.0-M4.
  • Loading branch information
ashawley committed Sep 20, 2016
1 parent 5b53104 commit c975283
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/scala/scala/xml/PatternMatching.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,25 @@ class PatternMatching extends {
assertTrue((body: AnyRef, "foo") match {
case (node: Node, "bar") => false
case (ser: Serializable, "foo") => true
case (_, _) => false
})

assertTrue((body, "foo") match {
case (node: Node, "bar") => false
case (ser: Serializable, "foo") => true
case (_, _) => false
})

assertTrue((body: AnyRef, "foo") match {
case (node: Node, "foo") => true
case (ser: Serializable, "foo") => false
case (_, _) => false
})

assertTrue((body: AnyRef, "foo") match {
case (node: Node, "foo") => true
case (ser: Serializable, "foo") => false
case (_, _) => false
})
}
}

0 comments on commit c975283

Please sign in to comment.