Skip to content

Commit 7d26f98

Browse files
Bolpatdlang-bot
authored andcommitted
Better equivalence
• Not everything is convertible to `Object` • `with` does preserve the value category
1 parent 842606a commit 7d26f98

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spec/statement.dd

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,12 +1612,11 @@ with (expression)
16121612
is semantically equivalent to:
16131613

16141614
--------------
1615+
(auto ref tmp)
16151616
{
1616-
Object tmp;
1617-
tmp = expression;
16181617
...
16191618
tmp.ident;
1620-
}
1619+
}(expression);
16211620
--------------
16221621

16231622
$(P Note that *Expression* only gets evaluated once and is not copied.

0 commit comments

Comments
 (0)