[ nice-Bugs-967122 ] Polymorphic type inference

"SourceForge.net" <[email protected]> Thu, 10 Jun 2004 07:06:55 -0700
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #967122, was opened at 2004-06-05 17:16
Message generated for change (Settings changed) made by bonniot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=967122&group_id=12788

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bryn Keller (xoltar)
>Assigned to: Daniel Bonniot (bonniot)
>Summary: Polymorphic type inference

Initial Comment:
Nice compiler version 0.9.8 prerelease (build
2004.05.28, 18:05:16 UTC)
Compiled using JDK 1.4.2
Copyright (C) 2003 Daniel Bonniot
Visit the Nice homepage: http://nice.sourceforge.net

abstract class Piece {}
class Empty extends Piece {}

class Board {
  int width;
  int height;
  List<List<Piece>> grid = new ArrayList();
    {
      grid = new ArrayList(this.width);
      for(int i = 0; i < width; i++) {
	let col = new ArrayList(this.height);
	grid.add(col);
	for(int j = 0; j < height; j++) {
	  col.add(new Empty());
	}
      }
    }
}

C:\src\nice>nicec -a test test
nice.lang: parsing
test: parsing
test: typechecking
test: generating code
test: linking
releaseInitialContext should be called when in first
rigid context
releaseInitialContext should be called when in first
rigid context
releaseInitialContext should be called when in first
rigid context
releaseInitialContext should be called when in first
rigid context

An exception has occured in the compiler
Please fill-in a bug report at the following webpage:
http://sourceforge.net/tracker/?func=add&group_id=12788&atid=112788

Stack trace:
Exception in thread "main"
java.lang.ArrayIndexOutOfBoundsException: -3
        at
mlsub.typing.lowlevel.BitMatrix.get(BitMatrix.java:128)
        at mlsub.typing.lowlevel.K0.leq0(K0.java:671)
        at mlsub.typing.lowlevel.K0.leq(K0.java:648)
        at
mlsub.typing.lowlevel.Engine$Constraint.leq(Engine.java:928)
        at
mlsub.typing.lowlevel.Engine.assertFrozens(Engine.java:672)
        at
mlsub.typing.lowlevel.Engine.leave(Engine.java:115)
        at mlsub.typing.Typing.leave(Typing.java:126)
        at mlsub.typing.Typing.leave(Typing.java:110)
        at
mlsub.typing.Enumeration.enumerate(Enumeration.java:102)
        at bossa.link.Dispatch.enumerate(Dispatch.java:426)
        at bossa.link.Dispatch.test(Dispatch.java:186)
        at bossa.link.Dispatch.test(Dispatch.java:90)
        at bossa.link.Dispatch.test(Dispatch.java:75)
        at bossa.modules.Package.link(Package.java:337)
        at mlsub.compilation.fun.lambda21(make.nice:33)
        at mlsub.compilation.fun.apply1(make.nice:0)
        at
gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
        at nice.lang.fun.foreach(collections.nice:130)
        at nice.lang.dispatch.foreach(range.nice:0)
        at
mlsub.compilation.fun.compileComponent(make.nice:33)
        at
mlsub.compilation.dispatch.compileComponent(dispatch.nice)
        at
mlsub.compilation.fun$make.lambda18(make.nice:45)
        at mlsub.compilation.fun$make.apply1(make.nice:0)
        at
gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
        at nice.lang.fun.foreach(collections.nice:130)
        at nice.lang.dispatch.foreach(range.nice:0)
        at mlsub.compilation.fun.make(make.nice:44)
        at mlsub.compilation.dispatch.make(dispatch.nice)
        at
nice.tools.compiler.fun.compile(interface.nice:40)
        at
bossa.modules.Compilation.compile(Compilation.nice)
        at
nice.tools.compiler.console.fun.compile(main.nice:168)
        at
nice.tools.compiler.console.dispatch.compile(dispatch.nice)
        at
nice.tools.compiler.console.fun.main(main.nice:184)


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

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


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org