File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,13 +156,22 @@ class TopLevel extends TTopLevel, AstNode {
156156 }
157157
158158 QLDoc getQLDocFor ( ModuleMember m ) {
159- exists ( int i | result = this .getMember ( i ) and m = this .getMember ( i + 1 ) )
159+ exists ( int i | result = this .getMember ( i ) and m = this .getMember ( i + 1 ) ) and
160+ (
161+ m instanceof ClasslessPredicate
162+ or
163+ m instanceof Class
164+ or
165+ m instanceof Module
166+ )
160167 }
161168
162169 override string getAPrimaryQlClass ( ) { result = "TopLevel" }
163170
164171 override QLDoc getQLDoc ( ) {
165172 result = this .getMember ( 0 ) and
173+ // it's not the QLDoc for a module member
174+ not this .getQLDocFor ( _) = result and
166175 result .getLocation ( ) .getStartLine ( ) = 1 // this might not hold if there is a block comment above, and that's the point.
167176 }
168177}
You can’t perform that action at this time.
0 commit comments