bugKawa - Bugs: bug #36973, poor overload resolution when...

 
 

bug #36973: poor overload resolution when boxing numerics

Submitted by:  Per Bothner <bothner>
Submitted on:  Fri 27 Jul 2012 06:19:15 AM UTC  
 
Category: Type declaration and inferenceSeverity: 3 - Normal
Item Group: Bad diagnosticStatus: Confirmed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Fri 27 Jul 2012 06:19:15 AM UTC, original submission:

(define-simple-class ContentValues ()
((put s::java.lang.String d::java.lang.Double) ::void #!void)
((put s::java.lang.String l::java.lang.Long) ::void #!void)
((put s::java.lang.String f::java.lang.Float) ::void #!void))

(define (foo cv::ContentValues s::java.lang.String l::long)
(cv:put s l))

reports:

tmp/a2.scm:7:3: warning - more than one definitely applicable method `put' in ContentValues
candidate: void ContentValues.put(java.lang.String,java.lang.Float)
candidate: void ContentValues.put(java.lang.String,java.lang.Long)
candidate: void ContentValues.put(java.lang.String,java.lang.Double)

It should choose put(java.lang.String,java.lang.Long).

Per Bothner <bothner>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Submitted the item)
  •  

    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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup