Nested with
expressions
#8319
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Example
Let's assume we have these two
struct
sIt is possible for me to initialize
Example1
like thisBut if I write a
with
expression, I won't be able to MODIFYExample1.Inner
I assume this is because if
Example2
were to be aclass
, that would have changed the originalExample2
instance stored ina.Inner
Proposal
I think that it would be beneficial for nested sets of
{ }
inside awith
expression to be converted in additionalwith
expressions like soThis would allow the modification only for clonable objects (
record
,struct
) and wouldn't work on standard reference typesBeta Was this translation helpful? Give feedback.
All reactions