This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Max Schaefer
committed
Jun 19, 2020
1 parent
2df8c27
commit c31a7fc
Showing
10 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
ql/test/library-tests/semmle/go/Types/Field_getPackage.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName2.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
ql/test/library-tests/semmle/go/Types/Field_hasQualifiedName3.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
ql/test/library-tests/semmle/go/Types/SignatureType_getNumParameter.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
ql/test/library-tests/semmle/go/Types/SignatureType_getNumResult.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,12 @@ package main | |
type s struct { | ||
*s | ||
} | ||
|
||
type t struct { | ||
*u | ||
f int | ||
} | ||
|
||
type u struct { | ||
t | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
type a struct { | ||
b // we get f from here | ||
c // but not from here because it is nested more deeply | ||
} | ||
|
||
type b struct { | ||
f int | ||
} | ||
|
||
type c struct { | ||
d | ||
} | ||
|
||
type d struct { | ||
f string | ||
} | ||
|
||
func test2() int { | ||
x := a{b{0}, c{d{"hi"}}} | ||
fmt.Printf("%v", x.f) // prints `0`, not `"hi"` | ||
} |