https://issues.dlang.org/show_bug.cgi?id=20670
--- Comment #1 from FeepingCreature <default_357-l...@yahoo.de> --- Different instance of probably the same bug: immutable struct Struct { } struct Wrapper { void foo(U)(inout(U)) inout { // U is inferred as 'struct Struct', not 'immutable struct Struct'. // evidence: pragma(msg, isMutable!Struct.stringof ~ " - " ~ isMutable!U.stringof); static assert(is(U == Struct)); } } Wrapper().foo(Struct()); --