mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
Checking for methodset existance
This commit is contained in:
Vendored
+11
@@ -109,3 +109,14 @@ func sliceString(s string, start, end int) string {
|
||||
func sliceSlice(s []int, start, end int) []int {
|
||||
return s[start:end]
|
||||
}
|
||||
|
||||
type outside struct{}
|
||||
|
||||
func init() {
|
||||
_, _ = any(0).(interface{ DoesNotExist() })
|
||||
_, _ = any("").(interface{ DoesNotExist() })
|
||||
_, _ = any(outside{}).(interface{ DoesNotExist() })
|
||||
|
||||
type inside struct{}
|
||||
_, _ = any(inside{}).(interface{ DoesNotExist() })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user