Repeatedly infer maps until nothing changes
When an inferred map is nested in another inferred map, the inner one will usually not actually be made into a map because its original class will be unified with another class in the process of making the outer map. On the other hand, this unification can lead to more inner classes becoming viable as maps.
This commit is contained in:
Родитель
8a0df28496
Коммит
7247919875
|
@ -243,7 +243,13 @@ export class Run {
|
|||
}
|
||||
graph = flattenStrings(graph, stringTypeMapping, debugPrintReconstitution);
|
||||
if (this._options.inferMaps) {
|
||||
graph = inferMaps(graph, stringTypeMapping, true, debugPrintReconstitution);
|
||||
for (;;) {
|
||||
const newGraph = inferMaps(graph, stringTypeMapping, true, debugPrintReconstitution);
|
||||
if (newGraph === graph) {
|
||||
break;
|
||||
}
|
||||
graph = newGraph;
|
||||
}
|
||||
}
|
||||
graph = noneToAny(graph, stringTypeMapping, debugPrintReconstitution);
|
||||
if (!targetLanguage.supportsOptionalClassProperties) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче