Skip to content

Commit

Permalink
Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Nov 30, 2022
1 parent ef7044f commit c255669
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion packages/freezed/CHANGELOG.md
@@ -1,8 +1,29 @@
# [Unreleased fix]
# [Unreleased minor]

- Union types now expose properties with the same name but different type on the
shared interface. (Thanks to @DevNico)

This allows doing:

```dart
@freezed
class Union with _$Union {
factory Union.first(int value) = _UnionFirst;
factory Union.first(double value) = _UnionSecond;
}
void main() {
Union union;
num value = union.value;
// No need for casting as "num" is the shared interface between int/double
}
```

- Fixes copyWith not working with `null` on some scenarios.
- Fixes a stackoverflow error when continuously passing unmodifiable collections as parameter to freezed classes
- fix: Deep copy now correctly handles cases where a property is a Freezed class with disabled `copyWith`

# 2.2.1

Upgrade analyzer
Expand Down

0 comments on commit c255669

Please sign in to comment.