File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,9 @@ class TypeApplications(val self: Type) extends AnyVal {
494
494
case self : SingletonType => - 1
495
495
case self : TypeVar => self.origin.knownHK
496
496
case self : WildcardType => self.optBounds.knownHK
497
+ case self : PolyParam => self.underlying.knownHK
497
498
case self : TypeProxy => self.underlying.knownHK
499
+ case NoType => 0
498
500
case _ => - 1
499
501
}
500
502
Original file line number Diff line number Diff line change @@ -2765,7 +2765,11 @@ object Types {
2765
2765
2766
2766
def paramName = binder.paramNames(paramNum)
2767
2767
2768
- override def underlying (implicit ctx : Context ): Type = binder.paramBounds(paramNum)
2768
+ override def underlying (implicit ctx : Context ): Type = {
2769
+ val bounds = binder.paramBounds
2770
+ if (bounds == null ) NoType // this can happen if the PolyType is not initialized yet
2771
+ else bounds(paramNum)
2772
+ }
2769
2773
// no customized hashCode/equals needed because cycle is broken in PolyType
2770
2774
override def toString = s " PolyParam( $paramName) "
2771
2775
You can’t perform that action at this time.
0 commit comments