| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,11 +15,19 @@ class CfgScope extends Element, @top_level_exprorstmt_parent { | |||
| 15 | 15 | CfgScope() { | |
| 16 | 16 | this.getFile().fromSource() and | |
| 17 | 17 | ( | |
| 18 | - this instanceof Callable | ||
| 18 | + this = | ||
| 19 | + any(Callable c | | ||
| 20 | + c.(Constructor).hasInitializer() | ||
| 21 | + or | ||
| 22 | + InitializerSplitting::constructorInitializes(c, _) | ||
| 23 | + or | ||
| 24 | + c.hasBody() | ||
| 25 | + ) | ||
| 19 | 26 | or | |
| 20 | 27 | // For now, static initializer values have their own scope. Eventually, they | |
| 21 | 28 | // should be treated like instance initializers. | |
| 22 | - this.(Assignable).(Modifiable).isStatic() | ||
| 29 | + this.(Assignable).(Modifiable).isStatic() and | ||
| 30 | + expr_parent_top_level_adjusted2(_, _, this) | ||
| 23 | 31 | ) | |
| 24 | 32 | } | |
| 25 | 33 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments