bugKawa - Bugs: bug #10600, top level vars not always...

 
 

bug #10600: top level vars not always initialized

Submitted by:  Chris Dean <ctdean>
Submitted on:  Wed 06 Oct 2004 09:14:20 PM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: Unexpected resultStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 11 Feb 2005 10:12:21 PM UTC, comment #1:

I've attached a testsuite patch that adds a test case for this. I'm hoping that it can be added to the Kawa sources.

Also, while Chris's original example works with your fix, when I was making this test case I uncovered a ClassCastException when calling indirect-bar-test. This is probably an unrelated problem, but I've included it with this patch.

Dean Ferreyra <dferreyra>
Wed 06 Oct 2004 09:14:20 PM UTC, original submission:

When using a top-level variable required from another module, the
variable may not be initalized. See below for a repeat.

--- /dev/null Tue Sep 14 23:30:46 2004
+++ Foo.scm Wed Oct 6 13:39:20 2004
@@ -0,0 +1,6 @@
+(module-name <Foo>)
+(module-static #t)
+
+(require <Bar>)
+
+(format #t "--- ~S~%" bar-test)
--- /dev/null Tue Sep 14 23:30:46 2004
+++ Bar.scm Wed Oct 6 13:39:35 2004
@@ -0,0 +1,12 @@
+(module-name <Bar>)
+(module-static #t)
+
+(define bar-test '(bar test 1))
+
+;;; This works:
+;;
+;; (define bar-test (make-bars))
+;;
+;; (define (make-bars)
+;; '(bar test 2))
+

Chris Dean <ctdean>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #2538:  test-case.diff added by dferreyra (1KiB - application/octet-stream - testsuite test case for this item)
file #1844:  Comp.patch added by bothner (2KiB - application/octet-stream - Patch.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 11 Feb 2005 10:12:21 PM UTCdferreyraAttached File-=>Added test-case.diff, #2181
Fri 08 Oct 2004 05:51:27 AM UTCbothnerStatusNone=>Fixed
  Assigned toNone=>bothner
  Open/ClosedOpen=>Closed
  Attached File-=>Added Comp.patch, #1745

Back to the top


Powered by Savane 3.1-cleanup1