[ 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 (Settings changed) 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: Closed
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: Daniel Bonniot (bonniot)
Date: 2004-01-15 06:27

Message:
Logged In: YES 
user_id=88952

Isaac, can this be closed?

----------------------------------------------------------------------

Comment By: Isaac Gouy (igouy)
Date: 2004-01-14 09:30

Message:
Logged In: YES 
user_id=536291

Oh I like that! 
I like that a lot!

It's so much better when it's my misundestanding ;-)

----------------------------------------------------------------------

Comment By: Arjan Boeijink (arjanb)
Date: 2004-01-14 08:10

Message:
Logged In: YES 
user_id=688815

let Test->String f = numberFive;
and for the other one 
let ()->String f = numberFive;



----------------------------------------------------------------------

Comment By: Isaac Gouy (igouy)
Date: 2004-01-14 07:59

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: 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


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.