Pass SpecsValueTypeDerive
incorrectly reports path for enum
key
#1137
Labels
SpecsValueTypeDerive
incorrectly reports path for enum
key
#1137
Example of the current error:
(error reported at path
.../value
instead of the correct path.../enum
)This error is generated by pass
SpecsValueTypeDerive
which calculates the type of value instance (i. e. expression in thevalue
field). The reason, whyenum
key influences this pass is because handling of this key implemented as artificial change of thevalue
expression by wrapping it by theAst.expr.EnumById
node.Then
TypeDetector
tries to calculate type of this node usingClassTypeProvider.resolveEnum
which throws an instance ofExpressionError
due to unknown enum. When this exception is caught, it is reported as error invalue
field.Possible solution would to not use the
Ast.expr.EnumById
node, but handle convertion to enum somehow else. Another way is to throw different error when processingAst.expr.EnumById
or somehow else distinguish between throwned errors.The text was updated successfully, but these errors were encountered: