20.05.2011 18:24, Streets Of Boston ?????:
And i'm still not sure why the compiler can't pick up the same info from the 's' parameter declaration of the method 'method'....

This has some interesting stuff on Java's type inference for generics:

http://www.angelikalanger.com/GenericsFAQ/FAQSections/TechnicalDetails.html#Topic7

My impression is, there are several special cases where the type is inferred, one of them being assignment.

The page has examples where type inference doesn't work, and suggests using a temporary variable to help the compiler, just as was discovered.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to