Nice/src/bossa/syntax customConstructor.nice,1.22,1.23
Daniel Bonniot <[email protected]>
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20458/src/bossa/syntax
Modified Files:
customConstructor.nice
Log Message:
Avoid unnecessary cast.
Index: customConstructor.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/customConstructor.nice,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** customConstructor.nice 22 Feb 2005 10:27:09 -0000 1.22
--- customConstructor.nice 22 Feb 2005 13:09:44 -0000 1.23
***************
*** 188,194 ****
void resolveCCThis(Statement stmt, Located thisLoc, NiceClass classe)
{
! void missingThisError()
{
! User.error(thisLoc, "The last statement must be a call to 'this' constructor");
}
--- 188,194 ----
void resolveCCThis(Statement stmt, Located thisLoc, NiceClass classe)
{
! UserError missingThisError()
{
! return User.error(thisLoc, "The last statement must be a call to 'this' constructor");
}
***************
*** 202,213 ****
if (! (last instanceof ExpressionStmt))
! missingThisError();
!
! ExpressionStmt expstmt = cast(last);
! if (! (expstmt.exp instanceof CallExp))
missingThisError();
! CallExp call = cast(expstmt.exp);
if (! (call.function instanceof IdentExp))
--- 202,211 ----
if (! (last instanceof ExpressionStmt))
! throw missingThisError();
! if (! (last.exp instanceof CallExp))
missingThisError();
! CallExp call = cast(last.exp);
if (! (call.function instanceof IdentExp))
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click