Skip to content

Commit

Permalink
This doesn't work for class itself
Browse files Browse the repository at this point in the history
  • Loading branch information
jrosen081 committed Nov 15, 2024
1 parent b0d2fca commit 3f437c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/JavaKitMacros/JavaFieldMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extension JavaFieldMacro: AccessorMacro {
private static func isInJavaClassContext(context: some MacroExpansionContext) -> Bool {
for lexicalContext in context.lexicalContext {
if let classSyntax = lexicalContext.as(ExtensionDeclSyntax.self) {
return classSyntax.extendedType.trimmedDescription.starts(with: "JavaClass<")
return classSyntax.extendedType.trimmedDescription.starts(with: "JavaClass")
}
}

Expand Down

0 comments on commit 3f437c3

Please sign in to comment.