[Nice-commit] Nice/src/bossa/syntax typecheck.nice,1.113,1.114
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-08-25 19:57:31
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17355/F:/nice/src/bossa/syntax Modified Files: typecheck.nice Log Message: Take in account nullness test in asserts. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** typecheck.nice 13 Aug 2004 21:04:41 -0000 1.113 --- typecheck.nice 25 Aug 2004 19:57:20 -0000 1.114 *************** *** 211,214 **** --- 211,222 ---- if (e.isCallTo("assert") && 1 <= e.arguments.size() <= 2) { + ?List<MonoSymbol> l = variablesNotNullIfTestSucceeds(e.arguments.getExp(0)); + if (l != null) + l.foreach(MonoSymbol variable => { + mlsub.typing.Monotype type = notNull(variable.type); + mlsub.typing.Monotype sureType = makeSure(type); + setVarType(variable, now: sureType, out: type); + }); + ?List<(MonoSymbol, mlsub.typing.Monotype)> instanceofIfSucceeds = first_(instanceofInfo(e.arguments.getExp(0))); |