@@ -797,7 +797,7 @@ class Definitions {
797797    def  unapply (ft : Type )(implicit  ctx : Context ) =  {
798798      val  tsym  =  ft.typeSymbol
799799      if  (isFunctionClass(tsym)) {
800-         val  targs  =  ft.dealias .argInfos
800+         val  targs  =  ft.dealiasStripAnnots .argInfos
801801        if  (targs.isEmpty) None 
802802        else  Some (targs.init, targs.last, tsym.name.isImplicitFunction, tsym.name.isErasedFunction)
803803      }
@@ -810,7 +810,7 @@ class Definitions {
810810      PartialFunctionType .appliedTo(arg ::  result ::  Nil )
811811    def  unapply (pft : Type )(implicit  ctx : Context ) =  {
812812      if  (pft.isRef(PartialFunctionClass )) {
813-         val  targs  =  pft.dealias .argInfos
813+         val  targs  =  pft.dealiasStripAnnots .argInfos
814814        if  (targs.length ==  2 ) Some ((targs.head, targs.tail)) else  None 
815815      }
816816      else  None 
@@ -821,7 +821,7 @@ class Definitions {
821821    def  apply (elem : Type )(implicit  ctx : Context ) = 
822822      if  (ctx.erasedTypes) JavaArrayType (elem)
823823      else  ArrayType .appliedTo(elem ::  Nil )
824-     def  unapply (tp : Type )(implicit  ctx : Context ):  Option [Type ] =  tp.dealias  match  {
824+     def  unapply (tp : Type )(implicit  ctx : Context ):  Option [Type ] =  tp.dealiasStripAnnots  match  {
825825      case  AppliedType (at, arg ::  Nil ) if  at isRef ArrayType .symbol =>  Some (arg)
826826      case  _ =>  None 
827827    }
@@ -842,7 +842,7 @@ class Definitions {
842842      if  (ndims ==  0 ) elem else  ArrayOf (apply(elem, ndims -  1 ))
843843    def  unapply (tp : Type )(implicit  ctx : Context ):  Option [(Type , Int )] =  tp match  {
844844      case  ArrayOf (elemtp) => 
845-         def  recur (elemtp : Type ):  Option [(Type , Int )] =  elemtp.dealias  match  {
845+         def  recur (elemtp : Type ):  Option [(Type , Int )] =  elemtp.dealiasStripAnnots  match  {
846846          case  TypeBounds (lo, hi) =>  recur(hi)
847847          case  MultiArrayOf (finalElemTp, n) =>  Some (finalElemTp, n +  1 )
848848          case  _ =>  Some (elemtp, 1 )
@@ -1022,7 +1022,7 @@ class Definitions {
10221022     (sym eq Any_isInstanceOf ) ||  (sym eq Any_asInstanceOf )
10231023
10241024  def  isTupleType (tp : Type )(implicit  ctx : Context ) =  {
1025-     val  arity  =  tp.dealias .argInfos.length
1025+     val  arity  =  tp.dealiasStripAnnots .argInfos.length
10261026    arity <=  MaxTupleArity  &&  TupleType (arity) !=  null  &&  (tp isRef TupleType (arity).symbol)
10271027  }
10281028
@@ -1038,7 +1038,7 @@ class Definitions {
10381038   */  
10391039  def  isNonDepFunctionType (tp : Type )(implicit  ctx : Context ) =  {
10401040    val  arity  =  functionArity(tp)
1041-     val  sym  =  tp.dealias .typeSymbol
1041+     val  sym  =  tp.dealiasStripAnnots .typeSymbol
10421042    arity >=  0  &&  isFunctionClass(sym) &&  tp.isRef(FunctionType (arity, sym.name.isImplicitFunction, sym.name.isErasedFunction).typeSymbol)
10431043  }
10441044
@@ -1084,7 +1084,7 @@ class Definitions {
10841084        false 
10851085    })
10861086
1087-   def  functionArity (tp : Type )(implicit  ctx : Context ) =  tp.dealias .argInfos.length -  1 
1087+   def  functionArity (tp : Type )(implicit  ctx : Context ) =  tp.dealiasStripAnnots .argInfos.length -  1 
10881088
10891089  /**  Return underlying immplicit function type (i.e. instance of an ImplicitFunctionN class) 
10901090   *  or NoType if none exists. The following types are considered as underlying types: 
@@ -1093,7 +1093,7 @@ class Definitions {
10931093   *   - the upper bound of a TypeParamRef in the current constraint 
10941094   */  
10951095  def  asImplicitFunctionType (tp : Type )(implicit  ctx : Context ):  Type  = 
1096-     tp.stripTypeVar.dealias  match  {
1096+     tp.dealiasStripAnnots  match  {
10971097      case  tp1 : TypeParamRef  if  ctx.typerState.constraint.contains(tp1) => 
10981098        asImplicitFunctionType(ctx.typeComparer.bounds(tp1).hiBound)
10991099      case  tp1 => 
@@ -1106,7 +1106,7 @@ class Definitions {
11061106    asImplicitFunctionType(tp).exists
11071107
11081108  def  isErasedFunctionType (tp : Type )(implicit  ctx : Context ) = 
1109-     isFunctionType(tp) &&  tp.dealias .typeSymbol.name.isErasedFunction
1109+     isFunctionType(tp) &&  tp.dealiasStripAnnots .typeSymbol.name.isErasedFunction
11101110
11111111  //  ----- primitive value class machinery ------------------------------------------
11121112
0 commit comments