Skip to content

Commit

Permalink
Merge pull request #33 from schveiguy/fixcas
Browse files Browse the repository at this point in the history
Fixes #32 - Cast the null to shared(Driver) to appease the cas template.
  • Loading branch information
schveiguy authored Feb 24, 2020
2 parents 2fad7cf + e29a948 commit c47fb30
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ jobs:
- BUILD_TOOL='dub'
allow_failures:
- d: dmd-nightly
- d: dmd
env:
- COVERAGE=false
- BUILD_TOOL='dub'
- d: dmd
env:
- COVERAGE=false
- BUILD_TOOL='meson'
- d: ldc
env:
- COVERAGE=false
- BUILD_TOOL='dub'
# - d: dmd
# env:
# - COVERAGE=false
# - BUILD_TOOL='dub'
# - d: dmd
# env:
# - COVERAGE=false
# - BUILD_TOOL='meson'
# - d: ldc
# env:
# - COVERAGE=false
# - BUILD_TOOL='dub'

before_deploy:
- |
Expand Down
4 changes: 3 additions & 1 deletion src/std/io/driver/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ interface Driver
auto d = atomicLoad!(MemoryOrder.raw)(_globalDriver);
if (d is null)
{
cas(&_globalDriver, null, *cast(shared(Driver)*) &_syncDriver);
// PHOBOS/COMPILER BUG: we need to insert unneccessary casts here
// see https://issues.dlang.org/show_bug.cgi?id=20359
cas(&_globalDriver, cast(shared(Driver))null, *cast(shared(Driver)*) &_syncDriver);
d = atomicLoad!(MemoryOrder.raw)(_globalDriver);
}
static if (__VERSION__ < 2077)
Expand Down

0 comments on commit c47fb30

Please sign in to comment.