ark-lang / ark

A compiled systems programming language written in Go using the LLVM framework
https://ark-lang.github.io/
MIT License
677 stars 47 forks source link

Generic parameters to non-generic functions #722

Closed felixangell closed 8 years ago

felixangell commented 8 years ago

If you were to pass generic parameters to a non generic function, it will panic when you create a new generic context here:

if len(parameters) != len(arguments) {
        panic("len(parameters) != len(arguments): " + fmt.Sprintf("%d != %d", len(parameters), len(arguments)))
    }

This would happen, for example, if you were to pass a parameter to the non-generic function rawAlloc.