[Nice-commit] Nice/src/bossa/parser Parser.jj,1.247,1.248
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-07-16 10:01:55
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9811/src/bossa/parser Modified Files: Parser.jj Log Message: When there is a class constraint, report undeclared class type parameters. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.247 retrieving revision 1.248 diff -C2 -d -r1.247 -r1.248 *** Parser.jj 1 Jul 2004 10:46:18 -0000 1.247 --- Parser.jj 16 Jul 2004 10:01:33 -0000 1.248 *************** *** 1167,1177 **** MonotypeVar var; Token start; } { ! start="<" var=taggedMonotypeVar(tags, atoms) { binders.add(var); } ( "," var=taggedMonotypeVar(tags, atoms) { binders.add(var); } )* [ "|" atomics(atoms) ] ! ">" { // For the moment, disallow constraints to come from both the prefix --- 1167,1178 ---- MonotypeVar var; Token start; + Location loc; } { ! start="<" { loc = makeLocation(start); } var=taggedMonotypeVar(tags, atoms) { binders.add(var); } ( "," var=taggedMonotypeVar(tags, atoms) { binders.add(var); } )* [ "|" atomics(atoms) ] ! ">" { // For the moment, disallow constraints to come from both the prefix *************** *** 1179,1186 **** if (prefix != Constraint.True && atoms.size() > 0) throw bossa.util.User.error ! (makeLocation(start), "Constraints on type parameters should all be specified in the prefix constraint"); MonotypeVar[] b = (MonotypeVar[]) binders.toArray(new MonotypeVar[binders.size()]); ! return MethodContainer.Constraint.make(prefix, b, atoms); } } --- 1180,1187 ---- if (prefix != Constraint.True && atoms.size() > 0) throw bossa.util.User.error ! (loc, "Constraints on type parameters should all be specified in the prefix constraint"); MonotypeVar[] b = (MonotypeVar[]) binders.toArray(new MonotypeVar[binders.size()]); ! return MethodContainer.Constraint.make(prefix, b, atoms, loc); } } |