File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -186,13 +186,23 @@ abstract private class GeneratedType extends Type, GeneratedElement {
186
186
187
187
string stubPrivateConstructor ( ) {
188
188
if
189
- this instanceof Interface or
190
- this .isStatic ( ) or
191
- this .isAbstract ( ) or
192
- exists ( this .( ValueOrRefType ) .getAConstructor ( ) ) or
193
- not exists ( this .getAnInterestingBaseType ( ) ) or
194
- not exists ( this .getAnInterestingBaseType ( ) .getAConstructor ( ) ) or
195
- this .getAnInterestingBaseType ( ) .getAConstructor ( ) .getNumberOfParameters ( ) = 0
189
+ this instanceof Interface
190
+ or
191
+ this .isStatic ( )
192
+ or
193
+ this .isAbstract ( )
194
+ or
195
+ exists ( this .( ValueOrRefType ) .getAConstructor ( ) )
196
+ or
197
+ not exists ( this .getAnInterestingBaseType ( ) )
198
+ or
199
+ not exists ( this .getAnInterestingBaseType ( ) .getAConstructor ( ) )
200
+ or
201
+ exists ( Constructor bc |
202
+ bc = this .getAnInterestingBaseType ( ) .getAConstructor ( ) and
203
+ bc .getNumberOfParameters ( ) = 0 and
204
+ not bc .isStatic ( )
205
+ )
196
206
then result = ""
197
207
else
198
208
result =
@@ -287,7 +297,9 @@ private class ExtraGeneratedConstructor extends GeneratedMember, Constructor {
287
297
(
288
298
// if the base class has no 0 parameter constructor
289
299
not exists ( Constructor c |
290
- c = this .getDeclaringType ( ) .getBaseClass ( ) .getAMember ( ) and c .getNumberOfParameters ( ) = 0
300
+ c = this .getDeclaringType ( ) .getBaseClass ( ) .getAMember ( ) and
301
+ c .getNumberOfParameters ( ) = 0 and
302
+ not c .isStatic ( )
291
303
)
292
304
or
293
305
// if this constructor might be called from a (generic) derived class
You can’t perform that action at this time.
0 commit comments