Skip to content

Conversation

quickfur
Copy link
Member

ghost pushed a commit that referenced this pull request Sep 10, 2014
Fix issue 6251: docs should warn about foreach_reverse over delegate.
@ghost ghost merged commit 1e29f79 into dlang:master Sep 10, 2014
@ghost
Copy link

ghost commented Sep 10, 2014

Thanks!

@quickfur quickfur deleted the bug6251 branch September 10, 2014 12:01
@CyberShadow
Copy link
Member

The compiler emits a warning when attempting to use foreach_reverse over a delegate:

dlang/dmd#184

@ghost
Copy link

ghost commented Sep 10, 2014

But only with -wi right?

@CyberShadow
Copy link
Member

Well, yes, since it's a warning.

@ghost
Copy link

ghost commented Sep 10, 2014

I mean, the user may not be aware of it unless they have the switch enabled. So it's still nice to document intention.

@CyberShadow
Copy link
Member

Yes. I thought I'd mention it since the problem is spread across two issues, the warning was committed after the documentation issue was opened, and this documentation change does not mention the warning.

@ghost
Copy link

ghost commented Sep 10, 2014

So, another pull in the making? :)

@CyberShadow
Copy link
Member

I don't know? This pull doesn't exactly contradict the warning pull.

@CyberShadow
Copy link
Member

FYI Daniel posted a pull to change it to a deprecation:
dlang/dmd#3971

@quickfur
Copy link
Member Author

The warning was committed but it's almost unnoticeable, since it only shows up with -w. I didn't even notice it until I saw the PR that implements it, and started wondering why the message wasn't been displayed -- I actually had to read the code before I realized that -w was necessary. Tl;dr, the effectiveness of the warning is close to nil. I support the PR to turn it into a deprecation.

This pull request was closed.
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.

2 participants