https://issues.dlang.org/show_bug.cgi?id=22977 --- Comment #4 from Walter Bright <bugzilla at digitalmars.com> --- It appears that the problem is the nested function is not inferring `return scope` when returning a scope variable from its closure. --