mirror of
https://github.com/github/codeql.git
synced 2026-04-20 14:34:04 +02:00
Test non-promoted fields and methods
This commit is contained in:
@@ -38,3 +38,8 @@ func TestFieldsSEmbedSEmbedS1(t test.SEmbedSEmbedS1) {
|
||||
a := t.SourceField
|
||||
t.SinkField = a // $ S1[t] ql_S1 SEmbedS1[t]
|
||||
}
|
||||
|
||||
func TestFieldsSEmbedS1AndSEmbedS1(t test.SEmbedS1AndSEmbedS1) {
|
||||
a := t.SourceField
|
||||
t.SinkField = a // $ S1[t] ql_S1
|
||||
}
|
||||
|
||||
@@ -99,3 +99,9 @@ func TestMethodsSEmbedSEmbedS1(t test.SEmbedSEmbedS1) {
|
||||
y := t.Step(x)
|
||||
t.Sink(y) // $ I1[t] S1[t] SEmbedS1[t] ql_S1
|
||||
}
|
||||
|
||||
func TestMethodsSEmbedS1AndSEmbedS1(t test.SEmbedS1AndSEmbedS1) {
|
||||
x := t.Source()
|
||||
y := t.Step(x)
|
||||
t.Sink(y) // $ I1[t] S1[t] ql_S1
|
||||
}
|
||||
|
||||
@@ -153,3 +153,9 @@ type SEmbedSEmbedI1 struct {
|
||||
|
||||
// A struct type embedding SEmbedS1
|
||||
type SEmbedSEmbedS1 struct{ SEmbedS1 }
|
||||
|
||||
// A struct type embedding S1 and SEmbedS1
|
||||
type SEmbedS1AndSEmbedS1 struct {
|
||||
S1
|
||||
SEmbedS1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user