Skip to content

unexpect panic: invalid type in os.ReadDir #1114

@luoliwoshang

Description

@luoliwoshang
package main

import (
	"fmt"
	"os"
)

func main() {
	dir, err := os.ReadDir(".")
	if err != nil {
		panic(err)
	}
	for _, file := range dir {
		fmt.Println(file.Name())
	}
}

both in macos & linux

❯ llgo run .
panic: invalid type

llgo version with 93b9b7d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions