Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Issue 18000 - [scope] auto-generated opAssign not scope aware #8011

Merged
merged 1 commit into from
Mar 12, 2018

Conversation

WalterBright
Copy link
Member

Also added notMaybeScope() which makes debugging inference problems much easier.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
18000 normal [scope] auto-generated opAssign not scope aware

Copy link
Member

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

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

Not too happy about notMaybeScope as logging all assignments should be possible with a dedicated opAssign.

printf("%.*s(%d): notMaybeScope('%s')\n", cast(int)file.length, file.ptr, line, v.toChars());
v.storage_class &= ~STC.maybescope;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

How about defining a special opAssign on STC which might be a more generic debugging facility?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because I don't want a blizzard of messages to sort through, and because I've had repeated issues only with maybescope, not others.

@dlang-bot dlang-bot merged commit 1339733 into dlang:master Mar 12, 2018
@WalterBright WalterBright deleted the fix18000 branch March 12, 2018 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants