Skip to content

Type assertion to empty interface type crashes with type assert failed #2759

Description

@eliasnaur

Reproducer program,

package main

import "fmt"

type Empty interface {
}

func main() {
	var intf interface{} = new(int)
	typed := intf.(Empty)
	fmt.Println(typed)
}

crashes on my stm32f469disco target with:

panic: runtime error: type assert failed

Issue found while running (more) Gio code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions