[#997] | project: compiler | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Nikolay | Martin | fixed | 2007-03-13 10:16:24.0 | |
subject | [contrib #371] Number of unapply results not checked | |||
code |
// An extractor with 2 results object Foo { def unapply(x : String) = Some(Pair(x, x)) } // Prints 'x'; ought not to compile (or maybe a should be the Pair?). "x" match { case Foo(a) => Console.println(a) } // Prints '(x,x)' as expected. "x" match { case Foo(a, b) => Console.println((a,b)) } // Gives confusing error 'not found: value c'. "x" match { case Foo(a, b, c) => Console.println((a,b,c)) } |
|||
what happened | ||||
what expected | ||||
[back to overview] |
Nikolay edited on 2007-03-13 10:17:04.0 |
contribution #371 |
Martin edited on 2007-04-25 22:15:00.0 |
Martin edited on 2007-04-29 14:28:59.0 |