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

scala.Dynamic documentation is incorrect #5039

Closed
scabug opened this issue Sep 29, 2011 · 5 comments
Closed

scala.Dynamic documentation is incorrect #5039

scabug opened this issue Sep 29, 2011 · 5 comments

Comments

@scabug
Copy link

scabug commented Sep 29, 2011

The API doc for scala.Dynamic reads:
"[...] calls x.meth(args) [... are ...] rewritten to x.applyDynamic("meth", args)."

While they are actually rewritten to x.applyDynamic("meth")(args).

(I'm setting Priority to Critical because it's as bad as a doc bug can be -- took me quite a while to figure out, and I'm not sure I would have been able to guess without access to snippets out there or the compiler's source; apologies if I'm breaking policy or custom).

@scabug
Copy link
Author

scabug commented Sep 29, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5039?orig=1
Reporter: @jsalvata
Affected Versions: 2.9.2

@scabug
Copy link
Author

scabug commented Sep 29, 2011

@jsalvata said:
Also:

"Instances x of this trait [...] If a call is not natively supported by x, it is rewritten [...]"

What really matters is not whether the INSTANCE supports the call or not, but whether the visible (compile-time) type of x supports it.

@scabug
Copy link
Author

scabug commented Sep 29, 2011

@jsalvata said:
I've included my suggestion for a fix in the patch I just posted for #4536.

@scabug
Copy link
Author

scabug commented Sep 29, 2011

@harrah said:
Please let reviewers set the priority field. A problem with something hidden behind -Xexperimental is not critical.

@scabug
Copy link
Author

scabug commented Oct 1, 2011

@jsalvata said:
Following discussion in scala-internals, it is unclear whether it is better to make the docu match the implementation or the reverse. I'm closing this bug -- I'll reopen if fixing the docs turns out to be the best course of action.

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

No branches or pull requests

1 participant