[ nice-Bugs-1510005 ] nicec creates infinitly recursive program

"SourceForge.net" <[email protected]> Wed, 21 Jun 2006 07:15:00 -0700
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #1510005, was opened at 2006-06-21 14:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1510005&group_id=12788

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: B S (ben77)
Assigned to: Nobody/Anonymous (nobody)
Summary: nicec creates infinitly recursive program

Initial Comment:
When looking at bug 1483583, I found that this program
gives a StackOverflowError when ran:

package testing;
import nice.functional;
<T> Slice<T> sliceRange(Range<T> range) = range;
override <T> List<T> get(List<T> list, Range<int>
range) = list[sliceRange(range)];

interface Term<T> {
T value();
}

interface Int implements Term<int> {}

class VInt implements Int{
  value() = 1;
}

void main(String[] args) 
{
  List<int> list = [1,2,3,4,5,6];
  println(list[3..4]);
  Int  a = new VInt();
  var b = a.value();
}

Error:
Exception in thread "main" java.lang.StackOverflowError
        at testing.fun.get(Unknown Source)
        at nice.functional.dispatch.get(Unknown Source)
        at testing.fun.get(Unknown Source)
        at nice.functional.dispatch.get(Unknown Source)
        at testing.fun.get(Unknown Source)
        at nice.functional.dispatch.get(Unknown Source)
        ...

For some reason, removing any of the stuff in main
fixes the problem.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1510005&group_id=12788