Extra check on interface asserts

Interface asserts haven't been implemented yet. Don't produce incorrect
code in that case.
This commit is contained in:
Ayke van Laethem
2018-08-27 00:50:03 +02:00
parent 0c71ed81a4
commit ee10162564
+3
View File
@@ -1731,6 +1731,9 @@ func (c *Compiler) parseExpr(frame *Frame, expr ssa.Value) (llvm.Value, error) {
if err != nil {
return llvm.Value{}, err
}
if _, ok := expr.AssertedType.Underlying().(*types.Interface); ok {
return llvm.Value{}, errors.New("todo: assert on interface")
}
assertedType, err := c.getLLVMType(expr.AssertedType)
if err != nil {
return llvm.Value{}, err