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

Flag-related functionality would use a cleanup #6267

Open
scabug opened this issue Aug 21, 2012 · 4 comments
Open

Flag-related functionality would use a cleanup #6267

scabug opened this issue Aug 21, 2012 · 4 comments
Milestone

Comments

@scabug
Copy link

scabug commented Aug 21, 2012

Arguably we need to get rid of flags in Modifiers (similarly to what've been done for Symbols).

However, it'd also be great to support the following use case:

def buildParams(methodType: Type) =
  paramss(methodType) map { params =>
    params map { p =>
      ValDef(
        Modifiers(p.flags),
        newTermName(p.name.toString),
        paramType(p.typeSignature),
        EmptyTree)
    }
  }

Rather controversial requirements, but this only makes it more interesting.

@scabug
Copy link
Author

scabug commented Aug 21, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6267?orig=1
Reporter: @xeno-by
Affected Versions: 2.10.0, 2.11.0

@scabug
Copy link
Author

scabug commented May 29, 2013

@scabug
Copy link
Author

scabug commented Jan 27, 2014

@xeno-by said:
An interesting idea proposed by Denys is to unify flags and annotations. Under that scheme, PRIVATE would become @Private, and manipulating flags would be as trivial as working with a collection of annotations. Under the covers, noone prevents us from implementing certain system annotations as bits, but users will no longer have to observe this implementation detail.

@scabug
Copy link
Author

scabug commented Feb 4, 2014

@soc said:
Sounds like an interesting approach and would it make easier to make stuff like STATIC or ENUM flags show up without any further intervention!

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

3 participants