override doesn't pass default parameter values to super method (PY-1332)

This commit is contained in:
Dmitry Jemerov
2010-07-19 16:27:12 +04:00
parent ef95297e7a
commit c0aca39007
3 changed files with 7 additions and 3 deletions
@@ -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 -1
View File
@@ -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):
+2 -2
View File
@@ -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):