Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 87c1bca

Browse files
authored
Merge pull request #143 from github/max-schaefer-patch-1
Clarify which types have a qualified name.
2 parents d41e418 + 24d8c7e commit 87c1bca

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ql/src/semmle/go/Types.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ class Type extends @type {
2525

2626
/**
2727
* Gets the qualified name of this type, if any.
28+
*
29+
* Only (defined) named types like `io.Writer` have a qualified name. Basic types like `int`,
30+
* pointer types like `*io.Writer`, and other composite types do not have a qualified name.
2831
*/
2932
string getQualifiedName() { result = getEntity().getQualifiedName() }
3033

3134
/**
3235
* Holds if this type is declared in a package with path `pkg` and has name `name`.
36+
*
37+
* Only (defined) named types like `io.Writer` have a qualified name. Basic types like `int`,
38+
* pointer types like `*io.Writer`, and other composite types do not have a qualified name.
3339
*/
3440
predicate hasQualifiedName(string pkg, string name) { getEntity().hasQualifiedName(pkg, name) }
3541

0 commit comments

Comments
 (0)