[ nice-Bugs-876527 ] module function - method ambiguity
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #876527, was opened at 2004-01-13 17:05
Message generated for change (Comment added) made by igouy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=876527&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Isaac Gouy (igouy)
Assigned to: Nobody/Anonymous (nobody)
Summary: module function - method ambiguity
Initial Comment:
String numberFive() = "fun 5";
void main(String[] args){
let f = numberFive;
println( f );
}
\Nice\Test>java -jar t.jar
#<procedure numberFive>
//---------------
String numberFive() = "fun 5";
void main(String[] args){
let f = numberFive;
println( f );
let f2 = new Test().numberFive;
println( f2 );
}
class Test {
String numberFive() = "method 5";
}
\Nice\Test\..\test\test.nice: line 4, column 12:
Ambiguity for symbol numberFive. Possibilities are :
java.lang.String numberFive(test.Test this)
java.lang.String numberFive()
//---------------
String numberFive() = "fun 5";
void main(String[] args){
let f = numberFive();
println( f );
let f2 = new Test().numberFive;
println( f2 );
}
class Test {
String numberFive() = "method 5";
}
\Nice\Test>java -jar t.jar
fun 5
method 5
----------------------------------------------------------------------
>Comment By: Isaac Gouy (igouy)
Date: 2004-01-14 07:58
Message:
Logged In: YES
user_id=536291
Fair enough - how do I get a reference to the function
object of numberFive(Test this)?
----------------------------------------------------------------------
Comment By: Arjan Boeijink (arjanb)
Date: 2004-01-14 03:33
Message:
Logged In: YES
user_id=688815
I don't think this is a bug. numberFive without () is considered
a reference and not a method call by the compiler. There are
2 possible things it can a reference to: the function object of
numberFive() and the function object of numberFive(Test
this).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=876527&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