Open rost-dev opened 4 years ago
This is definitely a cool bug, will fix that in the next version, thanks for reporting!
The same behaviour appears when we use kotlin nested classes (not only enums)
For example, we have such method in a view: fun drawPolygonGeoZone(zone: GeoZone.Polygon)
Sometimes the dot is replaced with "$": drawPolygonGeoZone(GeoZone$Polygon arg0)
in the generated viewState
Sometime moxy generated viewState with wrong type for enums. In my case:
I have an interface of view SalaryBaseView inherited from BaseView
SalaryPaymentDetailView doesn't use Salary in functions.
Problem appears in generated viewState SalaryPaymentDetailView$$State, Salary.Type replaced on Salary$Type in compile time.
Trace of error: ....\presentation\view\SalaryPaymentDetailView$$State.java:11: error: cannot find symbol import ....\model.Salary$Type; ^ symbol: class Salary$Type location: package ...\presentation\view\SalaryPaymentDetailView$$State.java:289: error: cannot find symbol public void showBottomDialog(long arg0, Salary$Type arg1, ^ symbol: class Salary$Type location: class SalaryPaymentDetailView$$State...\presentation\view\SalaryPaymentDetailView$$State.java:698: error: cannot find symbol public final Salary$Type arg1; ^ symbol: class Salary$Type location: class SalaryPaymentDetailView$$State.ShowBottomDialogCommand...\presentation\view\SalaryPaymentDetailView$$State.java:702: error: cannot find symbol ShowBottomDialogCommand(long arg0, Salary$Type arg1, List<? extends SalaryReferenceMethod> arg2) { ^ symbol: class Salary$Type location: class SalaryPaymentDetailView$$State.ShowBottomDialogCommand...\presentation\view\SalaryCardDetailView$$State.java:10: error: cannot find symbol
Same error was in 2.0.2 and 2.1.2