File tree 3 files changed +20
-3
lines changed
compiler/src/dotty/tools/dotc
3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,7 @@ object SymDenotations {
685
685
isAbstractOrAliasType && ! isAbstractOrParamType
686
686
687
687
/** Is this symbol an abstract or alias type? */
688
- final def isAbstractOrAliasType : Boolean = isType & ! isClass
688
+ final def isAbstractOrAliasType : Boolean = isType && ! isClass
689
689
690
690
/** Is this symbol an abstract type or type parameter? */
691
691
final def isAbstractOrParamType (using Context ): Boolean = this .isOneOf(DeferredOrTypeParam )
Original file line number Diff line number Diff line change @@ -575,14 +575,14 @@ object CheckUnused:
575
575
|| m.hasAnnotation(dd.UnusedAnnot ) // param of unused method
576
576
|| sym.name.is(ContextFunctionParamName ) // a ubiquitous parameter
577
577
|| sym.isCanEqual
578
- || sym.info.typeSymbol.match // more ubiquity
578
+ || sym.info.dealias. typeSymbol.match // more ubiquity
579
579
case dd.DummyImplicitClass | dd.SubTypeClass | dd.SameTypeClass => true
580
580
case tps =>
581
581
tps.isMarkerTrait // no members to use; was only if sym.name.is(ContextBoundParamName)
582
582
|| // but consider NotGiven
583
583
tps.hasAnnotation(dd.LanguageFeatureMetaAnnot )
584
584
|| sym.info.isSingleton // DSL friendly
585
- || sym.info.isInstanceOf [RefinedType ] // can't be expressed as a context bound
585
+ || sym.info.dealias. isInstanceOf [RefinedType ] // can't be expressed as a context bound
586
586
if ctx.settings.WunusedHas .implicits
587
587
&& ! infos.skip(m)
588
588
&& ! m.isEffectivelyOverride
Original file line number Diff line number Diff line change
1
+ //> using options -Wunused:all -Werror
2
+
3
+ trait MonadError [F [_], E ]
4
+ type MonadThrow [F [_]] = MonadError [F , Throwable ]
5
+
6
+ trait MetaStreams [F [_]]:
7
+ def use [A ]: F [A ] = ???
8
+ trait WriteResult
9
+
10
+ trait MetaStreamsSyntax :
11
+ extension [F [_]](ms : MetaStreams [F ])(using MonadThrow [F ])
12
+ def setMaxAge (): F [WriteResult ] =
13
+ summon[MonadThrow [F ]]
14
+ ms.use[WriteResult ]
15
+
16
+ def setTruncateBefore (): F [WriteResult ] =
17
+ ms.use[WriteResult ]
You can’t perform that action at this time.
0 commit comments