Skip to content

Replace internal tab char in comment in Synthesizer.scala #23691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions compiler/src/dotty/tools/dotc/typer/Synthesizer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
// bounds are usually widened during instantiation.
instArg(tp.tp1)
case tvar: TypeVar if ctx.typerState.constraint.contains(tvar) =>
// If tvar has a lower or upper bound:
// 1. If the bound is not another type variable, use this as approximation.
// 2. Otherwise, if the type can be forced to be fully defined, use that type
// as approximation.
// 3. Otherwise leave argument uninstantiated.
// The reason for (2) is that we observed complicated constraints in i23611.scala
// that get better types if a fully defined type is computed than if several type
// variables are approximated incrementally. This is a minimization of some ZIO code.
// So in order to keep backwards compatibility (where before we _only_ did 2) we
// add that special case.
// If tvar has a lower or upper bound:
// 1. If the bound is not another type variable, use this as approximation.
// 2. Otherwise, if the type can be forced to be fully defined, use that type
// as approximation.
// 3. Otherwise leave argument uninstantiated.
// The reason for (2) is that we observed complicated constraints in i23611.scala
// that get better types if a fully defined type is computed than if several type
// variables are approximated incrementally. This is a minimization of some ZIO code.
// So in order to keep backwards compatibility (where before we _only_ did 2) we
// add that special case.
def isGroundConstr(tp: Type): Boolean = tp.dealias match
case tvar: TypeVar if ctx.typerState.constraint.contains(tvar) => false
case pref: TypeParamRef if ctx.typerState.constraint.contains(pref) => false
Expand Down
Loading