Skip to content

[2024 edition] Deprecate method prefix type qualifiers#23215

Open
ntrel wants to merge 3 commits into
dlang:masterfrom
ntrel:prefix-qual
Open

[2024 edition] Deprecate method prefix type qualifiers#23215
ntrel wants to merge 3 commits into
dlang:masterfrom
ntrel:prefix-qual

Conversation

@ntrel

@ntrel ntrel commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #20474.

@dkorpel dkorpel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good, but the first edition is limited to (a subset of) existing deprecations which will be discussed Friday, so now new deprecations. I'm down to merge this as is already and fixup the edition condition later though.

Comment thread compiler/src/dmd/parse.d
if (mod.edition >= Edition.v2024 && storageClass & STC.TYPECTOR)
{
typeof(AST.Declaration.storage_class) stc = storageClass & STC.TYPECTOR;
auto qual = (AST.stcToString(stc) ~ '\0').ptr;

@dkorpel dkorpel Jun 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight preference to keep this a D string and pass it as "%.*s", cast(int) qual.length, qual.ptr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow qualifiers as member function attributes in prefix notation

2 participants