summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-07-01 15:56:17 -0400
committerSeth Tisue <seth@tisue.net>2015-07-01 15:56:17 -0400
commit495fdb8119c1941bc210a9b0a186d63971002e22 (patch)
tree2067bf5985fc138577fa7251b0ab7e4a23236a88 /src/library
parentc8fbc41631da0a860f749479a610312814c0e88f (diff)
parentfac81d705ff0bfdeb3320fd9e46b6d3d34e47ddf (diff)
downloadscala-495fdb8119c1941bc210a9b0a186d63971002e22.tar.gz
scala-495fdb8119c1941bc210a9b0a186d63971002e22.tar.bz2
scala-495fdb8119c1941bc210a9b0a186d63971002e22.zip
Merge pull request #4576 from som-snytt/issue/9206-more
SI-9206 REPL custom bits
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/sys/BooleanProp.scala1
-rw-r--r--src/library/scala/sys/Prop.scala4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/library/scala/sys/BooleanProp.scala b/src/library/scala/sys/BooleanProp.scala
index e5e4668edb..b0008b41fd 100644
--- a/src/library/scala/sys/BooleanProp.scala
+++ b/src/library/scala/sys/BooleanProp.scala
@@ -50,6 +50,7 @@ object BooleanProp {
def get: String = "" + value
val clear, enable, disable, toggle = ()
def option = if (isSet) Some(value) else None
+ //def or[T1 >: Boolean](alt: => T1): T1 = if (value) true else alt
protected def zero = false
}
diff --git a/src/library/scala/sys/Prop.scala b/src/library/scala/sys/Prop.scala
index 17ae8cb69c..52a3d89ecb 100644
--- a/src/library/scala/sys/Prop.scala
+++ b/src/library/scala/sys/Prop.scala
@@ -58,6 +58,10 @@ trait Prop[+T] {
*/
def option: Option[T]
+ // Do not open until 2.12.
+ //** This value if the property is set, an alternative value otherwise. */
+ //def or[T1 >: T](alt: => T1): T1
+
/** Removes the property from the underlying map.
*/
def clear(): Unit