Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TransformImmutable: For ChangeReason.Add, a previous value cannot be specified #925

Closed
JakenVeina opened this issue Aug 16, 2024 · 1 comment · Fixed by #926
Closed
Assignees
Labels

Comments

@JakenVeina
Copy link
Collaborator

JakenVeina commented Aug 16, 2024

Describe the bug 🐞

The following snippet produces an ArgumentException.

Step to reproduce

using var sc = new SourceCache<string, string>(s => s);
using var sub = sc.Connect().TransformImmutable(s => s.Length).Subscribe();
sc.AddOrUpdate("Hey");

Additional information ℹ️

This is related to a bogus use of default within a ternary expression, here. default here resolves to TDestination instead of Optional<TDestination>, when TDestination is a value type.

@JakenVeina JakenVeina added the bug label Aug 16, 2024
@JakenVeina JakenVeina self-assigned this Aug 16, 2024
@JakenVeina JakenVeina linked a pull request Aug 16, 2024 that will close this issue
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant