Bug 23836 – Two errors printed for typeof(super) in non-static member context

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-04-12T16:42:21Z
Last change time
2023-04-13T15:12:17Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
elpenguino+D

Comments

Comment #0 by elpenguino+D — 2023-04-12T16:42:21Z
``` struct Foo { static bar() { alias X = typeof(super); } } ``` Currently this prints two errors instead of just one: `Error: 'super' is not in a class scope` `Error: 'super' is only allowed in non-static class member functions`
Comment #1 by dlang-bot — 2023-04-13T10:49:25Z
@RazvanN7 created dlang/dmd pull request #15104 "Fix Issue 23836 - Two errors printed for typeof(super) in non-static member context" fixing this issue: - Fix Issue 23836 - Two errors printed for typeof(super) in non-static member context https://github.com/dlang/dmd/pull/15104
Comment #2 by dlang-bot — 2023-04-13T15:12:17Z
dlang/dmd pull request #15104 "Fix Issue 23836 - Two errors printed for typeof(super) in non-static member context" was merged into master: - ef7d657db8607cee3b94d34132326cdb1b838f89 by RazvanN7: Fix Issue 23836 - Two errors printed for typeof(super) in non-static member context https://github.com/dlang/dmd/pull/15104