[Issue 22667] New: Nullable of struct containing unrelated Nullable errors with "inout can only be declared inside inout function"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 12 12:14:25 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22667
Issue ID: 22667
Summary: Nullable of struct containing unrelated Nullable
errors with "inout can only be declared inside inout
function"
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
Consider the following code:
import std.typecons;
struct Struct
{
Nullable!int ni;
}
void main()
{
Struct a = Struct.init;
Nullable!Struct b = Nullable!Struct(a);
}
test.d(6): Error: variable `test.main.__copytmp756` `inout` variables can only
be declared inside `inout` functions
--
More information about the Digitalmars-d-bugs
mailing list