mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 06:53:40 +00:00
compiler: add support for anonymous type asserts
This is used for example by the errors package, which contains:
if x, ok := err.(interface{ As(interface{}) bool }); ok && x.As(target) {
return true
}
The interface here is not a named type.
This commit is contained in:
committed by
Ron Evans
parent
cc4a4c755f
commit
0596b3c003
Vendored
+1
@@ -18,6 +18,7 @@ is Tuple: 0 8 16 24
|
||||
SmallPair.Print: 3 5
|
||||
Stringer.String(): foo
|
||||
Stringer.(*Thing).String(): foo
|
||||
s has String() method: foo
|
||||
nested switch: true
|
||||
non-blocking call on sometimes-blocking interface
|
||||
slept 1ms
|
||||
|
||||
Reference in New Issue
Block a user