Issue error if user tries to declare a method.
This commit is contained in:
5
type.cpp
5
type.cpp
@@ -1817,6 +1817,11 @@ StructType::StructType(const std::string &n, const llvm::SmallVector<const Type
|
||||
Assert(m->errorCount > 0);
|
||||
return;
|
||||
}
|
||||
else if (CastType<FunctionType>(type) != NULL) {
|
||||
Error(elementPositions[i], "Method declarations are not "
|
||||
"supported.");
|
||||
}
|
||||
else
|
||||
elementTypes.push_back(type->LLVMType(g->ctx));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user