compiler: implement type assert without comma-ok

This commit is contained in:
Ayke van Laethem
2018-09-11 19:51:31 +02:00
parent 31e0662856
commit 8675025fc8
3 changed files with 20 additions and 7 deletions
+2
View File
@@ -69,6 +69,8 @@ func main() {
printItf(Number(3))
s := Stringer(thing)
println("Stringer.String():", s.String())
var itf interface{} = s
println("Stringer.(*Thing).String():", itf.(Stringer).String())
// unusual calls
runFunc(hello, 5) // must be indirect to avoid obvious inlining