Bug 21719 – [REG 2.072] "auto" methods of classes do not infer attributes correctly.

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-03-15T14:02:25Z
Last change time
2021-11-29T09:30:08Z
Keywords
pull
Assigned to
No Owner
Creator
Eyal

Comments

Comment #0 by eyal — 2021-03-15T14:02:25Z
import std; struct S { auto f() {} // inferred to be @safe @nogc pure nothrow } class C { auto f() {} // inferred to be @system only }
Comment #1 by snarwin+bugzilla — 2021-03-15T14:07:31Z
According to run.dlang.io, this is a regression introduced in DMD 2.072. https://run.dlang.io/is/qWsSuC
Comment #2 by snarwin+bugzilla — 2021-03-15T14:58:30Z
Comment #3 by dlang-bot — 2021-11-16T13:01:12Z
@RazvanN7 created dlang/dmd pull request #13308 "Fix Issue 21719 - [REG 2.072] auto methods of classes do not infer at [REG 2.072] "auto" methods of classes do not infer attributes correctly." fixing this issue: - Fix Issue 21719 - [REG 2.072] auto methods of classes do not infer attributes correctly. https://github.com/dlang/dmd/pull/13308
Comment #4 by dlang-bot — 2021-11-29T09:30:08Z
dlang/dmd pull request #13308 "Fix Issue 21719 - [REG 2.072] "auto" methods of classes do not infer attributes correctly." was merged into master: - 1b859425aae85e63554c230d106393c2bb83592c by RazvanN7: Fix Issue 21719 - [REG 2.072] auto methods of classes do not infer attributes correctly. https://github.com/dlang/dmd/pull/13308