mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
override doesn't pass default parameter values to super method (PY-1332)
This commit is contained in:
@@ -154,6 +154,10 @@ public class PyOverrideImplementUtil {
|
||||
String[] paramTexts = ContainerUtil.map(baseParams, new Function<PyParameter, String>() {
|
||||
@Override
|
||||
public String fun(PyParameter pyParameter) {
|
||||
final PyNamedParameter pyNamedParameter = pyParameter.getAsNamed();
|
||||
if (pyNamedParameter != null) {
|
||||
return pyNamedParameter.getRepr(false);
|
||||
}
|
||||
return pyParameter.getText();
|
||||
}
|
||||
}, ArrayUtil.EMPTY_STRING_ARRAY);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class A:
|
||||
def doStuff(self, foo): pass
|
||||
def doStuff(self, foo=True): pass
|
||||
|
||||
class B(A):
|
||||
def otherMethod(self, foo, bar):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class A:
|
||||
def doStuff(self, foo): pass
|
||||
def doStuff(self, foo=True): pass
|
||||
|
||||
class B(A):
|
||||
def doStuff(self, foo):
|
||||
def doStuff(self, foo=True):
|
||||
<selection>A.doStuff(self, foo)</selection>
|
||||
|
||||
def otherMethod(self, foo, bar):
|
||||
|
||||
Reference in New Issue
Block a user