Skip to content

Commit 505eecf

Browse files
Virtual modifier deprecation warning
1 parent f979b3b commit 505eecf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libsolidity/analysis/SyntaxChecker.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ void SyntaxChecker::endVisit(ModifierDefinition const& _modifier)
195195
{
196196
if (_modifier.isImplemented() && !m_placeholderFound)
197197
m_errorReporter.syntaxError(2883_error, _modifier.body().location(), "Modifier body does not contain '_'.");
198+
199+
if (_modifier.markedVirtual())
200+
m_errorReporter.warning(
201+
8429_error,
202+
_modifier.location(),
203+
"Virtual modifiers are deprecated and scheduled for removal in the next breaking version (0.9)."
204+
);
205+
198206
m_placeholderFound = false;
199207
}
200208

0 commit comments

Comments
 (0)