Skip to content

go/types, govet: panics when encountering (string constant) + string(rune constant) #4982

Closed
@alberts

Description

@alberts
What steps will reproduce the problem?

Seems to depend on a lot of packages in our internal code unfortunately.

Here's the panic for now. I can try to narrow it down somehow if this isn't enough of a
clue.

What do you see instead?

INTERNAL PANIC: interface conversion: interface is int64, not string
panic: interface conversion: interface is int64, not string [recovered]
    panic: interface conversion: interface is int64, not string

goroutine 1 [running]:
go/types.func·003()
    /build/go/go/src/pkg/go/types/check.go:445 +0x175
go/types.binaryOpConst(0x563bf0, 0xc200150f30, 0x563830, 0x3039, 0xc, ...)
    /build/go/go/src/pkg/go/types/const.go:580 +0x10b9
go/types.(*checker).binary(0xc2000b43c0, 0xc2001ecdc0, 0xc2000b7e00, 0xc2000cf4a0,
0xc2000b7c40, ...)
    /build/go/go/src/pkg/go/types/expr.go:601 +0x4e2
go/types.(*checker).rawExpr(0xc2000b43c0, 0xc2001ecdc0, 0xc2000b7d80, 0xc2000c2990,
0xc20009b5d0, ...)
    /build/go/go/src/pkg/go/types/expr.go:1394 +0x2972
go/types.(*checker).expr(0xc2000b43c0, 0xc2001ecdc0, 0xc2000b7d80, 0xc2000c2990,
0xc20009b5d0, ...)
    /build/go/go/src/pkg/go/types/expr.go:1476 +0x88
go/types.(*checker).argument(0xc2000b43c0, 0xc2000ff6c0, 0x0, 0xc2000b7d80,
0xc2000c2990, ...)
    /build/go/go/src/pkg/go/types/expr.go:729 +0x10a
go/types.(*checker).rawExpr(0xc2000b43c0, 0xc2001ecdc0, 0xc2000b7c40, 0xc2000cd9c0, 0x0,
...)
    /build/go/go/src/pkg/go/types/expr.go:1331 +0x3403
go/types.(*checker).expr(0xc2000b43c0, 0xc2001ecdc0, 0xc2000b7c40, 0xc2000cd9c0, 0x0,
...)
    /build/go/go/src/pkg/go/types/expr.go:1476 +0x88
go/types.(*checker).assign1to1(0xc2000b43c0, 0xc2000b78c0, 0xc2000cf400, 0xc2000b7c40,
0xc2000cd9c0, ...)
    /build/go/go/src/pkg/go/types/stmt.go:103 +0x670
go/types.(*checker).assignNtoM(0xc2000b43c0, 0xc200085e00, 0x1, 0x1, 0xc200085e40, ...)
    /build/go/go/src/pkg/go/types/stmt.go:196 +0x100
go/types.(*checker).stmt(0xc2000b43c0, 0xc2000b7f40, 0xc2000cda00)
    /build/go/go/src/pkg/go/types/stmt.go:394 +0x396a
go/types.(*checker).stmtList(0xc2000b43c0, 0xc2000b8780, 0x5, 0x8)
    /build/go/go/src/pkg/go/types/stmt.go:266 +0x68
go/types.check(0xc2000d37c0, 0xc2000b76c0, 0xc200000838, 0x1, 0x1, ...)
    /build/go/go/src/pkg/go/types/check.go:483 +0x437
go/types.(*Context).Check(0xc2000d37c0, 0xc2000b76c0, 0xc200000838, 0x1, 0x1, ...)
    /build/go/go/src/pkg/go/types/api.go:98 +0x52
main.doPackage(0xc200065010, 0x1, 0x1)
    /home/alberts/go/src/cmd/vet/main.go:221 +0x955
main.main()
    /home/alberts/go/src/cmd/vet/main.go:136 +0x651

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which version are you using?  (run 'go version')

go version devel +67fc3cb0d3aa Mon Mar 04 14:54:36 2013 +1100 linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions