~ubuntu-branches/debian/sid/scala/sid

« back to all changes in this revision

Viewing changes to test/files/neg/exhausting.scala

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg, Mehdi Dogguy, Lucas Satabin, Frank S. Thomas, Emmanuel Bourg
  • Date: 2015-06-05 23:52:59 UTC
  • mfrom: (1.2.11)
  • Revision ID: package-import@ubuntu.com-20150605235259-wk00vgk83dh8o19g
Tags: 2.10.5-1
* Team upload.

[ Mehdi Dogguy ]
* New upstream release (Closes: #744278).

[ Lucas Satabin ]
* Update patches
* Update the clean target
* Update paths of elements to install
* Update watch file

[ Frank S. Thomas ]
* Remove myself from Uploaders.

[ Emmanuel Bourg ]
* The package has been adopted by the Java Team (Closes: #754935)
* Patched the build to avoid downloading libraries from the Internet
* Replaced the minified JavaScript files with unobfuscated ones
* No longer build scala-partest.jar until diffutils is packaged or replaced
* debian/watch: Fixed the versions matched (x.y.z instead of x.y.z..z)
* debian/rules:
  - Added the missing get-orig-source target (Closes: #724704)
  - Improved the clean target
* debian/control:
  - Build depend on scala (>= 2.10) and bnd
  - Use canonical URLs for the Vcs-* fields
  - Standards-Version updated to 3.9.6 (no changes)
* Switch to debhelper level 9

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
  def ex3[T](xx: (Foo[T], Foo[T])) = xx match {
17
17
    case (_: Foo[_], _: Foo[_]) => ()
18
18
  }
19
 
  
 
19
 
 
20
  // fails for: ::(_, ::(_, ::(_, _)))
20
21
  def fail1[T](xs: List[T]) = xs match {
21
22
    case Nil            => "ok"
22
23
    case x :: y :: Nil  => "ok"
23
24
  }
 
25
 
 
26
  // fails for: Nil
24
27
  def fail2[T](xs: List[T]) = xs match {
25
28
    case _ :: _ => "ok"
26
29
  }
 
30
 
 
31
  // fails for: ::(<not in (2, 1)>, _)
 
32
  def fail3a(xs: List[Int]) = xs match {
 
33
    case 1 :: _ =>
 
34
    case 2 :: _ =>
 
35
    case Nil =>
 
36
  }
 
37
 
 
38
  // fails for: Bar3
27
39
  def fail3[T](x: Foo[T]) = x match {
28
40
    case Bar1   => "ok"
29
41
    case Bar2   => "ok"
30
42
  }
 
43
  // fails for: (Bar1, Bar2)
 
44
  // fails for: (Bar1, Bar3)
 
45
  // fails for: (Bar2, Bar2)
 
46
  // fails for: (Bar2, Bar1)
31
47
  def fail4[T <: AnyRef](xx: (Foo[T], Foo[T])) = xx match {
32
48
    case (Bar1, Bar1) => ()
33
49
    case (Bar2, Bar3) => ()
34
50
    case (Bar3, _) => ()
35
51
  }
 
52
  // fails for: (Bar1, Bar2)
 
53
  // fails for: (Bar1, Bar3)
 
54
  // fails for: (Bar2, Bar1)
 
55
  // fails for: (Bar2, Bar2)
36
56
  def fail5[T](xx: (Foo[T], Foo[T])) = xx match {
37
57
    case (Bar1, Bar1) => ()
38
58
    case (Bar2, Bar3) => ()
39
59
    case (Bar3, _) => ()
40
60
  }
41
 
  
42
 
  def main(args: Array[String]): Unit = {
43
 
    
44
 
  }
45
61
}