Skip to content

Commit

Permalink
Bugfix/annotations and Missing Enums (#1585)
Browse files Browse the repository at this point in the history
* Removing unnecessary cast restriction that sometimes just brakes analysis

* Reenabling ENums inside of records
  • Loading branch information
konradweiss authored Jun 10, 2024
1 parent 200c6d6 commit e82cf1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ open class DeclarationHandler(lang: JavaLanguageFrontend) :
is ClassOrInterfaceDeclaration -> {
frontend.scopeManager.addDeclaration(handle(decl))
}
is com.github.javaparser.ast.body.EnumDeclaration -> {
frontend.scopeManager.addDeclaration(handle(decl))
}
is InitializerDeclaration -> {
val initializerBlock =
frontend.statementHandler.handleBlockStatement(decl.body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ open class JavaLanguageFrontend(language: Language<JavaLanguageFrontend>, ctx: T
val member =
newAnnotationMember(
ANNOTATION_MEMBER_VALUE,
expressionHandler.handle(value.asLiteralExpr()) as Expression,
expressionHandler.handle(value) as Expression,
rawNode = value
)
members.add(member)
Expand Down

0 comments on commit e82cf1d

Please sign in to comment.