Skip to content

Commit c7a09f2

Browse files
committed
Revert changes to CheckRealizable
Since Shape is no longer generated separately we do not need to make an exception for synthesized members.
1 parent 48dcb89 commit c7a09f2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

compiler/src/dotty/tools/dotc/core/CheckRealizable.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ class CheckRealizable(implicit ctx: Context) {
111111
/** `Realizable` if `tp` has good bounds, a `HasProblem...` instance
112112
* pointing to a bad bounds member otherwise. "Has good bounds" means:
113113
*
114-
* - all non-synthetic type members have good bounds.
115-
* Synthetic members are unchecked, for two reasons:
116-
* - synthetic opaque aliases do have conflicting bounds, but this is OK
117-
* - we should not force synthesized Shape types because that might
118-
* query the `children` annotation too early.
114+
* - all type members have good bounds (except for opaque helpers)
119115
* - all refinements of the underlying type have good bounds (except for opaque companions)
120116
* - all base types are class types, and if their arguments are wildcards
121117
* they have good bounds.
@@ -133,8 +129,7 @@ class CheckRealizable(implicit ctx: Context) {
133129
val memberProblems =
134130
for {
135131
mbr <- tp.nonClassTypeMembers
136-
if !mbr.symbol.is(Synthetic)
137-
if !(mbr.info.loBound <:< mbr.info.hiBound)
132+
if !(mbr.info.loBound <:< mbr.info.hiBound) && !mbr.symbol.isOpaqueHelper
138133
}
139134
yield new HasProblemBounds(mbr.name, mbr.info)
140135

0 commit comments

Comments
 (0)