Bug 17806 – processAllocator getter will override set value if it was set before getter was called at least once

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2017-09-04T18:47:28Z
Last change time
2018-04-25T02:34:10Z
Assigned to
No Owner
Creator
Igor Stojkovic

Comments

Comment #0 by stojkovic.igor — 2017-09-04T18:47:28Z
So if you do: auto newAllocator = whatever; processAllocator = newAllocator; bool isOk = (processAllocator is newAllocator); isOk will be false. But if you do: auto tmp = processAllocator; auto newAllocator = whatever; processAllocator = newAllocator; bool isOk = (processAllocator is newAllocator); Then isOk will be true.
Comment #1 by github-bugzilla — 2018-04-25T02:34:09Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/4b0b02e9e1b8076630f4df707610b81746b391d4 Fix Issue 17806 - processAllocator getter will override set value if it was set before getter was called at least once https://github.com/dlang/phobos/commit/832ace083257d4c8501a3772748c20ac10d932bd Merge pull request #6413 from edi33416/fix_i17806 Fix Issue 17806 - processAllocator getter will override set value if … merged-on-behalf-of: Nathan Sashihara <[email protected]>