Skip to content

tinygo does not treat 'any' as 'equivalent to interface{} in every way' with go1.18? #2726

@dkegel-fastly

Description

@dkegel-fastly

The wasi crash in #2725
can be reproduced on that branch with go1.18 using the command

WASMTIME_BACKTRACE_DETAILS=1 build/tinygo test -target wasi -v -run TestFstat  os

(It also reproduces without wasi, but wasi lets you get a nice backtrace.)

It can be prevented by live-reverting the following change in go1.18:

--- /Users/dkegel/src/go/src/io/fs/fs.go	2022-01-15 18:11:12.000000000 -0800
+++ /usr/local/go/src/io/fs/fs.go	2022-03-15 07:08:05.000000000 -0700
@@ -153,4 +153,4 @@
 	Mode() FileMode     // file mode bits
 	ModTime() time.Time // modification time
 	IsDir() bool        // abbreviation for Mode().IsDir()
-	Sys() interface{}   // underlying data source (can return nil)
+	Sys() any           // underlying data source (can return nil)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions