Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv25828/src/bossa/syntax
Modified Files:
TypeMaper.java
Log Message:
Produce a localized error message when there is an ambiguity about which
class a short class name refers to.
Index: TypeMaper.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeMaper.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TypeMaper.java 16 Sep 2002 13:43:48 -0000 1.5
--- TypeMaper.java 12 Sep 2003 21:35:25 -0000 1.6
***************
*** 19,23 ****
@version $Date$
! @author Daniel Bonniot (d.b...@ma...)
*/
public class TypeMaper implements TypeMap
--- 19,23 ----
@version $Date$
! @author Daniel Bonniot (bo...@us...)
*/
public class TypeMaper implements TypeMap
***************
*** 34,47 ****
public TypeSymbol lookup(LocatedString name)
{
! return lookup(name.toString());
}
public TypeSymbol lookup(String name)
{
TypeSymbol res = (TypeSymbol) nice.tools.ast.dispatch.get(inner, name);
if (res != null)
return res;
else
! return global.lookup(name);
}
}
--- 34,52 ----
public TypeSymbol lookup(LocatedString name)
{
! return lookup(name.toString(), name.location());
}
public TypeSymbol lookup(String name)
{
+ return lookup(name, null);
+ }
+
+ public TypeSymbol lookup(String name, bossa.util.Location loc)
+ {
TypeSymbol res = (TypeSymbol) nice.tools.ast.dispatch.get(inner, name);
if (res != null)
return res;
else
! return global.lookup(name, loc);
}
}
|