Commit 3ce59e20 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

deny assignment to instance members from static methods

2007-09-14  Juerg Billeter  <j@bitron.ch>

	* vala/valasemanticanalyzer.vala: deny assignment to instance members
	  from static methods

svn path=/trunk/; revision=606
parent 779f26ab
2007-09-14 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: deny assignment to instance members
from static methods
2007-09-14 Jürg Billeter <j@bitron.ch>
* vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata: fix
......
......@@ -2523,6 +2523,12 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
if (a.left is MemberAccess) {
var ma = (MemberAccess) a.left;
if (ma.prototype_access) {
a.error = true;
Report.error (a.source_reference, "Access to instance member `%s' denied".printf (ma.symbol_reference.get_full_name ()));
return;
}
if (ma.error || ma.symbol_reference == null) {
a.error = true;
/* if no symbol found, skip this check */
......
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