File tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/typer 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 {
2216
2216
* have added constraints to type parameters which are no longer
2217
2217
* implied after harmonization. No essential constraints are lost by this because
2218
2218
* 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.
2220
2226
*/
2221
2227
def harmonic [T ](harmonize : List [T ] => List [T ], pt : Type )(op : => List [T ])(using Context ): List [T ] =
2222
2228
if (! isFullyDefined(pt, ForceDegree .none)) {
You can’t perform that action at this time.
0 commit comments