summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Symbols.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-08-06 16:31:18 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-08-06 16:31:18 +0200
commitf6f15279aabe71348f78deb78cdd6f802852a446 (patch)
tree4aa95940e3f26d3c5383f594320db4213b938fe2 /src/reflect/scala/reflect/internal/Symbols.scala
parentec4a9fb5251bed30f4d99091d66190c1bd9daa03 (diff)
downloadscala-f6f15279aabe71348f78deb78cdd6f802852a446.tar.gz
scala-f6f15279aabe71348f78deb78cdd6f802852a446.tar.bz2
scala-f6f15279aabe71348f78deb78cdd6f802852a446.zip
adds more tests for api.Symbols
I overlooked some of the tests that should be added to the public API. This commit fixes my mistake. Also see 027b00171c. To reiterate the reasoning behind introduction of test methods into the API. I'd argue that the API duplication w.r.t flags is trumped by unified interface to tests and better encapsulation (especially since some of the flags have different meaning depending on whether the flaggee is a term or a type).
Diffstat (limited to 'src/reflect/scala/reflect/internal/Symbols.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index c356416112..9ae4302734 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -64,6 +64,8 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
def kind: String = kindString
def isExistential: Boolean = this.isExistentiallyBound
+ def isParamWithDefault: Boolean = this.hasDefault
+ def isByNameParam: Boolean = this.isValueParameter && (this hasFlag BYNAMEPARAM)
def newNestedSymbol(name: Name, pos: Position, newFlags: Long, isClass: Boolean): Symbol = name match {
case n: TermName => newTermSymbol(n, pos, newFlags)
@@ -2496,6 +2498,8 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
override def params: List[List[Symbol]] = paramss
+ override def isVarargs: Boolean = definitions.isVarArgsList(paramss.flatten)
+
override def returnType: Type = {
def loop(tpe: Type): Type =
tpe match {