Skip to content

Invalid behavior in some functions with return parameters #898

@zapateo

Description

@zapateo

Source code

package main

import (
        "fmt"
)

func f() (err error) {
        defer func() {
                _ = recover()
        }()
        var i int
        _ = 1 / i
        return nil
}

func main() {
        fmt.Println(f())
}

Scriggo output

runtime error: integer divide by zero

gc output

<nil>

Metadata

Metadata

Assignees

Labels

InvalidBehaviorA valid or not valid code has an invalid behavior at runtimebugBug: something already implemented does not work as it shouldneedsInvestigationNeed to investigate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions