File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2216,7 +2216,13 @@ trait Applications extends Compatibility {
22162216 * have added constraints to type parameters which are no longer
22172217 * implied after harmonization. No essential constraints are lost by this because
22182218 * the result of harmonization will be compared again with the expected type.
2219- * Test cases where this matters are in pos/harmomize.scala.
2219+ * Test cases where this matters are in neg/harmomize.scala and run/weak-conformance.scala.
2220+ *
2221+ * Note: this assumes that the internal typing of the arguments using `op` does
2222+ * not leave any constraints, so the only info that is reset is the relationship
2223+ * between the argument's types and the expected type. I am not sure this will
2224+ * always be the case. If that property does not hold, we risk forgetting constraints
2225+ * which could lead to unsoundness.
22202226 */
22212227 def harmonic [T ](harmonize : List [T ] => List [T ], pt : Type )(op : => List [T ])(using Context ): List [T ] =
22222228 if (! isFullyDefined(pt, ForceDegree .none)) {
You can’t perform that action at this time.
0 commit comments