[Nice-commit] Nice/src/bossa/syntax Pattern.java,1.37,1.38
Brought to you by:
bonniot
From: <ar...@us...> - 2003-02-20 01:27:59
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv14046/F:/nice/src/bossa/syntax Modified Files: Pattern.java Log Message: Give an error when #interface patterns are used they make no sense and don't work Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Pattern.java 18 Feb 2003 14:21:20 -0000 1.37 --- Pattern.java 20 Feb 2003 01:27:51 -0000 1.38 *************** *** 116,119 **** --- 116,122 ---- { tc = typeConstructor.resolveToTC(scope); + if (exactlyAt && TypeConstructors.isInterface(tc)) + User.error(typeConstructor.location(), "Pattern #"+typeConstructor.toString()+ + " can never be matched because instances of an interface don't exist."); typeConstructor = null; } |