Bug 21668 – Cannot declare ref parameter of opaque type
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-02-28T02:51:38Z
Last change time
2021-03-06T03:40:56Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Comments
Comment #0 by moonlightsentinel — 2021-02-28T02:51:38Z
Functions cannot accept opaque types by ref (pointer and slices work already):
----------------------------------------
struct Opaque;
void byPtr(Opaque*) {}
void byRef(ref Opaque) {} // Fails
void bySlice(Opaque[]) {}
----------------------------------------
Comment #1 by dlang-bot — 2021-02-28T03:01:56Z
@MoonlightSentinel created dlang/dmd pull request #12239 "Fix 21668 - Cannot declare ref parameter of opaque type" fixing this issue:
- Fix 21668 - Cannot declare ref parameter of opaque type
Don't raise errors for VarDeclarations that are marked as ref
https://github.com/dlang/dmd/pull/12239
Comment #2 by dlang-bot — 2021-02-28T03:29:39Z
@MoonlightSentinel created dlang/dmd pull request #12240 "Fix 14954 - extern opaque struct instance doesn't compile" fixing this issue:
- Fix 21668 - Cannot declare ref parameter of opaque type
Don't raise errors for VarDeclarations that are marked as ref
https://github.com/dlang/dmd/pull/12240
Comment #3 by dlang-bot — 2021-02-28T06:22:39Z
dlang/dmd pull request #12240 "Fix 14954 - extern opaque struct instance doesn't compile" was merged into master:
- fa1916b570007d52f950b82751b7c3fedc29877e by MoonlightSentinel:
Fix 21668 - Cannot declare ref parameter of opaque type
Don't raise errors for VarDeclarations that are marked as ref
https://github.com/dlang/dmd/pull/12240
Comment #4 by dlang-bot — 2021-03-06T03:40:56Z
dlang/dmd pull request #12253 "merge stable" was merged into master:
- 8fda1152ab591143a20977ae24fcf7eaf5e2ec51 by Florian:
Fix 21668 - Cannot declare ref parameter of opaque type (#12239)
Don't raise errors for VarDeclarations that are marked as ref
https://github.com/dlang/dmd/pull/12253