diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-08-10 13:01:25 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-08-13 22:30:23 +0200 |
commit | 37a290b02ef09c7e563239d878088aa30405eecb (patch) | |
tree | 60276435304a47a46fee2f5bd7c4b015a34ab7a3 /src/reflect/scala/reflect/api/Symbols.scala | |
parent | 0e2080e8bf1c54cac59c5b0c53a93eb0de009d3b (diff) | |
download | scala-37a290b02ef09c7e563239d878088aa30405eecb.tar.gz scala-37a290b02ef09c7e563239d878088aa30405eecb.tar.bz2 scala-37a290b02ef09c7e563239d878088aa30405eecb.zip |
HIDDEN => ARTIFACT
This test is necessary in the API to tell apart useful synthetic symbols
(such as accessors) and low-level compilation artifacts (such as $outer).
However `isHidden` (as it's currently named in the compiler) is too generic.
Hence I renamed it along with the corresponding flag. Now the test says
`isArtifact` and the flag is named ARTIFACT.
Despite being an improvement over the first version, `isArtifact` is
still a bit unlucky. The name I like is `isImplementationArtifact`, but that's
a mouthful to be used in compiler hacking. Moreover, IMPLEMENTATION_ARTIFACT
looks weird.
For a discussion about related stuff see:
http://groups.google.com/group/scala-internals/browse_thread/thread/d04e762127737968
https://github.com/scala/scala/pull/1114
Diffstat (limited to 'src/reflect/scala/reflect/api/Symbols.scala')
-rw-r--r-- | src/reflect/scala/reflect/api/Symbols.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala index 448382973a..9846d827b7 100644 --- a/src/reflect/scala/reflect/api/Symbols.scala +++ b/src/reflect/scala/reflect/api/Symbols.scala @@ -67,6 +67,11 @@ trait Symbols extends base.Symbols { self: Universe => */ def isSynthetic: Boolean + /** Does this symbol represent an implementation artifact that isn't meant for public use? + * Examples of such artifacts are erasure bridges and $outer fields. + */ + def isImplementationArtifact: Boolean + /** Does this symbol represent a local declaration or definition? * * If yes, either `isPrivate` or `isProtected` are guaranteed to be true. |