fix Issue 20781 - Can call @live function without checking dip1021 rules
Thanks for your pull request, @WalterBright!
Bugzilla references
| Auto-close | Bugzilla | Severity | Description |
|---|---|---|---|
| ✓ | 20781 | normal | Can call @live function without checking dip1021 rules |
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + dmd#11071"
The buildkite and DAutoTest look irrelevant.
I haven't been following @live too much, so I was under the impression that it was part of DIP1021, but it's not mentioned anywhere in the DIP, or any other DIPs... So where does it come from ?
So my question wasn't answered. What's the point of -preview=dip1021 when it the checks are actually performed when @live is used ?
@Geod24 :
As the comment in the code says, "Test compliance with DIP1021 Argument Ownership and Function Calls", and the code is under the check for DIP1021
Dip1021 was a step towards @live by not allowing multiple mutable pointers to be passed to a function.
This makes no sense at all:
Test 'runnable/test20855.d' failed. The logged output:
/private/var/folders/hy/gdmd645x1ws410vx266t7py00000gn/T/cirrus-ci-build/generated/osx/release/64/dmd -conf= -m64 -Irunnable -fPIC -odtest_results/runnable -oftest_results/runnable/test20855_0 runnable/test20855.d
test_results/runnable/test20855_0 --DRT-testmode=run-main
core.exception.AssertError@runnable/test20855.d(25): Assertion failure
----------------
??:? _d_assertp [0x10060340c]
??:? _Dmain [0x1005f56d1]
a = 491
why does it work on every other platform?
Weird how that assert failure disappeared after a rebase. It implies the state of the repository is not always in a working state.