diff options
author | Ayke van Laethem <[email protected]> | 2019-12-26 01:32:58 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-12-26 09:20:22 +0100 |
commit | 14474e7099a745300f1e5356adec4121e5a95b7e (patch) | |
tree | e360fb0453abf550b310439c6344d123438cf520 /testdata/interface.go | |
parent | 3656ac2fc9c2b9006411fb66c60e0947be9ffcbd (diff) | |
download | tinygo-14474e7099a745300f1e5356adec4121e5a95b7e.tar.gz tinygo-14474e7099a745300f1e5356adec4121e5a95b7e.zip |
compiler: fix assertion on empty interface
This fixes issue #453.
Diffstat (limited to 'testdata/interface.go')
-rw-r--r-- | testdata/interface.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testdata/interface.go b/testdata/interface.go index fa0a99c69..c23af4fd1 100644 --- a/testdata/interface.go +++ b/testdata/interface.go @@ -33,6 +33,10 @@ func main() { // https://github.com/tinygo-org/tinygo/issues/309 itf = linkedList{} + // Test bugfix for assertion on named empty interface: + // https://github.com/tinygo-org/tinygo/issues/453 + _, _ = itf.(Empty) + var n int var f float32 var interfaceEqualTests = []struct { @@ -251,3 +255,5 @@ func (s SleepBlocker) Sleep() { type StaticBlocker interface { Sleep() } + +type Empty interface{} |