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
Exposing the flags method in the public API for symbols #6785
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6785?orig=1 |
@paulp said (edited on Dec 7, 2012 11:58:37 PM UTC): |
@adriaanm said: |
@adriaanm said: |
@xeno-by said (edited on Feb 1, 2014 1:49:44 AM UTC): When creating flags based on someone else's flags it is oftentimes necessary to negate some bits or to only obtain a subset of those bits - something that's currently not available in the API, and exposing all that stuff on the verge of #6267 seems a bit too much. If you feel that you need flags in the public API, please speak up - I will be glad to re-evaluate the "won't fix" given strong evidence. |
@xeno-by said (edited on Feb 15, 2014 12:49:50 AM UTC): #6785 exposes Symbol.flags, setFlag and resetFlag My first feeling was not to expose Symbol.flags, because that would |
It would be convenient to be able to access a symbol's flags directly. For example, if we want to implement a trait's methods in a macro, but don't have access to a tree for the trait, we currently have to iterate through the trait type's declarations and manually create Modifiers for each by reconstructing the flags from the method symbol's isPrivate, etc. methods.
See this Stack Overflow question for a more detailed discussion of the issue.
The text was updated successfully, but these errors were encountered: