We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5f4751 commit 0212f0cCopy full SHA for 0212f0c
compiler/interface.go
@@ -133,6 +133,10 @@ func (c *compilerContext) getTypeCode(typ types.Type) llvm.Value {
133
if _, ok := typ.Elem().(*types.Pointer); ok {
134
// For a pointer to a pointer, we just increase the pointer by 1
135
ptr := c.getTypeCode(typ.Elem())
136
+ // if the type is already *****T or higher, we can't make it.
137
+ if typstr := typ.String(); strings.HasPrefix(typstr, "*****") {
138
+ c.addError(token.NoPos, fmt.Sprintf("too many levels of pointers for typecode: %s", typstr))
139
+ }
140
return llvm.ConstGEP(c.ctx.Int8Type(), ptr, []llvm.Value{
141
llvm.ConstInt(llvm.Int32Type(), 1, false),
142
})
0 commit comments