Skip to content

Conversation

@chunkerchunker
Copy link
Contributor

This is a proposed fix for #947. Not sure if it's the best way to fix the issue..

ymc9 and others added 3 commits January 6, 2024 11:59
FIxes compilation for the following schema:

model Test {
  id    String @id
  props TestEnum[] @default([])
}

enum TestEnum {
  A
  B
}
@ymc9 ymc9 changed the base branch from main to dev January 15, 2024 12:36
@ymc9
Copy link
Member

ymc9 commented Jan 15, 2024

Hi @chunkerchunker , thanks for making this change! I've made a modification to cover the case where the attribute's argument type is any or any[] in a more generic way. It should be functionally equivalent to your fix, but I feel it's a bit more extensible for the future.

The type compatibility checking part is a bit messy indeed ...

@ymc9
Copy link
Member

ymc9 commented Jan 15, 2024

I'll merge it when CI passes and will include it in the upcoming 1.7.0 release.

@ymc9 ymc9 merged commit 2acfcdb into zenstackhq:dev Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants