diff options
Diffstat (limited to 'test/files/pos/bug602.scala')
-rw-r--r-- | test/files/pos/bug602.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/bug602.scala b/test/files/pos/bug602.scala new file mode 100644 index 0000000000..60aef1dfd0 --- /dev/null +++ b/test/files/pos/bug602.scala @@ -0,0 +1,11 @@ +package com.mosol.sl; + +case class Span[K <: Ordered[K]](low: Option[K], high: Option[K]) extends Function1[K, boolean] { + def apply(k: K): boolean = this match { + case Span(Some(low), Some(high)) => (k >= low && k <= high) + case Span(Some(low), None) => (k >= low) + case Span(None, Some(high)) => (k <= high) + case _ => false + } +} + |