summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-16 23:58:30 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-24 22:29:59 +0200
commitf7efb9505c0ede48a67fb6a256604ba3ca02bcb3 (patch)
tree5919d3ce475e374427516c910f68e4e22a302d4d /src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
parentda3c5456d0d69ed20f1ba40cdb7b5efde9189d0b (diff)
downloadscala-f7efb9505c0ede48a67fb6a256604ba3ca02bcb3.tar.gz
scala-f7efb9505c0ede48a67fb6a256604ba3ca02bcb3.tar.bz2
scala-f7efb9505c0ede48a67fb6a256604ba3ca02bcb3.zip
distinguishes flag-agnostic completers
At times it's useful to know whether a lazy type can change the flags of the underlying symbol or not. If the completer is flag-agnostic, this means that we can safely use flag-inspection facilities such as hasFlag and isXXX tests without fear of looking into not yet initialized data.
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index a356b70e62..8fd8dfaf83 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -844,7 +844,7 @@ abstract class ClassfileParser {
GenPolyType(ownTypeParams, tpe)
} // sigToType
- class TypeParamsType(override val typeParams: List[Symbol]) extends LazyType {
+ class TypeParamsType(override val typeParams: List[Symbol]) extends LazyType with FlagAgnosticCompleter {
override def complete(sym: Symbol) { throw new AssertionError("cyclic type dereferencing") }
}
@@ -1228,7 +1228,7 @@ abstract class ClassfileParser {
}
}
- class LazyAliasType(alias: Symbol) extends LazyType {
+ class LazyAliasType(alias: Symbol) extends LazyType with FlagAgnosticCompleter {
override def complete(sym: Symbol) {
sym setInfo createFromClonedSymbols(alias.initialize.typeParams, alias.tpe)(typeFun)
}