diff --git a/python/src/com/jetbrains/python/parsing/ExpressionParsing.java b/python/src/com/jetbrains/python/parsing/ExpressionParsing.java index bb4d30251590..a10a06f4451c 100644 --- a/python/src/com/jetbrains/python/parsing/ExpressionParsing.java +++ b/python/src/com/jetbrains/python/parsing/ExpressionParsing.java @@ -209,7 +209,7 @@ public class ExpressionParsing extends Parsing { public boolean parseMemberExpression(PsiBuilder builder, boolean isTargetExpression) { PsiBuilder.Marker expr = builder.mark(); - if (!parsePrimaryExpression(builder, false)) { + if (!parsePrimaryExpression(builder, isTargetExpression)) { expr.drop(); return false; } diff --git a/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java b/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java index 09086eaf0993..63c194c6c819 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/PyClassImpl.java @@ -92,7 +92,7 @@ public class PyClassImpl extends PyPresentableElementImpl implements PyClass { final PyAssignmentStatement assignmentStatement = (PyAssignmentStatement)psiElement; final PyExpression[] targets = assignmentStatement.getTargets(); for (PyExpression target : targets) { - if (target instanceof PyReferenceExpression) { + if (target instanceof PyTargetExpression) { if (!processor.execute(target, substitutor)) return false; } } diff --git a/python/testData/psi/ConditionalExpression.txt b/python/testData/psi/ConditionalExpression.txt index aff4e9280413..9866b4b7db24 100644 --- a/python/testData/psi/ConditionalExpression.txt +++ b/python/testData/psi/ConditionalExpression.txt @@ -1,6 +1,6 @@ PyFile:ConditionalExpression.py PyAssignmentStatement - PyReferenceExpression: x + PyTargetExpression PsiElement(Py:IDENTIFIER)('x') PsiWhiteSpace(' ') PsiElement(Py:EQ)('=') diff --git a/python/testData/psi/YieldInAssignment.txt b/python/testData/psi/YieldInAssignment.txt index d62e57d8642e..e769764fc443 100644 --- a/python/testData/psi/YieldInAssignment.txt +++ b/python/testData/psi/YieldInAssignment.txt @@ -10,7 +10,7 @@ PyFile:YieldInAssignment.py PsiWhiteSpace('\n ') PyStatementList PyAssignmentStatement - PyReferenceExpression: x + PyTargetExpression PsiElement(Py:IDENTIFIER)('x') PsiWhiteSpace(' ') PsiElement(Py:EQ)('=') diff --git a/python/testData/psi/YieldInAugAssignment.txt b/python/testData/psi/YieldInAugAssignment.txt index 0e9675f13b4c..f2c57dc56080 100644 --- a/python/testData/psi/YieldInAugAssignment.txt +++ b/python/testData/psi/YieldInAugAssignment.txt @@ -10,7 +10,7 @@ PyFile:YieldInAugAssignment.py PsiWhiteSpace('\n ') PyStatementList PyAssignmentStatement - PyReferenceExpression: x + PyTargetExpression PsiElement(Py:IDENTIFIER)('x') PsiWhiteSpace(' ') PsiElement(Py:EQ)('=') diff --git a/python/testData/psi/YieldInParentheses.txt b/python/testData/psi/YieldInParentheses.txt index d023400e6c37..4e7bb9489d6f 100644 --- a/python/testData/psi/YieldInParentheses.txt +++ b/python/testData/psi/YieldInParentheses.txt @@ -10,7 +10,7 @@ PyFile:YieldInParentheses.py PsiWhiteSpace('\n ') PyStatementList PyAssignmentStatement - PyReferenceExpression: x + PyTargetExpression PsiElement(Py:IDENTIFIER)('x') PsiWhiteSpace(' ') PsiElement(Py:EQ)('=') diff --git a/python/testSrc/com/jetbrains/python/PyResolveTest.java b/python/testSrc/com/jetbrains/python/PyResolveTest.java index 01dab1744616..79af5b6ddefd 100644 --- a/python/testSrc/com/jetbrains/python/PyResolveTest.java +++ b/python/testSrc/com/jetbrains/python/PyResolveTest.java @@ -10,7 +10,7 @@ import com.intellij.psi.PsiReference; import com.intellij.testFramework.ResolveTestCase; import com.jetbrains.python.psi.PyClass; import com.jetbrains.python.psi.PyFunction; -import com.jetbrains.python.psi.PyReferenceExpression; +import com.jetbrains.python.psi.PyTargetExpression; public class PyResolveTest extends ResolveTestCase { private PsiElement resolve() throws Exception { @@ -30,7 +30,7 @@ public class PyResolveTest extends ResolveTestCase { public void testVar() throws Exception { PsiElement targetElement = resolve(); - assertTrue(targetElement instanceof PyReferenceExpression); + assertTrue(targetElement instanceof PyTargetExpression); } public void testQualifiedFunc() throws Exception { @@ -40,7 +40,7 @@ public class PyResolveTest extends ResolveTestCase { public void testQualifiedVar() throws Exception { PsiElement targetElement = resolve(); - assertTrue(targetElement instanceof PyReferenceExpression); + assertTrue(targetElement instanceof PyTargetExpression); } @Override