Added parameter name check.
1 parent 88c0265 commit ed7ed6895c10a310810f193fb4f00182d55c74b5
@glproj03 glproj03 authored on 10 Jan 2006
Showing 1 changed file
View
5
sources/zweic/Analyzer.scala
myVarScope = myVarScope + "this" -> VarSymbol(ownerClass.pos, "this", IClassType(ownerClass));
 
val paramtypes = for ( val f <- args ) yield {
//TODO: check that there isn't already a class field with the same name
myVarScope.get(f.name.name) match {
case Some(m) =>
Report.error(f.pos, "an argument with the name '" + f.name.name + "' exists already");
case None => ()
}
val at = analyzeType(f.typ);
f.name.sym = VarSymbol(f.pos, f.name.name, at);
myVarScope = myVarScope + f.name.name -> f.name.sym.asInstanceOf[VarSymbol];
at