Skip to content

Comments

[spec] Document ref and out parameters#2452

Merged
dlang-bot merged 4 commits intodlang:masterfrom
ntrel:patch-5
Jun 17, 2020
Merged

[spec] Document ref and out parameters#2452
dlang-bot merged 4 commits intodlang:masterfrom
ntrel:patch-5

Conversation

@ntrel
Copy link
Contributor

@ntrel ntrel commented Aug 21, 2018

  • Split the ref example from the out examples, and put it first.
  • Briefly describe each.
  • Tweak the scope description.

@dlang-bot
Copy link
Contributor

dlang-bot commented Aug 21, 2018

Thanks for your pull request and interest in making D better, @ntrel! 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

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@ntrel ntrel force-pushed the patch-5 branch 2 times, most recently from 189e3bc to cf396cc Compare August 23, 2018 11:27
spec/function.dd Outdated
Ignored for parameters with no references)
Ignored for parameters with no references.
Note: The `scope` attribute is currently only enforced by `dmd`
when the `-dip1000` switch is passed.
Copy link
Contributor

@JinShil JinShil Aug 23, 2018

Choose a reason for hiding this comment

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

Since DIP 25 and DIP 1000 are experimental features (at least I think they are). I'd prefer if we had a separate document in the spec describing their semantics. Then when they are official, their documentation can be folded into the spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-dip25 is already in the docs (I wrote it):
https://dlang.org/spec/function.html#return-ref-parameters

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. We're lucky to have it. But I think it should be moved until DIP 25 and 1000 are official.

@ntrel ntrel changed the title [spec] Document Ref and Out parameters properly [spec] Document ref and out parameters, tweak scope Aug 23, 2018
@ntrel ntrel changed the title [spec] Document ref and out parameters, tweak scope [spec] Document ref and out parameters Aug 23, 2018
@ntrel
Copy link
Contributor Author

ntrel commented Sep 25, 2018

Probably this just needs someone to do the git commit --amend trick to restart DAutoTest. (I don't have my terminal available ATM).

@ntrel
Copy link
Contributor Author

ntrel commented Oct 1, 2018

--amend retriggered tests, but now there's a different error. AFAICT this is the problem (which I also get for #2454 but with different input line numbers):

! Extra }, or forgotten \endgroup.
<recently read> \egroup 
                        
l.19214 }
         
? 
! Emergency stop.
<recently read> \egroup 
                        
l.19214 }
         
!  ==> Fatal error occurred, no output PDF file produced!

@ntrel
Copy link
Contributor Author

ntrel commented Oct 1, 2018

Same test error for #2459 - it seems anything that touches spec/function.dd gets this error. @wilzbach Any idea?

@ntrel
Copy link
Contributor Author

ntrel commented Jun 16, 2020

I forgot about this, but the test error blocking this has long since gone away - which then revealed an actual error, now fixed.

@dlang-bot dlang-bot merged commit cbc9eac into dlang:master Jun 17, 2020
@ntrel ntrel deleted the patch-5 branch June 17, 2020 08:15
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.

5 participants