warn about observerable stores but don't prevent them for 1.2.2 [backport:1.2]; refs https://github.com/nim-lang/RFCs/issues/230 (#14510)
This commit is contained in:
parent
7ccc7d7e93
commit
52c3633223
3 changed files with 15 additions and 8 deletions
|
|
@ -4,9 +4,9 @@ obj.inner.id = 7
|
|||
id = 7
|
||||
obj = (inner: (kind: Just, id: 7))
|
||||
2
|
||||
(a: "1", b: "2", c: "3")
|
||||
(a: "a", b: "b", c: "")
|
||||
caught
|
||||
(a: "1", b: "", c: "3")'''
|
||||
(a: "a", b: "b", c: "")'''
|
||||
"""
|
||||
|
||||
# bug #6960
|
||||
|
|
@ -164,7 +164,8 @@ proc ohmanNoNRVO =
|
|||
discard
|
||||
|
||||
echo x
|
||||
doAssert x.c == "3", "shouldn't modify x if f raises"
|
||||
# once NVRO is sorted out, x.c == "3"
|
||||
doAssert x.c == "", "shouldn't modify x if f raises"
|
||||
|
||||
ohmanNoNRVO()
|
||||
|
||||
|
|
@ -179,4 +180,5 @@ try:
|
|||
except:
|
||||
echo "caught"
|
||||
echo xgg
|
||||
doAssert xgg.c == "3", "this assert will fail"
|
||||
# once NVRO is sorted out, xgg.c == "3"
|
||||
doAssert xgg.c == "", "this assert will fail"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue