goplus / igop

The Go/Go+ Interpreter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unexpected type: *reflect.ValueError: reflect: call of reflect.Value.Call on zero Value

visualfc opened this issue · comments

package main

import (
	"fmt"
	"os"
)

type fileInfoMeta struct {
	os.FileInfo
}

func isSymlink(fi os.FileInfo) bool {
	return fi != nil && fi.Mode()&os.ModeSymlink == os.ModeSymlink
}

func main() {
	fi, err := os.Stat("./main.go")
	if err != nil {
		panic(err)
	}
	fmi := &fileInfoMeta{fi}
	fmt.Println(isSymlink(fmi))
}

igop run main.go

unexpected type: *reflect.ValueError: reflect: call of reflect.Value.Call on zero Value