We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Entity.getDeclaration
1 parent c7f2e99 commit fe24710Copy full SHA for fe24710
go/ql/lib/semmle/go/Scopes.qll
@@ -119,7 +119,13 @@ class Entity extends @object {
119
*/
120
Scope getScope() { objectscopes(this, result) }
121
122
- /** Gets the declaring identifier for this entity. */
+ /**
123
+ * Gets the declaring identifier for this entity, if any.
124
+ *
125
+ * Note that type switch statements which define a new variable in the guard
126
+ * actually have a new variable (of the right type) implicitly declared at
127
+ * the beginning of each case clause, and these do not have a declaration.
128
+ */
129
Ident getDeclaration() { result.declares(this) }
130
131
/** Gets a reference to this entity. */
0 commit comments