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

Scaladoc shows an empty parameter list on methods that have no parameter lists #5077

Closed
scabug opened this issue Oct 15, 2011 · 7 comments
Closed
Assignees
Labels

Comments

@scabug
Copy link

@scabug scabug commented Oct 15, 2011

In both the 2.9.1 and the current nightly API doc, methods like toString and ## that have zero parameter lists are shown as having a single, empty parameter list. That's incorrect; these are distinct method types.

For example toString is shown as: def toString (): String when it should be simply def toString: String.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 15, 2011

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 15, 2011

@paulp said:
Actually scaladoc is correct. You are probably getting this idea from the Any.scala source code, which is fiction. The methods are created synthetically, and they do have parens. It's Any.scala that needs adjustment.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 15, 2011

@SethTisue said:
doh.

well, I'm tempted to suggest the empty parameter lists be removed from the synthetic methods. it seems like the right thing from the user's perspective. but I can easily imagine it wouldn't really be worth tinkering with.

I could put the patch to Any.scala and AnyRef.scala together if you like. I'm in there anyway, documenting.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 15, 2011

Commit Message Bot (anonymous) said:
(extempore in r25836) Donated some parens to Any.

And a touch of documentation correctness. Closes #5077, no review.

@scabug scabug closed this Oct 15, 2011
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 15, 2011

@paulp said:
Can't even begin to imagine the breakage that would cause. Every call of the form "x.toString()" where x is an Any would become a compile error.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 15, 2011

@SethTisue said:
I am a bear of very little brain today.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Oct 16, 2011

@SethTisue said:
AnyRef.scala needs the same adjustment. pull request: scala/scala#105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.