https://issues.dlang.org/show_bug.cgi?id=15822
--- Comment #7 from ag0ae...@gmail.com --- (In reply to hsteoh from comment #6) > This bug has not yet been (fully) fixed: > > ------ > import std.stdio; > class Wrapper > { > typeof(stdin.byLine()) src; > } > void main() > { > auto x = new Wrapper(); > x.src = stdin.byLine(); > } > ------ > > Run as 'echo | ./program'. Output: > > ------ > core.exception.InvalidMemoryOperationError@src/core/exception.d(693): > Invalid memory operation > ------ Works for me. Are you testing with stable? --