mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-14 03:17:28 +00:00
64a6093376
tree-sitter-groovy exposes inheritance via the same `superclass` and `interfaces`/`type_list` fields as tree-sitter-java, but the inheritance- emitting block in `_extract_generic` was gated on `ts_module == "tree_sitter_java"`. Groovy was the only class-based JVM language in the file with no inheritance handler, so every Groovy `extends`/`implements` was silently dropped (contains/methods/imports/calls were unaffected). Widen the gate to include `tree_sitter_groovy`; the existing `_emit_java_parent_type` path handles the identical node shapes verbatim. Adds a base class + interface to the Groovy fixture and two regression tests (extends -> inherits, implements -> implements). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
656 B
Groovy
36 lines
656 B
Groovy
package com.nicklastrange.example
|
|
|
|
import com.nicklastrange.Processor
|
|
import com.nicklastrange.util.Helper
|
|
|
|
class SampleService {
|
|
Processor processor
|
|
|
|
SampleService(Processor processor) {
|
|
this.processor = processor
|
|
}
|
|
|
|
String process(String input) {
|
|
def result = processor.transform(input)
|
|
return Helper.clean(result)
|
|
}
|
|
|
|
private void reset() {
|
|
processor.reset()
|
|
}
|
|
}
|
|
|
|
interface Resettable {
|
|
void reset()
|
|
}
|
|
|
|
class ExtendedService extends SampleService implements Resettable {
|
|
ExtendedService(Processor processor) {
|
|
super(processor)
|
|
}
|
|
|
|
void reset() {
|
|
// no-op
|
|
}
|
|
}
|