aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAbel Nieto <abeln@google.com>2017-03-31 09:14:27 -0400
committerAbel Nieto <abeln@google.com>2017-04-02 12:50:19 -0400
commit4f937e1735574ffda679761a0a9a8bebbe9cb2ae (patch)
tree226fc4a47ca029d847cd310752f2f532494a1a8c /tests
parenta0c0b605110980abb5d993dadcc943d148e8e262 (diff)
downloaddotty-4f937e1735574ffda679761a0a9a8bebbe9cb2ae.tar.gz
dotty-4f937e1735574ffda679761a0a9a8bebbe9cb2ae.tar.bz2
dotty-4f937e1735574ffda679761a0a9a8bebbe9cb2ae.zip
Fix #1959: infix type operators in the REPL
Infix type operators were broken in the REPL. The REPL uses fold methods from the untpd package, but those were skipping the operator subtree when folding over an InfixOp. Fix the issue by taking the operator into account. Tested: 1) Verified that only the REPL code uses the modified fold method. 2) Added repl test.
Diffstat (limited to 'tests')
-rw-r--r--tests/repl/infixTypeOp.check5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/repl/infixTypeOp.check b/tests/repl/infixTypeOp.check
new file mode 100644
index 000000000..fe8e453fb
--- /dev/null
+++ b/tests/repl/infixTypeOp.check
@@ -0,0 +1,5 @@
+scala> trait +[A, B]
+defined trait +
+scala> type IntAndString = Int + String
+defined type alias IntAndString
+scala> :quit