[python] Store default types of Type Parameters as Ref to avoid problems with an explicit Any

GitOrigin-RevId: 880e883d196dc48d9cf6400580e9b4981448c507
This commit is contained in:
Daniil Kalinin
2024-12-03 12:56:57 +01:00
committed by intellij-monorepo-bot
parent b77ef70c15
commit f05119cead
8 changed files with 46 additions and 31 deletions

View File

@@ -1,6 +1,7 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.jetbrains.python.psi.types;
import com.intellij.openapi.util.Ref;
import com.jetbrains.python.psi.PyQualifiedNameOwner;
import com.jetbrains.python.psi.PyTargetExpression;
import org.jetbrains.annotations.NotNull;
@@ -80,7 +81,7 @@ public interface PyTypeParameterType extends PyType {
*/
@Nullable PyQualifiedNameOwner getScopeOwner();
default @Nullable PyType getDefaultType() {
default @Nullable Ref<? extends PyType> getDefaultType() {
return null;
}
}