Skip to content

Commit 76eaaff

Browse files
authored
Merge branch 'master' into non-hot-local-val
2 parents bfb10bb + c53cc91 commit 76eaaff

File tree

489 files changed

+11645
-1746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

489 files changed

+11645
-1746
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ jobs:
124124
github.event_name == 'push'
125125
&& github.ref != 'refs/heads/master'
126126
)
127-
|| (
128-
github.event_name == 'pull_request'
129-
&& !contains(github.event.pull_request.body, '[skip ci]')
130-
)
131127
|| (
132128
github.event_name == 'pull_request'
133129
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -158,6 +154,10 @@ jobs:
158154
run: '"C:\Program Files\Git\bin\bash" ./project/scripts/winCmdTests'
159155
shell: cmd
160156

157+
- name: win tests
158+
run: './project/scripts/winCmdTests.bat'
159+
shell: cmd
160+
161161
- name: Scala.js Test
162162
run: sbt ";sjsJUnitTests/test ;sjsCompilerTests/test"
163163
shell: cmd

.github/workflows/scaladoc.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
run: ./project/scripts/sbt scaladoc-js/test
4040

4141
- name: Compile and test
42-
run: ./project/scripts/sbt scaladoc/test
42+
run: |
43+
./project/scripts/sbt scaladoc/test
44+
./project/scripts/cmdScaladocTests
4345
4446
- name: Locally publish self
4547
run: ./project/scripts/sbt scaladoc/publishLocal

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@
180180
[submodule "community-build/community-projects/protoquill"]
181181
path = community-build/community-projects/protoquill
182182
url = https://github.com/dotty-staging/protoquill.git
183+
[submodule "community-build/community-projects/Monocle"]
184+
path = community-build/community-projects/Monocle
185+
url = https://github.com/dotty-staging/Monocle.git
183186
[submodule "community-build/community-projects/onnx-scala"]
184187
path = community-build/community-projects/onnx-scala
185188
url = https://github.com/dotty-staging/onnx-scala.git
Submodule Monocle added at 4613aff

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,19 @@ object projects:
278278

279279
lazy val scalatest: SbtCommunityProject = SbtCommunityProject(
280280
project = "scalatest",
281-
sbtTestCommand = "scalacticDotty/clean; scalacticDottyJS/clean; scalacticTestDotty/test; scalatestTestDotty/test; scalacticDottyJS/compile; scalatestDottyJS/compile",
281+
sbtTestCommand =
282+
List(
283+
"scalacticDotty/clean; scalacticDottyJS/clean",
284+
285+
// Some scalatest's tests are flaky (https://github.com/scalatest/scalatest/issues/2049)
286+
// so we disable them, this list is based on the one used in the Scala 2 community build
287+
// (https://github.com/scala/community-build/blob/2.13.x/proj/scalatest.conf).
288+
"""set scalatestTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "GeneratorSpec.scala" || "FrameworkSuite.scala" || "WaitersSpec.scala" || "TestSortingReporterSpec.scala" || "JavaFuturesSpec.scala" || "ParallelTestExecutionSpec.scala" || "TimeLimitsSpec.scala" || "TestThreadsStartingCounterSpec.scala" || "SuiteSortingReporterSpec.scala" || "CommonGeneratorsSpec.scala" || "PropCheckerAssertingSpec.scala" || "ConductorMethodsSuite.scala"""",
289+
"""set scalacticTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "NonEmptyArraySpec.scala"""",
290+
"""set genRegularTests4 / Test / managedSources ~= (_.filterNot(_.getName == "FrameworkSuite.scala").filterNot(_.getName == "GeneratorSpec.scala").filterNot(_.getName == "CommonGeneratorsSpec.scala").filterNot(_.getName == "ParallelTestExecutionSpec.scala").filterNot(_.getName == "DispatchReporterSpec.scala").filterNot(_.getName == "TestThreadsStartingCounterSpec.scala").filterNot(_.getName == "EventuallySpec.scala"))""",
291+
292+
"scalacticTestDotty/test; scalatestTestDotty/test; scalacticDottyJS/compile; scalatestDottyJS/compile"
293+
).mkString("; "),
282294
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal; scalacticDottyJS/publishLocal; scalatestDottyJS/publishLocal",
283295
sbtDocCommand = ";scalacticDotty/doc", // fails with missing type ;scalatestDotty/doc"
284296
// cannot take signature of (test: org.scalatest.concurrent.ConductorFixture#OneArgTest):
@@ -357,8 +369,8 @@ object projects:
357369
lazy val stdLib213 = SbtCommunityProject(
358370
project = "stdLib213",
359371
extraSbtArgs = List("-Dscala.build.compileWithDotty=true"),
360-
sbtTestCommand = """library/compile""",
361-
sbtPublishCommand = """set library/Compile/packageDoc/publishArtifact := false; library/publishLocal""",
372+
sbtTestCommand = """set Global / fatalWarnings := false; library/compile""",
373+
sbtPublishCommand = """set Global / fatalWarnings := false; set library/Compile/packageDoc/publishArtifact := false; library/publishLocal""",
362374
// sbtDocCommand = "library/doc" // Does no compile? No idea :/
363375
)
364376

@@ -648,6 +660,12 @@ object projects:
648660
dependencies = List(scalatest, scalatestplusJunit, scalatestplusScalacheck)
649661
)
650662

663+
lazy val monocle = SbtCommunityProject(
664+
project = "Monocle",
665+
sbtTestCommand = "coreJVM/test; macrosJVM/test; testJVM/test",
666+
dependencies = List(cats, munit, discipline, disciplineMunit)
667+
)
668+
651669
lazy val protoquill = SbtCommunityProject(
652670
project = "protoquill",
653671
sbtTestCommand = "test",
@@ -765,6 +783,7 @@ def allProjects = List(
765783
projects.izumiReflect,
766784
projects.perspective,
767785
projects.akka,
786+
projects.monocle,
768787
projects.protoquill,
769788
projects.onnxScala,
770789
projects.playJson,

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class CommunityBuildTestB extends CommunityBuildTest:
127127
@Test def scalacheckEffect = projects.scalacheckEffect.run()
128128
@Test def scodec = projects.scodec.run()
129129
@Test def scodecBits = projects.scodecBits.run()
130+
@Test def monocle = projects.monocle.run()
130131
@Test def simulacrumScalafixAnnotations = projects.simulacrumScalafixAnnotations.run()
131132
end CommunityBuildTestB
132133

compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import dotty.tools.dotc.core.Names.Name
2121
import dotty.tools.dotc.core.NameKinds.ExpandedName
2222
import dotty.tools.dotc.core.Signature
2323
import dotty.tools.dotc.core.StdNames._
24+
import dotty.tools.dotc.core.NameKinds
2425
import dotty.tools.dotc.core.Symbols._
2526
import dotty.tools.dotc.core.Types
2627
import dotty.tools.dotc.core.Types._
@@ -507,7 +508,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
507508
*
508509
* must-single-thread
509510
*/
510-
private def addForwarder(jclass: asm.ClassVisitor, module: Symbol, m: Symbol): Unit = {
511+
private def addForwarder(jclass: asm.ClassVisitor, module: Symbol, m: Symbol, isSynthetic: Boolean): Unit = {
511512
val moduleName = internalName(module)
512513
val methodInfo = module.thisType.memberInfo(m)
513514
val paramJavaTypes: List[BType] = methodInfo.firstParamTypes map toTypeKind
@@ -518,9 +519,10 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
518519
* and we don't know what classes might be subclassing the companion class. See SI-4827.
519520
*/
520521
// TODO: evaluate the other flags we might be dropping on the floor here.
521-
// TODO: ACC_SYNTHETIC ?
522522
val flags = GenBCodeOps.PublicStatic | (
523523
if (m.is(JavaVarargs)) asm.Opcodes.ACC_VARARGS else 0
524+
) | (
525+
if (isSynthetic) asm.Opcodes.ACC_SYNTHETIC else 0
524526
)
525527

526528
// TODO needed? for(ann <- m.annotations) { ann.symbol.initialize }
@@ -595,7 +597,16 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
595597
report.log(s"No forwarder for non-public member $m")
596598
else {
597599
report.log(s"Adding static forwarder for '$m' from $jclassName to '$moduleClass'")
598-
addForwarder(jclass, moduleClass, m)
600+
// It would be simpler to not generate forwarders for these methods,
601+
// but that wouldn't be binary-compatible with Scala 3.0.0, so instead
602+
// we generate ACC_SYNTHETIC forwarders so Java compilers ignore them.
603+
val isSynthetic =
604+
m0.name.is(NameKinds.SyntheticSetterName) ||
605+
// Only hide bridges generated at Erasure, mixin forwarders are also
606+
// marked as bridge but shouldn't be hidden since they don't have a
607+
// non-bridge overload.
608+
m0.is(Bridge) && m0.initial.validFor.firstPhaseId == erasurePhase.next.id
609+
addForwarder(jclass, moduleClass, m, isSynthetic)
599610
}
600611
}
601612
}

compiler/src/dotty/tools/backend/jvm/BTypesFromSymbols.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import dotty.tools.dotc.core.Phases._
1313
import dotty.tools.dotc.core.Symbols._
1414
import dotty.tools.dotc.core.Phases.Phase
1515
import dotty.tools.dotc.transform.SymUtils._
16-
import dotty.tools.dotc.util.WeakHashSet
1716

1817
/**
1918
* This class mainly contains the method classBTypeFromSymbol, which extracts the necessary
@@ -49,7 +48,6 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
4948
def newAnyRefMap[K <: AnyRef, V](): mutable.AnyRefMap[K, V] = new mutable.AnyRefMap[K, V]()
5049
def newWeakMap[K, V](): mutable.WeakHashMap[K, V] = new mutable.WeakHashMap[K, V]()
5150
def recordCache[T <: Clearable](cache: T): T = cache
52-
def newWeakSet[K >: Null <: AnyRef](): WeakHashSet[K] = new WeakHashSet[K]()
5351
def newMap[K, V](): mutable.HashMap[K, V] = new mutable.HashMap[K, V]()
5452
def newSet[K](): mutable.Set[K] = new mutable.HashSet[K]
5553
}
@@ -60,7 +58,6 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
6058
def newWeakMap[K, V](): collection.mutable.WeakHashMap[K, V]
6159
def newMap[K, V](): collection.mutable.HashMap[K, V]
6260
def newSet[K](): collection.mutable.Set[K]
63-
def newWeakSet[K >: Null <: AnyRef](): dotty.tools.dotc.util.WeakHashSet[K]
6461
def newAnyRefMap[K <: AnyRef, V](): collection.mutable.AnyRefMap[K, V]
6562
}
6663

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import scala.annotation.threadUnsafe
1212
import scala.collection.generic.Clearable
1313
import scala.collection.mutable
1414
import scala.reflect.ClassTag
15-
import dotty.tools.dotc.util.WeakHashSet
1615
import dotty.tools.io.AbstractFile
1716
import scala.tools.asm.AnnotationVisitor
1817
import dotty.tools.dotc.core._

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import Decorators._
1818
import Flags._
1919
import dotty.tools.dotc.ast.Trees._
2020
import Names._
21+
import NameKinds.DefaultGetterName
2122
import Types._
2223
import Symbols._
2324
import Denotations._
@@ -1069,6 +1070,14 @@ class JSCodeGen()(using genCtx: Context) {
10691070
} else if (sym.isJSNativeCtorDefaultParam) {
10701071
// #11592
10711072
None
1073+
} else if (sym.is(Bridge) && sym.name.is(DefaultGetterName) && currentClassSym.isNonNativeJSClass) {
1074+
/* #12572 Bridges for default accessors in non-native JS classes must not be emitted,
1075+
* because they call another default accessor, making their entire body an
1076+
* <undefined-param> that cannot be eliminated.
1077+
* Such methods are never called anyway, because they are filtered out in
1078+
* JSExportsGen.defaultGetterDenot().
1079+
*/
1080+
None
10721081
} else /*if (sym.isClassConstructor && isHijackedBoxedClass(sym.owner)) {
10731082
None
10741083
} else*/ {

compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
774774
else sym.owner
775775

776776
private def defaultGetterDenot(targetSym: Symbol, sym: Symbol, paramIndex: Int): Denotation =
777-
targetSym.info.member(DefaultGetterName(sym.name.asTermName, paramIndex))
777+
targetSym.info.memberBasedOnFlags(DefaultGetterName(sym.name.asTermName, paramIndex), excluded = Bridge)
778778

779779
private def defaultGetterDenot(sym: Symbol, paramIndex: Int): Denotation =
780780
defaultGetterDenot(targetSymForDefaultGetter(sym), sym, paramIndex)

compiler/src/dotty/tools/dotc/CompilationUnit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CompilationUnit protected (val source: SourceFile) {
6666
def isSuspendable: Boolean = true
6767

6868
/** Suspends the compilation unit by thowing a SuspendException
69-
* and recoring the suspended compilation unit
69+
* and recording the suspended compilation unit
7070
*/
7171
def suspend()(using Context): Nothing =
7272
assert(isSuspendable)

compiler/src/dotty/tools/dotc/ast/Positioned.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ abstract class Positioned(implicit @constructorOnly src: SourceFile) extends Src
3636
ids.put(this, ownId)
3737
if ownId == debugId then
3838
println(s"Debug tree (id=$debugId) creation \n$this\n")
39-
Reporter.displayPrompt(Console.in, new PrintWriter(Console.err, true))
39+
Thread.dumpStack()
4040

4141
allocateId()
4242

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,10 +699,12 @@ object Trees {
699699
s"TypeTree${if (hasType) s"[$typeOpt]" else ""}"
700700
}
701701

702-
/** A type tree that defines a new type variable. Its type is always a TypeVar.
703-
* Every TypeVar is created as the type of one TypeVarBinder.
702+
/** A type tree whose type is inferred. These trees appear in two contexts
703+
* - as an argument of a TypeApply. In that case its type is always a TypeVar
704+
* - as a (result-)type of an inferred ValDef or DefDef.
705+
* Every TypeVar is created as the type of one InferredTypeTree.
704706
*/
705-
class TypeVarBinder[-T >: Untyped](implicit @constructorOnly src: SourceFile) extends TypeTree[T]
707+
class InferredTypeTree[-T >: Untyped](implicit @constructorOnly src: SourceFile) extends TypeTree[T]
706708

707709
/** ref.type */
708710
case class SingletonTypeTree[-T >: Untyped] private[ast] (ref: Tree[T])(implicit @constructorOnly src: SourceFile)
@@ -1079,6 +1081,7 @@ object Trees {
10791081
type JavaSeqLiteral = Trees.JavaSeqLiteral[T]
10801082
type Inlined = Trees.Inlined[T]
10811083
type TypeTree = Trees.TypeTree[T]
1084+
type InferredTypeTree = Trees.InferredTypeTree[T]
10821085
type SingletonTypeTree = Trees.SingletonTypeTree[T]
10831086
type RefinedTypeTree = Trees.RefinedTypeTree[T]
10841087
type AppliedTypeTree = Trees.AppliedTypeTree[T]

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -963,8 +963,10 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
963963

964964
/** `tree.isInstanceOf[tp]`, with special treatment of singleton types */
965965
def isInstance(tp: Type)(using Context): Tree = tp.dealias match {
966+
case ConstantType(c) if c.tag == StringTag =>
967+
singleton(tp).equal(tree)
966968
case tp: SingletonType =>
967-
if (tp.widen.derivesFrom(defn.ObjectClass))
969+
if tp.widen.derivesFrom(defn.ObjectClass) then
968970
tree.ensureConforms(defn.ObjectType).select(defn.Object_eq).appliedTo(singleton(tp))
969971
else
970972
singleton(tp).equal(tree)
@@ -979,11 +981,13 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
979981
}
980982

981983
/** cast tree to `tp`, assuming no exception is raised, i.e the operation is pure */
982-
def cast(tp: Type)(using Context): Tree = {
983-
assert(tp.isValueType, i"bad cast: $tree.asInstanceOf[$tp]")
984+
def cast(tp: Type)(using Context): Tree = cast(TypeTree(tp))
985+
986+
/** cast tree to `tp`, assuming no exception is raised, i.e the operation is pure */
987+
def cast(tpt: TypeTree)(using Context): Tree =
988+
assert(tpt.tpe.isValueType, i"bad cast: $tree.asInstanceOf[$tpt]")
984989
tree.select(if (ctx.erasedTypes) defn.Any_asInstanceOf else defn.Any_typeCast)
985-
.appliedToType(tp)
986-
}
990+
.appliedToTypeTree(tpt)
987991

988992
/** cast `tree` to `tp` (or its box/unbox/cast equivalent when after
989993
* erasure and value and non-value types are mixed),

compiler/src/dotty/tools/dotc/config/CliCommand.scala

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import Settings._
77
import core.Contexts._
88
import Properties._
99

10-
import scala.collection.JavaConverters._
10+
import scala.PartialFunction.cond
11+
import scala.collection.JavaConverters._
1112

1213
trait CliCommand:
1314

@@ -107,7 +108,7 @@ trait CliCommand:
107108
// For now, skip the default values that do not make sense for the end user.
108109
// For example 'false' for the version command.
109110
""
110-
s"${formatName(s.name)} ${formatDescription(s.description)}${formatSetting("Default", defaultValue)}${formatSetting("Choices", s.legalChoices)}"
111+
s"${formatName(s.name)} ${formatDescription(shortHelp(s))}${formatSetting("Default", defaultValue)}${formatSetting("Choices", s.legalChoices)}"
111112
ss.map(helpStr).mkString("", "\n", s"\n${formatName("@<file>")} ${formatDescription("A text file containing compiler arguments (options and source files).")}\n")
112113
end availableOptionsMsg
113114

@@ -123,15 +124,30 @@ trait CliCommand:
123124
prefix + "\n" + availableOptionsMsg(cond)
124125

125126
protected def isStandard(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
126-
!isAdvanced(s) && !isPrivate(s)
127+
!isVerbose(s) && !isWarning(s) && !isAdvanced(s) && !isPrivate(s) || s.name == "-Werror" || s.name == "-Wconf"
128+
protected def isVerbose(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
129+
s.name.startsWith("-V") && s.name != "-V"
130+
protected def isWarning(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
131+
s.name.startsWith("-W") && s.name != "-W" || s.name == "-Xlint"
127132
protected def isAdvanced(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
128133
s.name.startsWith("-X") && s.name != "-X"
129134
protected def isPrivate(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
130135
s.name.startsWith("-Y") && s.name != "-Y"
136+
protected def shortHelp(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): String =
137+
s.description.linesIterator.next()
138+
protected def isHelping(s: Setting[?])(using settings: ConcreteSettings)(using SettingsState): Boolean =
139+
cond(s.value) {
140+
case ss: List[?] if s.isMultivalue => ss.contains("help")
141+
case s: String => "help" == s
142+
}
131143

132144
/** Messages explaining usage and options */
133145
protected def usageMessage(using settings: ConcreteSettings)(using SettingsState) =
134146
createUsageMsg("where possible standard", shouldExplain = false, isStandard)
147+
protected def vusageMessage(using settings: ConcreteSettings)(using SettingsState) =
148+
createUsageMsg("Possible verbose", shouldExplain = true, isVerbose)
149+
protected def wusageMessage(using settings: ConcreteSettings)(using SettingsState) =
150+
createUsageMsg("Possible warning", shouldExplain = true, isWarning)
135151
protected def xusageMessage(using settings: ConcreteSettings)(using SettingsState) =
136152
createUsageMsg("Possible advanced", shouldExplain = true, isAdvanced)
137153
protected def yusageMessage(using settings: ConcreteSettings)(using SettingsState) =

compiler/src/dotty/tools/dotc/config/CompilerCommand.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ abstract class CompilerCommand extends CliCommand:
1414

1515
final def helpMsg(using settings: ScalaSettings)(using SettingsState, Context): String =
1616
if (settings.help.value) usageMessage
17+
else if (settings.Vhelp.value) vusageMessage
18+
else if (settings.Whelp.value) wusageMessage
1719
else if (settings.Xhelp.value) xusageMessage
1820
else if (settings.Yhelp.value) yusageMessage
1921
else if (settings.showPlugins.value) ctx.base.pluginDescriptions
2022
else if (settings.XshowPhases.value) phasesMessage
2123
else ""
2224

2325
final def isHelpFlag(using settings: ScalaSettings)(using SettingsState): Boolean =
24-
Set(settings.help, settings.Xhelp, settings.Yhelp, settings.showPlugins, settings.XshowPhases) exists (_.value)
26+
import settings._
27+
val flags = Set(help, Vhelp, Whelp, Xhelp, Yhelp, showPlugins, XshowPhases)
28+
flags.exists(_.value) || allSettings.exists(isHelping)

compiler/src/dotty/tools/dotc/config/Config.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ object Config {
2424
inline val checkConstraintsNonCyclic = false
2525

2626
/** Check that each constraint resulting from a subtype test
27-
* is satisfiable.
27+
* is satisfiable. Also check that a type variable instantiation
28+
* satisfies its constraints.
29+
* Note that this can fail when bad bounds are in scope, like in
30+
* tests/neg/i4721a.scala.
2831
*/
2932
inline val checkConstraintsSatisfiable = false
3033

0 commit comments

Comments
 (0)