[ nice-Bugs-969777 ] VerifyError - subclassing Java class

"SourceForge.net" <[email protected]> Wed, 09 Jun 2004 10:22:39 -0700
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #969777, was opened at 2004-06-09 10:22
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=969777&group_id=12788

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bryn Keller (xoltar)
Assigned to: Nobody/Anonymous (nobody)
Summary: VerifyError - subclassing Java class

Initial Comment:
C:\src\nice>nicec --version
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

import java.awt.*;

class Square extends Polygon {
  int x() = this.getBounds().x;
  int y() = this.getBounds().y;
}

<T,U> T fst((T,U) tup) {
  (T t,U u) = tup;
  return t;
}

<T,U> U snd((T,U) tup) {
  (T t, U u) = tup;
  return u;
}

new Square(int x, int y, int width) {
  let points = [(0,0), (0,1), (1,1), (1,0)];
  this(points.map(fst), points.map(snd), points.length);
}

void main(String[] args) {
}


Compiles, but fails at runtime:

C:\src\nice>java -jar test.jar
Exception in thread "main" java.lang.VerifyError:
(class: test/fun, method: x signature:
(Ltest/Square;)I) Incompatible object argument for
function call
        at test.dispatch.main(dispatch.nice)

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=969777&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