File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -850,8 +850,6 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
850
850
nameString(sym.owner.name)
851
851
else if (sym.is(ModuleClass ))
852
852
nameString(sym.name.stripModuleClassSuffix)
853
- else if (hasMeaninglessName(sym))
854
- simpleNameString(sym.owner)
855
853
else
856
854
nameString(sym)
857
855
(keywordText(kindString(sym)) ~~ {
Original file line number Diff line number Diff line change @@ -40,10 +40,11 @@ class CompleteJavaEnums extends MiniPhase with InfoTransformer { thisPhase =>
40
40
addConstrParams(sym.info)
41
41
else tp
42
42
43
- /** Is `sym` a Scala enum class that derives from `java.lang.Enum`?
43
+ /** Is `sym` a Scala enum class that derives (directly) from `java.lang.Enum`?
44
44
*/
45
45
private def derivesFromJavaEnum (sym : Symbol )(implicit ctx : Context ) =
46
- sym.is(Enum , butNot = Case ) && sym.derivesFrom(defn.JavaEnumClass )
46
+ sym.is(Enum , butNot = Case ) &&
47
+ sym.info.parents.exists(p => p.typeSymbol == defn.JavaEnumClass )
47
48
48
49
/** Add constructor parameters `$name: String` and `$ordinal: Int` to the end of
49
50
* the last parameter list of (method- or poly-) type `tp`.
You can’t perform that action at this time.
0 commit comments