Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scalacenter#423: Merge the TypeBounds of type members without nee…
…ding subtyping. There was an infinite recursion between looking up a type member of a refinement and subtyping of that member against the same refinement. This came from computing the merged TypeBounds of the type member during subtyping, which used subtyping to get rid of useless bounds. We break the cycle by not using subtyping when merging the TypeBounds of a type member anymore. Instead, we manually dive into possibly-higher-kinded bounds (`TypeLambda`s themselves, but also `Nothing` and `AnyKind`), and otherwise construction a union or intersection type. Unwrapping higher-kinded bounds is necessary because constructing a uniont or intersection requires proper types.
- Loading branch information