Add assert about source location.

This commit is contained in:
chriseth 2018-04-30 15:26:25 +02:00 committed by Alex Beregszaszi
parent 6c8f78fb8f
commit 3ca6738114

View File

@ -54,6 +54,7 @@ public:
template <class NodeType, typename... Args>
ASTPointer<NodeType> createNode(Args&& ... _args)
{
solAssert(m_location.sourceName, "");
if (m_location.end < 0)
markEndPosition();
return make_shared<NodeType>(m_location, forward<Args>(_args)...);