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 21178 - It is not explained what is "unknown" #3512

Merged
merged 2 commits into from
Feb 3, 2023

Conversation

Mateiuss
Copy link
Contributor

@Mateiuss Mateiuss commented Feb 1, 2023

Added an example of using an opaque enum (and also an error in using it).

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @Mateiuss! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
21178 minor It is not explained what is "unknown"

spec/enum.dd Outdated
---
enum X; // opaque enum
writeln(X.init); // error: enum x is opaque and has no default initializer
// See 17.1.1 to understand what .init means
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no need for this line.

Copy link
Contributor Author

@Mateiuss Mateiuss Feb 3, 2023

Choose a reason for hiding this comment

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

I made a new commit where I erased that line. Also, I added a proper message to the commit.

@RazvanN7 RazvanN7 changed the title Fix Issue 21178 Fix Issue 21178 - It is not explained what is "unknown" Feb 3, 2023
@RazvanN7
Copy link
Contributor

RazvanN7 commented Feb 3, 2023

Also, could you please have some information in the commit message? "Fix Issue 21178" does not offer any information.
At the very least you could put the title of the issue in the commit message.

I showcased what does the term opaque mean by trying to access it's "initializer". This results in an error.
@RazvanN7 RazvanN7 merged commit d46a510 into dlang:master Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants