mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
[python] Add missing tests on resolving forward references from new-style type alias
(cherry picked from commit ab9b688a7463b61ca262ec679781fb314ed74e8e) IJ-CR-175817 GitOrigin-RevId: 1a60bc32362d143ff99b6cf71f7d2d28bef5c02c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b8cf0c6e0f
commit
9d7c0cb8d0
@@ -1414,6 +1414,14 @@ public abstract class PyCommonResolveTest extends PyCommonResolveTestCase {
|
||||
);
|
||||
}
|
||||
|
||||
public void testTopLevelNewStyleTypeAliasForwardReference() {
|
||||
assertResolvesTo(PyClass.class, "MyClass");
|
||||
}
|
||||
|
||||
public void testClassLevelNewStyleTypeAliasForwardReference() {
|
||||
assertResolvesTo(PyClass.class, "MyClass");
|
||||
}
|
||||
|
||||
// PY-19890
|
||||
public void testUnboundVariableOnClassLevelDeclaredBelowAsTarget() {
|
||||
final PyTargetExpression foo = assertResolvesTo(PyTargetExpression.class, "foo");
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class C:
|
||||
type Alias = list[MyClass]
|
||||
# <ref>
|
||||
|
||||
class MyClass:
|
||||
pass
|
||||
@@ -0,0 +1,5 @@
|
||||
type Alias = list[MyClass]
|
||||
# <ref>
|
||||
|
||||
class MyClass:
|
||||
pass
|
||||
Reference in New Issue
Block a user