mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 23:23:37 +01:00
[PR #319] [MERGED] Fix amending module with abstract class #497
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/319
Author: @bioball
Created: 3/14/2024
Status: ✅ Merged
Merged: 3/15/2024
Merged by: @bioball
Base:
main← Head:fix-abstract-class📝 Commits (1)
b9776f1Fix amending module with abstract class📊 Changes
5 files changed (+28 additions, -2 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/ast/VmModifier.java(+8 -0)📝
pkl-core/src/main/java/org/pkl/core/ast/builder/AstBuilder.java(+6 -2)➕
pkl-core/src/test/files/LanguageSnippetTests/input-helper/modules/Birds.pkl(+12 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/input/modules/amendModule6.pkl(+1 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/modules/amendModule6.pcf(+1 -0)📄 Description
This fixes an assertion error that gets thrown if:
Underneath the hood, the modifiers of the class/typelias object member is considered different from the modifiers on the VmClass/VmTypeAlias values.
The object model skips forcing any explicitly members that are explicitly declared hidden, abstract, or local.
However, it should evaluate any abstract classes found in a module. So, it's incorrect to apply the same modifiers on the class to the object member.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.