bugKawa - Bugs: bug #16593, Prefix-colon syntax and name...

 
 

bug #16593: Prefix-colon syntax and name mangling problem

Submitter:  Dean Ferreyra <dferreyra>
Submitted:  Mon 15 May 2006 07:20:41 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Run-time exception Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 16 May 2006 05:16:07 PM UTC, comment #1: 

I checkin in a fix for this.

Per Bothner <bothner>
Group administrator
Mon 15 May 2006 07:20:41 PM UTC, original submission:  

It looks like in some cases the prefix-colon syntax is not handling name mangling correctly.  Here's an example:

  (module-static #t)
 
  (define-simple-class <A> ()
    ((an-identity-meth name)
     name)
    )
 
  (define a (<A>))
 
  (define (test1)
    (a:anIdentityMeth 'foo))
 
  (define (test2)
    (a:an-identity-meth 'foo))
 
  (display (format "test1: ~A~%" (test1)))
  (display (format "test2: ~A~%" (test2)))

If you compile and run this, the call to test1 succeeds, but the call to test2 generates an exception:

  java kawa.repl --warn-undefined-variable --module-static-run --main -C types.scm
  (compiling types.scm)
  java types
  Exception in thread "main" java.lang.ExceptionInInitializerError
  Caused by: java.lang.RuntimeException: no part 'an-identity-meth' in A@1d04653 m:null
          at gnu.kawa.functions.GetNamedPart.getNamedPart(GetNamedPart.java:284)
          at gnu.kawa.functions.GetNamedPart.apply2(GetNamedPart.java:216)
          at types.test2(types.scm:14)
          at types.run(types.scm:17)
          at gnu.expr.ModuleBody.run(ModuleBody.java:44)
          at gnu.expr.ModuleBody.run(ModuleBody.java:32)
          at types.<clinit>(types.scm)
  test1: foo



Dean Ferreyra <dferreyra>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-05-16 bothner StatusNone Fixed
    Assigned toNone bothner
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code