Skip to content

Fix spurious 'default construction is disabled' error for class#23393

Open
ntrel wants to merge 2 commits into
dlang:masterfrom
ntrel:class-struct-disable
Open

Fix spurious 'default construction is disabled' error for class#23393
ntrel wants to merge 2 commits into
dlang:masterfrom
ntrel:class-struct-disable

Conversation

@ntrel

@ntrel ntrel commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #23392.
Bug introduced in #23212.

Comment thread compiler/src/dmd/expressionsem.d Outdated
@dkorpel

dkorpel commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for investigating this so quickly!

@thewilsonator thewilsonator 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.

Looks great!

struct Parser { @disable this(); this(int) {} }
class Client { Parser parser; this() { parser = Parser(0); } }
void sink(out Client r) {}
void main() {

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.

compilable test should not contain a main, rename test.

@TurkeyMan

Copy link
Copy Markdown
Contributor

How we going here? I was having a great time with the nightly until this happened :)

@github-actions

Copy link
Copy Markdown

DMD perf check

Metric Base PR delta
compile hello.d (instr) 216.2 M 216.2 M +0.01%
compile hello.d -O (instr) 234.8 M 234.8 M 0.00%
dmd binary size (stripped) 6.86 MB 6.87 MB +0.17%
hello binary size 0.72 MB 0.72 MB 0.00%
peak RSS (compile hello.d) 46 MB 46 MB +0.03%

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.

CI suddenly broke with DMD nightly

4 participants