summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/internal/Scopes.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2011-10-20 22:28:58 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2011-10-20 22:28:58 +0000
commit8704ed2fc92e3d82287317fe34126c5d4d84e10c (patch)
tree035a6d98a08e102ac6116e9048c36996d1af6a22 /src/compiler/scala/reflect/internal/Scopes.scala
parent98b904db879a0b987d6ae50e5d5d990285ed8c59 (diff)
downloadscala-8704ed2fc92e3d82287317fe34126c5d4d84e10c.tar.gz
scala-8704ed2fc92e3d82287317fe34126c5d4d84e10c.tar.bz2
scala-8704ed2fc92e3d82287317fe34126c5d4d84e10c.zip
infer singleton when asking for it
a type var's constraint now also tracks whether the type var was compared to a stable type if it was, we probably shouldn't widen the type argument that's inferred for this var, as the result will surely fail to type check NOTE: must be enabled using -Xexperimental review by extempore
Diffstat (limited to 'src/compiler/scala/reflect/internal/Scopes.scala')
-rw-r--r--src/compiler/scala/reflect/internal/Scopes.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/reflect/internal/Scopes.scala b/src/compiler/scala/reflect/internal/Scopes.scala
index 4db2cbf0d6..3ea43c22f2 100644
--- a/src/compiler/scala/reflect/internal/Scopes.scala
+++ b/src/compiler/scala/reflect/internal/Scopes.scala
@@ -33,6 +33,10 @@ trait Scopes extends api.Scopes { self: SymbolTable =>
e
}
+ object Scope {
+ def unapplySeq(decls: Scope): Some[Seq[Symbol]] = Some(decls.toList)
+ }
+
class Scope(initElems: ScopeEntry) extends Iterable[Symbol] {
var elems: ScopeEntry = initElems