File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -277,8 +277,11 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
277
277
*
278
278
* import owner.feature
279
279
*
280
- * (the feature may be bunched with others, or renamed, but wildcard imports
281
- * don't count).
280
+ * and there is no visible nested import that excludes the feature, as in
281
+ *
282
+ * import owner.{ feature => _ }
283
+ *
284
+ * The feature may be bunched with others, or renamed, but wildcard imports don't count.
282
285
*
283
286
* 2. The feature is enabled by a compiler option
284
287
*
@@ -296,8 +299,8 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
296
299
if (ctx.importInfo eq null ) false
297
300
else {
298
301
val isImportOwner = ctx.importInfo.site.widen.typeSymbol eq owner
299
- if (isImportOwner && ctx.importInfo.excluded .contains(feature)) false
300
- else if (isImportOwner && ctx.importInfo.originals .contains(feature)) true
302
+ if (isImportOwner && ctx.importInfo.originals .contains(feature)) true
303
+ else if (isImportOwner && ctx.importInfo.excluded .contains(feature)) false
301
304
else {
302
305
var c = ctx.outer
303
306
while (c.importInfo eq ctx.importInfo) c = c.outer
You can’t perform that action at this time.
0 commit comments