File tree 2 files changed +14
-4
lines changed
compiler/src/dotty/tools/dotc/typer 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -311,11 +311,13 @@ class CommunityBuildTest {
311
311
| """ .stripMargin)
312
312
}
313
313
}
314
-
314
+ /*
315
315
@Test def intent = projects.intent.run()
316
316
@Test def algebra = projects.algebra.run()
317
+ */
317
318
@ Test def scalacheck = projects.scalacheck.run()
318
319
@ Test def scalatest = projects.scalatest.run()
320
+ /*
319
321
@Test def scalatestplusScalacheck = projects.scalatestplusScalacheck.run()
320
322
@Test def scalaXml = projects.scalaXml.run()
321
323
@Test def scopt = projects.scopt.run()
@@ -334,7 +336,7 @@ class CommunityBuildTest {
334
336
@Test def shapeless = projects.shapeless.run()
335
337
@Test def xmlInterpolator = projects.xmlInterpolator.run()
336
338
@Test def semanticdb = projects.semanticdb.run()
337
- @ Test def effpi = projects.effpi.run()
339
+ @Test def effpi = projects.effpi.run()*/
338
340
}
339
341
340
342
class TestCategory
Original file line number Diff line number Diff line change @@ -100,7 +100,11 @@ object Inferencing {
100
100
101
101
private var toMaximize : Boolean = false
102
102
103
- def apply (x : Boolean , tp : Type ): Boolean = tp.dealias match {
103
+ private var rootType : Type = null
104
+
105
+ def apply (x : Boolean , tp : Type ): Boolean =
106
+ if rootType == null then rootType = tp
107
+ tp.dealias match {
104
108
case _ : WildcardType | _ : ProtoType =>
105
109
false
106
110
case tvar : TypeVar if ! tvar.isInstantiated =>
@@ -112,9 +116,13 @@ object Inferencing {
112
116
! force.allowBottom &&
113
117
defn.isBottomType(ctx.typeComparer.approximation(tvar.origin, fromBelow = true ))
114
118
def preferMin = (force.minimizeAll || variance >= 0 ) && ! avoidBottom
119
+ def oldPreferMin = force.minimizeAll || variance >= 0 && ! avoidBottom
115
120
if (direction != 0 ) instantiate(tvar, direction < 0 )
116
121
else if (preferMin) instantiate(tvar, fromBelow = true )
117
- else toMaximize = true
122
+ else
123
+ if oldPreferMin then
124
+ println(i " DIFFERENCE: maximizing $tvar with bounds ${ctx.typeComparer.bounds(tvar.origin)} in $rootType" )
125
+ toMaximize = true
118
126
foldOver(x, tvar)
119
127
}
120
128
case tp =>
You can’t perform that action at this time.
0 commit comments