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

don't crash on missing type arguments, fixes bug 464699

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

	* vala/valasemanticanalyzer.vala: don't crash on missing type arguments,
	  fixes bug 464699

svn path=/trunk/; revision=450
parent a13da911
2007-08-08 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: don't crash on missing type arguments,
fixes bug 464699
2007-08-08 Mathias Hasselmann <mathias.hasselmann@gmx.de>
* vapi/glib-2.0.vala: fix spelling of OptionFlags.FILENAME
......
......@@ -1534,7 +1534,11 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
node_reference.error = true;
return null;
}
var actual_type = (TypeReference) instance_type.get_type_arguments ().get (param_index);
TypeReference actual_type = null;
if (param_index < instance_type.get_type_arguments ().size) {
actual_type = (TypeReference) instance_type.get_type_arguments ().get (param_index);
}
if (actual_type == null) {
Report.error (node_reference.source_reference, "internal error: no actual argument found for type parameter %s".printf (generic_type.type_parameter.name));
node_reference.error = true;
......@@ -1906,6 +1910,9 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
/* if type resolving didn't succeed, skip this check */
return;
}
if (expr.inner.error) {
return;
}
// FIXME: check whether cast is allowed
......
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