@@ -1134,20 +1134,23 @@ object Denotations {
1134
1134
1135
1135
/** The derived denotation with the given `info` transformed with `asSeenFrom`.
1136
1136
* The prefix of the derived denotation is the new prefix `pre` if the type is
1137
- * abstract or opaque, or if the current prefix is already different from `NoPrefix`.
1137
+ * opaque, or if the current prefix is already different from `NoPrefix`.
1138
1138
* That leaves SymDenotations (which have NoPrefix as the prefix), which are left
1139
- * as SymDenotations unless the type is abstract or opaque. This special case
1140
- * is not ideal, and we should see whether we can drop it.
1141
- * Currently dropping the special case fails the bootstrap. There's also a concern
1142
- * that without the special case we'd create more denotation objects, at a price
1143
- * in performance.
1139
+ * as SymDenotations unless the type is opaque. The treatment of opaque types
1140
+ * is needed, without it i7159.scala fails in from-tasty. Without the treatment,
1141
+ * opaque type denotations in subclasses are kept as SymDenotations, which means
1142
+ * that the transform in `ElimOpaque` will return the symbol's opaque alias without
1143
+ * adding the needed asSeenFrom.
1144
+ *
1145
+ * Logically, the right thing to do would be to extend the same treatment to all denotations
1146
+ * Currently this fails the bootstrap. There's also a concern that this generalization
1147
+ * would create more denotation objects, at a price in performance.
1144
1148
*/
1145
1149
def derived (info : Type ) =
1146
1150
derivedSingleDenotation(
1147
1151
symbol,
1148
1152
info.asSeenFrom(pre, owner),
1149
- if (symbol.isOneOf(Opaque | Deferred ) || this .prefix != NoPrefix ) pre
1150
- else /* special case, see above */ this .prefix)
1153
+ if (symbol.is(Opaque ) || this .prefix != NoPrefix ) pre else this .prefix)
1151
1154
1152
1155
pre match {
1153
1156
case pre : ThisType if symbol.isOpaqueAlias && pre.cls == owner =>
0 commit comments