mirror of https://github.com/sbt/sbt.git
Do not normalize types in the api extraction phase.
In summary this commit: * drops type normalization in api phase but keeps dealiasing * fixes #736 and marks corresponding test as passing I discussed type normalization with @adriaanm and according to him sbt shouldn't call that method. The purpose of this method to convert to a form that subtyping algorithm expects. Sbt doesn't need to call it and it's fairly expensive in some cases. Dropping type normalization also fixes #726 by not running into stale cache in Scala compiler problem described in SI-7361.
This commit is contained in:
parent
fbe4dedd11
commit
3ba9348740
|
|
@ -312,9 +312,13 @@ final class API(val global: CallbackGlobal) extends Compat
|
|||
private def processType(in: Symbol, t: Type): xsbti.api.Type = typeCache.getOrElseUpdate((in, t), makeType(in, t))
|
||||
private def makeType(in: Symbol, t: Type): xsbti.api.Type =
|
||||
{
|
||||
def dealias(t: Type) = t match { case TypeRef(_, sym, _) if sym.isAliasType => t.normalize; case _ => t }
|
||||
|
||||
dealias(t) match
|
||||
val dealiased = t match {
|
||||
case TypeRef(_, sym, _) if sym.isAliasType => t.dealias
|
||||
case _ => t
|
||||
}
|
||||
|
||||
dealiased match
|
||||
{
|
||||
case NoPrefix => Constants.emptyType
|
||||
case ThisType(sym) => new xsbti.api.Singleton(thisPath(sym))
|
||||
|
|
|
|||
Loading…
Reference in New Issue