Commit e537684a authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

improve error reporting in invocation expressions

2007-08-29  Juerg Billeter  <j@bitron.ch>

	* vala/valasemanticanalyzer.vala: improve error reporting in invocation
	  expressions

svn path=/trunk/; revision=529
parent 59b8f55c
2007-08-29 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: improve error reporting in invocation
expressions
2007-08-29 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala, vala/valasemanticanalyzer.vala,
......
......@@ -898,6 +898,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
public override void visit_end_return_statement (ReturnStatement! stmt) {
if (stmt.return_expression != null && stmt.return_expression.error) {
// ignore inner error
stmt.error = true;
return;
}
......@@ -1481,7 +1482,11 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
}
} else {
var arg = arg_it.get ();
if (arg.static_type == null) {
if (arg.error) {
// ignore inner error
expr.error = true;
return false;
} else if (arg.static_type == null) {
// disallow untyped arguments except for type inference of callbacks
if (!(param.type_reference.data_type is Callback)) {
expr.error = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment