Skip to content

Commit cf2b5fa

Browse files
committed
Update release notes for PR #5006
1 parent d3db52f commit cf2b5fa

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

.release-notes/fix-reify-typeparamref-nested-lambdas.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

.release-notes/next-release.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,19 @@ partial call involved
6363

6464
The workaround was to use a `match` expression instead. This has been fixed. The `as` form now compiles correctly, including when chaining method calls before the field assignment (e.g., `(a as Wumpus).some_method().hunger = 1`).
6565

66+
## Fix segfault when using Generator.map with PonyCheck shrinking
67+
68+
Using `Generator.map` to transform values from one type to another would segfault during shrinking when a property test failed. For example, this program would crash:
69+
70+
```pony
71+
let gen = recover val
72+
Generators.u32().map[String]({(n: U32): String^ => n.string()})
73+
end
74+
PonyCheck.for_all[String](gen, h)(
75+
{(sample: String, ph: PropertyHelper) =>
76+
ph.assert_true(sample.size() > 0)
77+
})?
78+
```
79+
80+
The underlying compiler bug affected any code where a lambda appeared inside an object literal inside a generic method and was then passed to another generic method. The lambda's `apply` method was silently omitted from the vtable, causing a segfault when called at runtime.
81+

0 commit comments

Comments
 (0)