Skip to content

Commit cbbb927

Browse files
author
Dean Wampler
committed
The bug described earlier no longer exists.
1 parent f6ab5f8 commit cbbb927

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/script/scala/progscala3/fp/basics/PartialApplication.scala

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
// src/script/scala/progscala3/fp/basics/PartialApplication.scala
2-
3-
// The book uses a slightly different version of the "cat1" examples, because
4-
// there's a bug in the Scala 3.1 support that causes the line "val fcat1 = cat1"
5-
// to report this error:
6-
// 1 |val fcat1 = cat1
7-
// | ^^^^
8-
// | The syntax `<function> _` is no longer supported;
9-
// | you can simply leave out the trailing ` _`
10-
// Therefore, I left that example out of the book completely, just including fcat1b.
11-
// If you compile with the default `-source 3.0`, then that line will work fine.
12-
// However, the compilation and sbt console use `-source 3.1`.
2+
// The book uses a slightly shorter version of the following:
133

144
def cat1(s1: String)(s2: String) = s1 + s2
155
def cat2(s1: String) = (s2: String) => s1 + s2

0 commit comments

Comments
 (0)