You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
generates enum class Bar as standalone class in default package
There are 2 problems with this:
It is not consistent the behavior of javaType with non-enum types, which generates the class in the target package (unless using a fully-qualified name)
More serious: the enclosing class doesn't compile because it can't resolve the type of the enum property.
If I use a fully-qualified class name, it works as expected.
I believe that javaType should behave the same for enums ans non-enums, including the possibility to specify a sub-package of the target package, as I already mentioned in #1089
The text was updated successfully, but these errors were encountered:
joelittlejohn
changed the title
Using enum + javaType generates enum in default package / fails to compile
Using enum + javaType (without package name) generates enum in default package as a class, then fails to compile
Mar 2, 2021
If I simply use
enum
withoutjavaType
, the enum class is generated as an inner class of the enclosing type (which is fine).However, if I add
javaType
using a non-qualified class name, the enum class is generated as a standalone class in the default package (= no package).generates enum class
Bar
as standalone class in default packageThere are 2 problems with this:
javaType
with non-enum types, which generates the class in the target package (unless using a fully-qualified name)If I use a fully-qualified class name, it works as expected.
I believe that
javaType
should behave the same for enums ans non-enums, including the possibility to specify a sub-package of the target package, as I already mentioned in #1089The text was updated successfully, but these errors were encountered: