-
Bug
-
Resolution: Fixed
-
P3
-
repo-panama
-
generic
-
generic
Example:
File: stat.h
struct stat {
...
}
jextract generates stat.java for header and "stat" inside it
// header interface
interface stat {
...
// interface for struct stat
static interface stat extends Struct<stat> {... }
}
The above is not valid code.
https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1
"It is a compile-time error if a class has the same simple name as any of its enclosing classes or interfaces. "
Another name clash case:
/usr/include/sys/_types directory is mapped to usr.include.sys._types package. But there is a header called /usr/include/sys/_types.java which is mapped to header interface named usr.include.sys._types. i.e., a package and a class with the same fully qualified name. And that does not compile as well.
File: stat.h
struct stat {
...
}
jextract generates stat.java for header and "stat" inside it
// header interface
interface stat {
...
// interface for struct stat
static interface stat extends Struct<stat> {... }
}
The above is not valid code.
https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.1
"It is a compile-time error if a class has the same simple name as any of its enclosing classes or interfaces. "
Another name clash case:
/usr/include/sys/_types directory is mapped to usr.include.sys._types package. But there is a header called /usr/include/sys/_types.java which is mapped to header interface named usr.include.sys._types. i.e., a package and a class with the same fully qualified name. And that does not compile as well.
- relates to
-
JDK-8221611 prepare jextract tests for generated header, static forwarder name pattern change
- Resolved