#1183 [interop] Str as CharSequence and sys::List as java List

Akcelisto Fri 27 Aug 2010

There are net.htmlparser.jericho.Source with ctor with arg java.lang.CharSequence but this code not compile:

using [java]net.htmlparser.jericho::Source  
src := Source("")

Compiler says:

Invalid args <ctor>(sys::Str)

I suggest fix this because Str maps String and String implements CharSequence.

Interop.toFan accepts Enumeration and Iterator but List. I suggest to add List.

brian Fri 27 Aug 2010

Promoted to ticket #1183 and assigned to brian

That should work since String implements that interface. But I suspect its a bug due to String being a special built-in type. I will take a look.

brian Thu 9 Sep 2010

Ticket resolved in 1.0.55

This was a problem with the special built-in types:

sys::Bool     <=>  java.lang.Boolean
sys::Int      <=>  java.lang.Long
sys::Float    <=>  java.lang.Double
sys::Decimal  <=>  java.math.BigDecimal
sys::Str      <=>  java.lang.String

I added support so that the compiler recognizes that these types also implement Java interfaces like Serializable or in the case of Str that it implements CharSequence.

I also added support for Interop.toFan(List).


Login or Signup to reply.