summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorDan Rosen <dr@mergeconflict.com>2013-03-02 13:43:30 -0800
committerDan Rosen <dr@mergeconflict.com>2013-03-02 13:43:30 -0800
commit1b9c2f51d0fc37b1f2065a2b7c575cbfcd4665cd (patch)
tree885cdfbcc371c48bd812dde6bd598cfbf76531c7 /test/files/run
parentdaa9c4114f3698833bfc06f5822bbfaa93b8fbf9 (diff)
downloadscala-1b9c2f51d0fc37b1f2065a2b7c575cbfcd4665cd.tar.gz
scala-1b9c2f51d0fc37b1f2065a2b7c575cbfcd4665cd.tar.bz2
scala-1b9c2f51d0fc37b1f2065a2b7c575cbfcd4665cd.zip
SI-7132 - don't discard Unit type in interpreter
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/repl-colon-type.check21
-rw-r--r--test/files/run/repl-colon-type.scala4
2 files changed, 15 insertions, 10 deletions
diff --git a/test/files/run/repl-colon-type.check b/test/files/run/repl-colon-type.check
index 4cd0e1d588..27be3eb67d 100644
--- a/test/files/run/repl-colon-type.check
+++ b/test/files/run/repl-colon-type.check
@@ -4,12 +4,6 @@ Type :help for more information.
scala>
scala> :type List[1, 2, 3]
-<console>:2: error: identifier expected but integer literal found.
- List[1, 2, 3]
- ^
-<console>:3: error: ']' expected but '}' found.
- }
- ^
<console>:1: error: identifier expected but integer literal found.
List[1, 2, 3]
^
@@ -44,12 +38,9 @@ scala> :type lazy val f = 5
Int
scala> :type protected lazy val f = 5
-<console>:2: error: illegal start of statement (no modifiers allowed here)
- protected lazy val f = 5
- ^
<console>:5: error: lazy value f cannot be accessed in object $iw
Access to protected value f not permitted because
- enclosing object $eval in package $line19 is not a subclass of
+ enclosing object $eval in package $line13 is not a subclass of
object $iw where target is defined
lazy val $result = f
^
@@ -221,4 +212,14 @@ PolyType(
scala>
+scala> // SI-7132 - :type doesn't understand Unit
+
+scala> :type ()
+Unit
+
+scala> :type println("side effect!")
+Unit
+
+scala>
+
scala>
diff --git a/test/files/run/repl-colon-type.scala b/test/files/run/repl-colon-type.scala
index c055b215c2..8cf81a6afe 100644
--- a/test/files/run/repl-colon-type.scala
+++ b/test/files/run/repl-colon-type.scala
@@ -26,6 +26,10 @@ object Test extends ReplTest {
|:type -v Nil.combinations _
|:type -v def f[T <: AnyVal] = List[T]().combinations _
|:type -v def f[T, U >: T](x: T, y: List[U]) = x :: y
+ |
+ |// SI-7132 - :type doesn't understand Unit
+ |:type ()
+ |:type println("side effect!")
""".stripMargin
}