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

report too short type names, based on patch by Ed Schouten, fixes bug

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

	* gobject/valacodegeneratorclass.vala,
	  gobject/valacodegeneratorinterface.vala: report too short type names,
	  based on patch by Ed Schouten, fixes bug 471253

svn path=/trunk/; revision=531
parent 719cb349
2007-08-29 Jürg Billeter <j@bitron.ch>
* gobject/valacodegeneratorclass.vala,
gobject/valacodegeneratorinterface.vala: report too short type names,
based on patch by Ed Schouten, fixes bug 471253
2007-08-29 Jürg Billeter <j@bitron.ch>
* vala/parser.y: allow property accessors in arbitrary order,
......
......@@ -39,6 +39,12 @@ public class Vala.CodeGenerator {
current_type_symbol = cl;
current_class = cl;
if (cl.get_cname().len () < 3) {
cl.error = true;
Report.error (cl.source_reference, "Class name `%s' is too short".printf (cl.get_cname ()));
return;
}
if (cl.is_static) {
return;
}
......
......@@ -28,6 +28,12 @@ public class Vala.CodeGenerator {
current_symbol = iface;
current_type_symbol = iface;
if (iface.get_cname().len () < 3) {
iface.error = true;
Report.error (iface.source_reference, "Interface name `%s' is too short".printf (iface.get_cname ()));
return;
}
CCodeFragment decl_frag;
CCodeFragment def_frag;
if (iface.access != MemberAccessibility.PRIVATE) {
......
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