diff options
Diffstat (limited to 'vala/valaexpressionstatement.vala')
-rw-r--r-- | vala/valaexpressionstatement.vala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vala/valaexpressionstatement.vala b/vala/valaexpressionstatement.vala index 0de6571f2..ac435d081 100644 --- a/vala/valaexpressionstatement.vala +++ b/vala/valaexpressionstatement.vala @@ -78,6 +78,10 @@ public class Vala.ExpressionStatement : CodeNode, Statement { // ignore inner error error = true; return false; + } else if (expression is Literal) { + Report.error (source_reference, "Literal expression not allowed as statement"); + error = true; + return false; } return !error; |