[Nice-commit] Nice/src/bossa/syntax analyse.nice,1.101,1.102
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-06-27 23:37:33
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1445/F:/nice/src/bossa/syntax Modified Files: analyse.nice Log Message: Improved error message for typeExpressions. Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** analyse.nice 25 Feb 2004 11:23:28 -0000 1.101 --- analyse.nice 27 Jun 2004 23:37:24 -0000 1.102 *************** *** 620,625 **** if (type == null) ! throw new bossa.util.UserError(name, "Class " + name + " is not declared"); ! e.value = type; e.representedType = bossa.syntax.Node.getGlobalTypeScope(). --- 620,629 ---- if (type == null) ! { ! if (info.lookupType(name) instanceof MonotypeVar) ! throw new bossa.util.UserError(name, "A type variable cannot be used here"); ! else ! throw new bossa.util.UserError(name, "Class " + name + " is not declared"); ! } e.value = type; e.representedType = bossa.syntax.Node.getGlobalTypeScope(). |