[ nice-Bugs-871279 ] Block arguments not allowed in expressions
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #871279, was opened at 2004-01-05 23:46
Message generated for change (Comment added) made by arjanb
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=871279&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bryn Keller (xoltar)
Assigned to: Nobody/Anonymous (nobody)
Summary: Block arguments not allowed in expressions
Initial Comment:
The parser in the current CVS version isn't allowing
block arguments when the call is the rhs of an assignment:
int foo(void->int func) = func();
void main(String[] args) {
foo() { return 1; } //works
int x = foo() { return 1; } //doesn't work
}
----------------------------------------------------------------------
>Comment By: Arjan Boeijink (arjanb)
Date: 2004-01-13 20:41
Message:
Logged In: YES
user_id=688815
Although it looks good on the rhs of an assignment, I'm not
sure about the usage as expression:
bar(foo(){ return 1; }. foo(){ return 5; });
Do you have an example where you to return something from
a block argument call?
Otherwise I suggest limiting it to statements only and rename
it to user defined statement.
----------------------------------------------------------------------
Comment By: Arjan Boeijink (arjanb)
Date: 2004-01-06 00:12
Message:
Logged In: YES
user_id=688815
Only the use of a block call as statement is possible now.
This a parsing problem, I haven't found out yet how to allow a
block call as expression without requiring ; at the end of both
examples you gave.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=871279&group_id=12788
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html