Test non-promoted fields and methods

This commit is contained in:
Owen Mansel-Chan
2024-11-11 23:46:10 +00:00
parent f61251cc24
commit 4a1fce9168
3 changed files with 17 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}