[Nice-commit] Nice/src/bossa/syntax typecheck.nice,1.76,1.77
Brought to you by:
bonniot
From: <ar...@us...> - 2003-08-30 15:53:36
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv398/F:/nice/src/bossa/syntax Modified Files: typecheck.nice Log Message: infer x to type int when exp is of type short in "var x = exp". Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** typecheck.nice 30 Aug 2003 10:31:36 -0000 1.76 --- typecheck.nice 30 Aug 2003 15:53:33 -0000 1.77 *************** *** 586,590 **** decl.value = value = value.noOverloading(); target.type = checkMonomorphic(value.getType(), decl); ! if (target.type == PrimitiveType.byteType) target.type = notNull(PrimitiveType.intType); } --- 586,591 ---- decl.value = value = value.noOverloading(); target.type = checkMonomorphic(value.getType(), decl); ! if (target.type == PrimitiveType.byteType || ! target.type == PrimitiveType.shortType) target.type = notNull(PrimitiveType.intType); } |