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

Omitted default argument values #4922

Closed
scabug opened this issue Aug 17, 2011 · 5 comments
Closed

Omitted default argument values #4922

scabug opened this issue Aug 17, 2011 · 5 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Aug 17, 2011

Under some conditions, for instance if a type parameter is present, the default argument value of a method parameter is not printed. Try for example:

trait Test {
  def f   (a: Seq[List[Any]] = Seq.empty[List[Any]])
  def g[A](a: Seq[List[A]]   = Seq.empty[List[A]])
}

Imo it would be satisfactory to print the textual representation of the default argument (see also #3721).

@scabug
Copy link
Author

@scabug scabug commented Aug 17, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4922?orig=1
Reporter: Sonnenschein (sonnenschein)
Affected Versions: 2.9.1

@scabug
Copy link
Author

@scabug scabug commented Aug 17, 2011

Sonnenschein (sonnenschein) said:
Seemingly, text effects do not work as described, so the code again:

trait Test {
def f (a: Seq[List[Any]] = Seq.empty[List[Any]])
def g[A](a: Seq[List[A]] = Seq.empty[List[A]])
}

@scabug
Copy link
Author

@scabug scabug commented Nov 12, 2011

Sonnenschein (sonnenschein) said:
Hi,
sorry but it's not obvious to me why you are downgrading this issue from Critical to Minor.

I do think it is critical if the Scaladoc reader cannot see the full signature of a methods because the default value for arguments is missing. Then he thinks he must provide all arguments on any call and that makes his code more complicated. It is as if Scaladoc would not mention implicit parameters, isn’t it?

Looking at the Jira definition of severity, I maintain that Critical (loss of data) or at least Major (major loss of function) would be appropriate.

Feel free to tell me if I can help you in any way.

Peter

@scabug
Copy link
Author

@scabug scabug commented Nov 12, 2011

@paulp said:
Sorry. The bug database sucks beyond all comprehension. Since anyone can set any priority to a ticket, the existing ~1000 tickets have a mix of priorities I have set and arbitrary priorities chosen by anyone. I need some way to communicate priorities so I went around the database lowering the priority of all the ones which are higher than the default where I did not personally raise it.

About this bug, from one standpoint it's easy to agree, and from another, no scaladoc bug is going to compete for the very small space I have in which to place higher priority bugs.

@scabug
Copy link
Author

@scabug scabug commented Dec 10, 2012

@scabug scabug closed this Dec 10, 2012
@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants