summaryrefslogtreecommitdiff
path: root/test/files/run/t3175.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-18 00:09:46 -0700
committerPaul Phillips <paulp@improving.org>2013-09-18 07:13:38 -0700
commitf4267ccd96a9143c910c66a5b0436aaa64b7c9dc (patch)
tree174861715807c23ba332f78769a9f7e1377b7f02 /test/files/run/t3175.scala
parentd45a3c8cc8e9f1d95d797d548a85abd8597f5bc7 (diff)
downloadscala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.tar.gz
scala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.tar.bz2
scala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.zip
Cull extraneous whitespace.
One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
Diffstat (limited to 'test/files/run/t3175.scala')
-rw-r--r--test/files/run/t3175.scala26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/files/run/t3175.scala b/test/files/run/t3175.scala
index 5c6daead38..ea56ded229 100644
--- a/test/files/run/t3175.scala
+++ b/test/files/run/t3175.scala
@@ -9,46 +9,46 @@ object Test {
def f1(x:{ def apply(x: Int): Long }) = x(0)
def f2(x:{ def apply(x: Int): Byte }) = x(0)
def f3(x:{ def apply(x: Int): String }) = x(0).length
-
+
def f4(x:{ def update(x: Int, y: Long): Unit }, y: Long) = x(0) = y
def f5(x:{ def update(x: Int, y: Byte): Unit }, y: Byte) = x(0) = y
def f6(x:{ def update(x: Int, y: String): Unit }, y: String) = x(0) = y
-
+
def f7(x: { def length: Any }) = x.length
-
+
def f8(x: { def apply(x: Int): Any }) = x(0)
def f9(x: { def apply(x: Int): Int }) = x(0)
def f10(x: { def apply(x: Int): Long }) = x(0)
-
+
// update has some interesting special cases
def f11(x:{ def update(x: Int, y: Long): Any }, y: Long) = x(0) = y
- def f12(x:{ def update(x: Int, y: String): AnyVal }, y: String) = x(0) = y
+ def f12(x:{ def update(x: Int, y: String): AnyVal }, y: String) = x(0) = y
def f13(x:{ def update(x: Int, y: String): AnyRef }, y: String) = x(0) = y
-
+
// doesn't work yet, see #3197
// def fclone(x:{ def clone(): AnyRef }) = x.clone()
-
+
def main(args: Array[String]): Unit = {
val longs = Array(5L)
val bytes = Array(5: Byte)
val strs = Array("abcde", "fghjij")
-
+
println(len(Array(1,2,3)) + len(Array(4.0,5.0f)) + len(Array("abc", 5)) + len("bop"))
println(f1(longs) + f2(bytes) + f3(strs))
-
+
f4(longs, 1)
f5(bytes, 1)
f6(strs, "a")
-
+
println(f1(longs) + f2(bytes) + f3(strs))
-
+
println(f7(Array(1,2,3)))
println(f7("def"))
-
+
println(f8(Array(5)))
println(f9(Array(5)))
println(f10(Array(5)))
-
+
f11(longs, 100L)
f12(strs, "jabooboo")
println(longs(0))