Skip to content

Commit b59c3d8

Browse files
committed
Documented breaking change in 4.3 release notes
1 parent bb1cb01 commit b59c3d8

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

etc/release-notes/release-notes-4.3.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
= Release 4.3
33

4-
Released: Unreleased
4+
Released: Some future date
55

66
== Enhancements
77

@@ -17,7 +17,7 @@ Released: Unreleased
1717
* Added equals, hashCode and toString to classes P's, Array, Either, List, Option, Seq, Set, Stream, Tree, TreeMap, Validation (#75, #86)
1818
* Added release notes as asciidoc (#92)
1919
* Added F0 interface (#93)
20-
* Added wrapper functions for function arity 1 and 2 (#94)
20+
* Added wrapper functions for function interfaces arity 1 and 2 (#94)
2121
* Enhanced implementation of equals for standard classes (#95)
2222
* Added traverse method family to P1, P2, Either, List, Validation (#80)
2323
* Enhanced integration with basic Java types (#99)
@@ -31,6 +31,24 @@ Released: Unreleased
3131
* Fixed Try javadoc (#91)
3232
* Fixed stack overflow in TreeMap.update (#97)
3333

34+
== Breaking Changes
35+
36+
* #93 added the F0 interface which P1 implements. This could break code where the _1 method for a new P1 called the method 'f' outside P1's scope. Making P1 implement F0 means that P1 now has an 'f' method which hides the visibility of the previously visible outer 'f'. You can fix this by using P.lazy, as per the example below.
37+
38+
[source,java]
39+
----
40+
// old code
41+
return fromString(s.some()).append(new P1<Stream<Character>>() {
42+
public Stream<Character> _1() {
43+
return f(reader); // call outer f, 4.3 code change breaks this
44+
}
45+
});
46+
47+
// new code
48+
return fromString(s.some()).append(P.lazy(u -> f(reader))); // outer f now visible
49+
----
50+
51+
3452
== Documentation
3553

3654
* Added contributors from commit log.

0 commit comments

Comments
 (0)