We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b77e07 commit 6be0b81Copy full SHA for 6be0b81
compiler/src/dotty/tools/dotc/core/TypeErasure.scala
@@ -244,7 +244,10 @@ object TypeErasure {
244
!classify(tp).derivesFrom(defn.ObjectClass) &&
245
!tp.binder.resultType.isJavaMethod
246
case tp: TypeAlias => isUnboundedGeneric(tp.alias)
247
- case tp: TypeBounds => !classify(tp.hi).derivesFrom(defn.ObjectClass)
+ case tp: TypeBounds =>
248
+ val upper = classify(tp.hi)
249
+ !upper.derivesFrom(defn.ObjectClass) &&
250
+ !upper.isPrimitiveValueType
251
case tp: TypeProxy => isUnboundedGeneric(tp.translucentSuperType)
252
case tp: AndType => isUnboundedGeneric(tp.tp1) && isUnboundedGeneric(tp.tp2)
253
case tp: OrType => isUnboundedGeneric(tp.tp1) || isUnboundedGeneric(tp.tp2)
0 commit comments