diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-06-22 20:56:40 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-06-23 15:52:01 -0700 |
commit | 934a31488b43b75a5b437e0cb293b6b5b4f076d7 (patch) | |
tree | 0e5e85a6125fb56eff158b633495f643a4abc200 /src/library/scala/sys | |
parent | 1b9cb466430b6300355185917257493ca2e6a240 (diff) | |
download | scala-934a31488b43b75a5b437e0cb293b6b5b4f076d7.tar.gz scala-934a31488b43b75a5b437e0cb293b6b5b4f076d7.tar.bz2 scala-934a31488b43b75a5b437e0cb293b6b5b4f076d7.zip |
SI-9206: REPL custom welcome message
Can be specified by `-Dscala.repl.welcome=Greeting` or in properties
file. It takes the same format arguments as the prompt, viz, version,
Java version and JVM name.
It can be disabled by `-Dscala.repl.welcome` with no text.
Diffstat (limited to 'src/library/scala/sys')
-rw-r--r-- | src/library/scala/sys/BooleanProp.scala | 1 | ||||
-rw-r--r-- | src/library/scala/sys/Prop.scala | 4 |
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 |