File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -162,25 +162,25 @@ object ProtoTypes {
162
162
* 1. The type has Nothing or Wildcard as a prefix or underlying type
163
163
* 2. The type is an abstract type with a lower bound that has a unknown
164
164
* members and an upper bound that is both provisional and has unknown members.
165
- * 3. The type is a type param ref or uninstiated type var with a lower
166
- * that has unknown members.
165
+ * 3. The type is an uninstiated type var with a lower that has unknown members.
167
166
* 4. Type proxies have unknown members if their super types do
168
167
*/
169
168
private def hasUnknownMembers (tp : Type )(using Context ): Boolean = tp match
170
169
case tp : WildcardType => true
171
170
case NoType => true
172
171
case tp : TypeRef =>
173
172
val sym = tp.symbol
174
- defn.isBottomClass(sym)
175
- || ! sym.isClass
173
+ sym == defn.NothingClass
174
+ || ! sym.isClass
176
175
&& ! sym.isStatic
177
176
&& {
178
177
hasUnknownMembers(tp.prefix)
179
178
|| { val bound = tp.info.hiBound
180
179
bound.isProvisional && hasUnknownMembers(bound)
181
180
} && hasUnknownMembers(tp.info.loBound)
182
181
}
183
- case tp : TypeParamRef => hasUnknownMembers(TypeComparer .bounds(tp).lo)
182
+ case tp : TypeVar =>
183
+ ! tp.isInstantiated && hasUnknownMembers(TypeComparer .bounds(tp.origin).lo)
184
184
case tp : AppliedType => hasUnknownMembers(tp.tycon) || hasUnknownMembers(tp.superType)
185
185
case tp : TypeProxy => hasUnknownMembers(tp.superType)
186
186
// It woukd make sense to also include And/OrTypes, but that leads to
You can’t perform that action at this time.
0 commit comments