[Nice-commit] Nice/src/bossa/syntax typecheck.nice,1.68,1.69
Brought to you by:
bonniot
From: <ar...@us...> - 2003-05-21 15:55:37
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv27785/F:/nice/src/bossa/syntax Modified Files: typecheck.nice Log Message: Don't typecheck the return type of a short syntax void function. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** typecheck.nice 16 May 2003 12:05:15 -0000 1.68 --- typecheck.nice 21 May 2003 15:55:33 -0000 1.69 *************** *** 675,681 **** throw bossa.util.User.error(r, "This return is not inside a function"); if (r.value != null) { - ?mlsub.typing.Monotype expectedType = function.getExpectedType(); if (expectedType == null) r.value = notNull(r.value).noOverloading(); --- 675,681 ---- throw bossa.util.User.error(r, "This return is not inside a function"); + ?mlsub.typing.Monotype expectedType = function.getExpectedType(); if (r.value != null) { if (expectedType == null) r.value = notNull(r.value).noOverloading(); *************** *** 694,698 **** try{ ! function.checkReturnedType(r.returnType()); } catch(Function.WrongReturnType e){ --- 694,699 ---- try{ ! if ( !(r.fake && expectedType != null && nice.tools.code.Types.isVoid(expectedType))) ! function.checkReturnedType(r.returnType()); } catch(Function.WrongReturnType e){ |