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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

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

This comment has been minimized.

@scabug

This comment has been minimized.

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

This comment has been minimized.

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