mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-2914: RE at com.jetbrains.python.psi.impl.PyBaseElementImpl.childToPsiNotNull
This commit is contained in:
+2
-2
@@ -81,8 +81,8 @@ public class PyDictConstructorToLiteralFormIntention extends BaseIntentionAction
|
||||
}
|
||||
|
||||
}
|
||||
PyExpressionStatement dict = elementGenerator.createFromText(LanguageLevel.forElement(expression), PyExpressionStatement.class,
|
||||
"{" + stringBuilder.toString() + "}");
|
||||
PyDictLiteralExpression dict = (PyDictLiteralExpression)elementGenerator.createFromText(LanguageLevel.forElement(expression), PyExpressionStatement.class,
|
||||
"{" + stringBuilder.toString() + "}").getExpression();
|
||||
expression.replace(dict);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -126,8 +126,8 @@ public class PyDictLiteralFormToConstructorIntention extends BaseIntentionAction
|
||||
}
|
||||
}
|
||||
stringBuilder.append(")");
|
||||
PyStatement callExpression = elementGenerator.createFromText(LanguageLevel.forElement(dictExpression),
|
||||
PyStatement.class, stringBuilder.toString());
|
||||
PyCallExpression callExpression = (PyCallExpression)elementGenerator.createFromText(LanguageLevel.forElement(dictExpression),
|
||||
PyExpressionStatement.class, stringBuilder.toString()).getExpression();
|
||||
dictExpression.replace(callExpression);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user