mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
Validation for alias doesn't execute #91
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?
Originally created by @miroslav-filipovic on GitHub (Feb 28, 2024).
I tried following example using 0.25.2 and 0.26.0, but both versions passed with no error.
As far as I understand, this should fail because
isDistinctBywouldn't be unique for each element.Using next example I managed to get error:
which gave following output
I think examples are very similar and both should fail, but latter adds more complexity that I'd like to avoid. Am I doing something completely wrong or this is expected? If any of those are the case, let me know and I will close the issue.
@bioball commented on GitHub (Feb 28, 2024):
Right now, Pkl doesn't execute type checks when you do
new Listing<Type>, ornew Mapping<Type, Type>. This is a known bug.To get these type checks to execute, you need to assign the type to your property.
For example:
@miroslav-filipovic commented on GitHub (Feb 28, 2024):
Nice, thanks!