[foreign] RFR: 8225552: typedef can interfere with primitive classes

Henry Jen henry.jen at oracle.com
Wed Jun 12 19:10:00 UTC 2019


Does that mean we OK with this webrev or we want to pursue other options. For example, one simple way is to add an option to list classes in java.lang/java.foreign should be fully qualified names.

Cheers,
Henry

> On Jun 12, 2019, at 9:18 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> OK - I agree that for nested types there's not much we can do in this case.
> 
> Maurizio
> 
> On 12/06/2019 16:11, Henry Jen wrote:
>> Yes, the nested Byte. I should have attach the error message into the bug report to make it clear.
>> 
>> WARNING: symbol twoShorts is not found in any library
>> java.lang.RuntimeException: In memory compilation failed: /com/example/exports_lib.java:50: error: incompatible types: Pointer<java.lang.Byte> cannot be converted to Pointer<com.example.exports_h.Byte>
>>         _theLibrary.func($arg0, out);
>>                                 ^
>> /com/example/exports_lib.java:54: error: incompatible types: Pointer<java.lang.Long> cannot be converted to Pointer<com.example.exports_h.Long>
>>         return _theLibrary.twoShorts(s, out, rv);
>>                                              ^
>> Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
>> 2 errors
>> 
>> Cheers,
>> Henry
>> 
>> 
>>> On Jun 12, 2019, at 7:41 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>> 
>>> 
>>> On 12/06/2019 14:59, Henry Jen wrote:
>>>> the Byte is defined in the same source code, and will be considered before java.lang.Byte.
>>> What do you mean? Are you maybe referring to a nested type declaration with name 'Byte' ?
>>> 
>>> Maurizio
>>> 
>>> 
>>> 



More information about the panama-dev mailing list