Problem: incorrect type index return for asset when asset-category is given precedence in declaration.
Example:

Fix: update each method to do a full string match, not a prefix match.
|
.findIndex((line: string) => line.trim().startsWith(`${extension ? "extend " : ""}type ${typeName}`)) + skipIndex |
|
return strings.HasPrefix(strings.TrimSpace(line), "type "+typeName) |
|
return findLine(line -> line.trim().startsWith("type " + typeName), skipIndex); |
Problem: incorrect type index return for
assetwhenasset-categoryis given precedence in declaration.Example:

Fix: update each method to do a full string match, not a prefix match.
language/pkg/js/util/line-numbers.ts
Line 23 in 7d0da9b
language/pkg/go/utils/line-numbers.go
Line 16 in 7d0da9b
language/pkg/java/src/main/java/dev/openfga/language/validation/Dsl.java
Line 50 in 7d0da9b