[ sisc-Bugs-1683317 ] IndexOutOfBoundsException w/ incorrect non-gen classes

"SourceForge.net" <[email protected]> Sun, 18 Mar 2007 17:34:45 -0700
Newsgroups gmane.comp.java.sisc.devel
Message-ID <[email protected]>
Bugs item #1683317, was opened at 2007-03-18 20:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379534&aid=1683317&group_id=23735

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
Private: No
Submitted By: Alessandro Colomba (acolomba)
Assigned to: Nobody/Anonymous (nobody)
Summary: IndexOutOfBoundsException w/ incorrect non-gen classes

Initial Comment:
The following code result in an IndexOutOfBoundsException rather than a Scheme error.

--8<----8<----8<----8<----8<----8<----8<--
(import generic-procedures)
(import oo)
(import type-system)

(define-generics :id :id!)

; a class <c> w/ uid "c"
(define-nongenerative-class (<c>) c
  (id :id :id!))

(define-method (initialize (<c> c) (<value> id))
  (:id! c id))

; a child class <c:c> w/ THE SAME uid "c"
(define-nongenerative-class (<c:c> <c>) c)

(make <c:c> (gensym))
; => Error in record-set!: <java.lang.ArrayIndexOutOfBoundsException>: 0
--8<----8<----8<----8<----8<----8<----8<--

I believe we see two bugs here:
1) The error happens during instantiation, while one would expect the incorrect condition to be resolved during class definition with an appropriate error or warning.
2) record-set! generates a Java exception rather than a Scheme error message.


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379534&aid=1683317&group_id=23735

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV