RFR [nicl] 8201129: C nested types and anonymous types are not handled properly

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Thu Apr 19 23:05:28 UTC 2018


That works fine - 'bar' is the field name in Foo struct that is of 
struct type (which happens to have "foo" field). No clash there. I 
didn't include in the test because I wanted simple exists/does-not-exist 
checks - hence used different names.

And this ->

struct Foo {
     int foo;
     struct {
         int foo;
     };
};

is a compilation error ("member of anonymous struct redeclares 'foo'"). 
So that case is covered as well.

-Sundar

On 19/04/18, 3:24 PM, Samuel Audet wrote:
> All the variables in the test case have different names though.
> What happens with something like this?
>
> struct Foo {
>     int foo;
>     struct {
>         int foo;
>     } bar;
> };
>
> Samuel
>
> On 04/20/2018 06:50 AM, Sundararajan Athijegannathan wrote:
>> Please review http://cr.openjdk.java.net/~sundar/8201129/webrev.00/
>>
>> Thanks,
>> -Sundar
>


More information about the panama-dev mailing list