Skip to content

Commit

Permalink
add test for #111: type assertion from interface containing typed nil…
Browse files Browse the repository at this point in the history
… to concrete type
  • Loading branch information
cosmos72 committed Feb 26, 2022
1 parent f113800 commit 23a0d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ var testcases = []TestCase{
TestCase{F, "typeassert_10", `type U struct { Val int }; func (u U) String() string { return "U" }; nil`, nil, nil},
TestCase{F, "typeassert_11", `stringer.(U)`, nil, []interface{}{struct{ Val int }{0}, false}},
TestCase{F, "typeassert_12", `xi = []int(nil); ys:= xi.([]int); ys`, ([]int)(nil), nil},
// FIXME: TestCase{F, "typeassert_13", `xi.([]int)`, nil, []interface{}{([]int)(nil), true}},
TestCase{F, "typeassert_13", `xi.([]int)`, nil, []interface{}{([]int)(nil), true}},

TestCase{A, "quote_1", `~quote{7}`, &ast.BasicLit{Kind: token.INT, Value: "7"}, nil},
TestCase{A, "quote_2", `~quote{x}`, &ast.Ident{Name: "x"}, nil},
Expand Down

0 comments on commit 23a0d19

Please sign in to comment.