@@ -175,15 +175,9 @@ class PackageObjectInternal extends ModuleObjectInternal, TPackageObject {
175
175
pragma [ noinline] override predicate attribute ( string name , ObjectInternal value , CfgOrigin origin ) {
176
176
this .getInitModule ( ) .attribute ( name , value , origin )
177
177
or
178
- exists ( Module init |
179
- init = this .getSourceModule ( ) and
180
- (
181
- /* There is no variable shadowing the name of the child module */
182
- not exists ( EssaVariable var | var .getAUse ( ) = init .getANormalExit ( ) and var .getSourceVariable ( ) .getName ( ) = name )
183
- or
184
- /* The variable shadowing the name of the child module is undefined at exit */
185
- ModuleAttributes:: pointsToAtExit ( init , name , ObjectInternal:: undefined ( ) , _)
186
- ) and
178
+ exists ( ModuleObjectInternal init |
179
+ init = this .getInitModule ( ) and
180
+ InterModulePointsTo:: moduleExportsBoolean ( init , name ) = false and
187
181
not name = "__init__" and
188
182
value = this .submodule ( name ) and
189
183
origin = CfgOrigin:: fromObject ( value )
@@ -249,6 +243,7 @@ class PythonModuleObjectInternal extends ModuleObjectInternal, TPythonModule {
249
243
}
250
244
251
245
pragma [ noinline] override predicate attribute ( string name , ObjectInternal value , CfgOrigin origin ) {
246
+ value != ObjectInternal:: undefined ( ) and
252
247
ModuleAttributes:: pointsToAtExit ( this .getSourceModule ( ) , name , value , origin )
253
248
}
254
249
0 commit comments