Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

var args method

 
aswin penugonda
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can any one explain me why there is ambiguity in m1 method call
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SCJP-93% (310-055)


Should you not know this answer already ? ;)

Hint: Will a byte fit into an int ?
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
aswin penugonda wrote:
Can any one explain me why there is ambiguity in m1 method call



we cannot mix the overloading var args and widening............
 
Vlado Zajac
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should be no ambiguity since byte... is more specific than int... .

It looks like this compiler bug.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, try this too!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic