Skip to content

Commit

Permalink
Fix name resolution errors around alias ancestor types
Browse files Browse the repository at this point in the history
`StructTypeImpl.parent` was not being resolved correctly when the
relevant ancestor was a type alias.
This was because we did an `instanceof StructTypeImpl` check, which is
incompatible with the generated type alias impl classes introduced in
b3b14dd.
  • Loading branch information
Cirras committed Aug 30, 2024
1 parent 4db9844 commit 31e9188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Name resolution errors around alias ancestor types.
- Parsing errors around partial `asm` blocks blocks in conditional branches.
- False positives around case items with multiple values in `CaseStatementSize`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void setAncestors(Set<Type> ancestorList) {
} else {
this.parent =
this.ancestorList.stream()
.filter(StructTypeImpl.class::isInstance)
.filter(Type::isStruct)
.filter(not(Type::isInterface))
.findFirst()
.orElse(TypeFactory.unknownType());
Expand Down

0 comments on commit 31e9188

Please sign in to comment.