PY-81030, PY-81269, PY-80690 Do not store millions of PyNoneLiteralExpression instances in the cache

IJ-CR-164285

GitOrigin-RevId: 4dd0833b7d71228dc8fd092adf41e7de23e1d315
This commit is contained in:
Andrey Vokin
2025-05-28 14:14:14 +02:00
committed by intellij-monorepo-bot
parent f9e8f87488
commit 33f63527f9

View File

@@ -171,6 +171,10 @@ public final class TypeEvalContext {
}
public @Nullable PyType getType(final @NotNull PyTypedElement element) {
if (element instanceof PyNoneLiteralExpression) {
return element.getType(this, Key.INSTANCE);
}
return RecursionManager.doPreventingRecursion(
Pair.create(element, this),
false,