0xfaded / eval

BSD 3-Clause "New" or "Revised" License
34 stars 7 forks source link

single type cast expression fails #40

Closed rocky closed 10 years ago

rocky commented 10 years ago
go> int(3)
panic: interface conversion: *ast.Ident is not eval.Expr: missing method Const

goroutine 1 [running]:
runtime.panic(0x8188280, 0x1861b5c0)
    /usr/local/go/src/pkg/runtime/panic.c:266 +0xac
itab(0x818f480, 0x8191be0, 0x0)
    /usr/local/go/src/pkg/runtime/iface.c:116 +0xba
runtime.ifaceI2I(0x818f480, 0xb771fa80, 0x18646080, 0xb7634cd8)
    /usr/local/go/src/pkg/runtime/iface.c:437 +0x99
runtime.assertI2I(0x818f480, 0xb771fa80, 0x18646080, 0x0, 0x18646080)
    /usr/local/go/src/pkg/runtime/iface.c:444 +0x43
github.com/0xfaded/eval.evalCallExpr(0x186001d8, 0x1861c210, 0x1861c0f0, 0x1861c210, 0x8050f01, ...)
    /home/rocky/go/src/github.com/0xfaded/eval/callexpr.go:12 +0x41
github.com/0xfaded/eval.EvalExpr(0x186001d8, 0xb771fbe0, 0x1861c210, 0x1861c0f0, 0xb771fbe0, ...)
    /home/rocky/go/src/github.com/0xfaded/eval/expr.go:56 +0x281
0xfaded commented 10 years ago

Strange, there are tests for this case. Perhaps fixed in call check integration branch

Carl 2014/01/17 21:28 "R. Bernstein" notifications@github.com:


panic: interface conversion: *ast.Ident is not eval.Expr: missing method
Const

goroutine 1 [running]:
runtime.panic(0x8188280, 0x1861b5c0)
/usr/local/go/src/pkg/runtime/panic.c:266 +0xac
itab(0x818f480, 0x8191be0, 0x0)
/usr/local/go/src/pkg/runtime/iface.c:116 +0xba
runtime.ifaceI2I(0x818f480, 0xb771fa80, 0x18646080, 0xb7634cd8)
/usr/local/go/src/pkg/runtime/iface.c:437 +0x99
runtime.assertI2I(0x818f480, 0xb771fa80, 0x18646080, 0x0, 0x18646080)
/usr/local/go/src/pkg/runtime/iface.c:444 +0x43
github.com/0xfaded/eval.evalCallExpr(0x186001d8, 0x1861c210, 0x1861c0f0,
0x1861c210, 0x8050f01, ...)
/home/rocky/go/src/github.com/0xfaded/eval/callexpr.go:12 +0x41
github.com/0xfaded/eval.EvalExpr(0x186001d8, 0xb771fbe0, 0x1861c210,
0x1861c0f0, 0xb771fbe0, ...)
/home/rocky/go/src/github.com/0xfaded/eval/expr.go:56 +0x281

—
Reply to this email directly or view it on GitHubhttps://github.com/0xfaded/eval/issues/40
.
rocky commented 10 years ago

Perhaps fixed in call check integration branch [?]

Nope. That was merged previously.

0xfaded commented 10 years ago

There's no pull request up for it yet

Carl 2014/01/18 0:17 "R. Bernstein" notifications@github.com:

Perhaps fixed in call check integration branch [?]

Nope. That was merged previously.

— Reply to this email directly or view it on GitHubhttps://github.com/0xfaded/eval/issues/40#issuecomment-32604680 .

rocky commented 10 years ago

This works now.