Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Can't chain call expressions #725

Open
MovingtoMars opened this issue Mar 3, 2016 · 2 comments
Open

Can't chain call expressions #725

MovingtoMars opened this issue Mar 3, 2016 · 2 comments
Labels

Comments

@MovingtoMars
Copy link
Member

io::printInt(list.get(0).unwrap());
panic: interface conversion: *ast.CallExpr is not ast.AccessExpr: missing method Mutable

goroutine 1 [running]:
panic(0x564b4caf5aa0, 0xc820370d40)
    /usr/lib/go/src/runtime/panic.go:464 +0x3e6
github.com/ark-lang/ark/src/ast.(*Constructor).constructStructAccessNode(0xc82035e5e0, 0xc820138e60, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:752 +0x13b
github.com/ark-lang/ark/src/ast.(*Constructor).constructExpr(0xc82035e5e0, 0x7fe98fed0da8, 0xc820138e60, 0x0, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:185 +0x235
github.com/ark-lang/ark/src/ast.(*Constructor).constructCallExprNode(0xc82035e5e0, 0xc8201a2780, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:728 +0xd7
github.com/ark-lang/ark/src/ast.(*Constructor).constructExpr(0xc82035e5e0, 0x7fe98fed0748, 0xc8201a2780, 0x0, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:181 +0x139b
github.com/ark-lang/ark/src/ast.(*Constructor).constructExprs(0xc82035e5e0, 0xc82019eee0, 0x1, 0x1, 0x0, 0x0, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:232 +0x11e
github.com/ark-lang/ark/src/ast.(*Constructor).constructCallExprNode(0xc82035e5e0, 0xc8201a2800, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:727 +0x73
github.com/ark-lang/ark/src/ast.(*Constructor).constructExpr(0xc82035e5e0, 0x7fe98fed0748, 0xc8201a2800, 0x0, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:181 +0x139b
github.com/ark-lang/ark/src/ast.(*Constructor).constructCallStatNode(0xc82035e5e0, 0xc820168c60, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:569 +0xe3
github.com/ark-lang/ark/src/ast.(*Constructor).constructNode(0xc82035e5e0, 0x7fe98fed0798, 0xc820168c60, 0x0, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:127 +0x729
github.com/ark-lang/ark/src/ast.(*Constructor).constructNodes(0xc82035e5e0, 0xc8201a2980, 0x8, 0x8, 0x0, 0x0, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:216 +0x11e
github.com/ark-lang/ark/src/ast.(*Constructor).constructBlockNode(0xc82035e5e0, 0xc8201a6150, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:562 +0xd4
github.com/ark-lang/ark/src/ast.(*Constructor).constructFunctionNode(0xc82035e5e0, 0xc8201a2b00, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:926 +0xf06
github.com/ark-lang/ark/src/ast.(*Constructor).constructFunctionDeclNode(0xc82035e5e0, 0xc820168e40, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:413 +0x57
github.com/ark-lang/ark/src/ast.(*Constructor).constructNode(0xc82035e5e0, 0x7fe98fed04d8, 0xc820168e40, 0x0, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:103 +0xa88
github.com/ark-lang/ark/src/ast.(*Constructor).constructSubmodule(0xc82035e5e0, 0xc820160ee0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:84 +0x208
github.com/ark-lang/ark/src/ast.Construct.func1.1()
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:70 +0x40
github.com/ark-lang/ark/src/util/log.Timed(0x564b4cbdfbb0, 0x16, 0xc82017d2e0, 0x5, 0xc82017d500)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/util/log/timed.go:28 +0x361
github.com/ark-lang/ark/src/ast.Construct.func1()
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:71 +0x15f
github.com/ark-lang/ark/src/util/log.Timed(0x564b4cbdfb90, 0x13, 0xc82017d5d0, 0x7, 0xc82017d7d8)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/util/log/timed.go:28 +0x361
github.com/ark-lang/ark/src/ast.Construct(0xc820168420, 0xc820112600)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/ast/constructor.go:73 +0x197
main.(*Context).parseFiles.func3()
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/cmd/ark/main.go:272 +0xb5
github.com/ark-lang/ark/src/util/log.Timed(0x564b4cbdfbd0, 0x12, 0x0, 0x0, 0xc82017dbb0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/util/log/timed.go:28 +0x361
main.(*Context).parseFiles(0xc820132070)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/cmd/ark/main.go:274 +0x473
main.(*Context).Build(0xc820132070, 0x7ffe09e068f1, 0x5, 0x1, 0x564b4cb8f4e0, 0x4, 0x0)
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/cmd/ark/main.go:107 +0x44
main.main()
    /home/sachiel/gocode/src/github.com/ark-lang/ark/src/cmd/ark/main.go:56 +0x4e9
@felixangell
Copy link
Member

There's a lot of stuff like this, for instance you can't index an expression either, e.g.foo()[0]

@kiljacken
Copy link
Member

Closely related to #719

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants