-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Labels
needs-discussionFurther discussion is needed prior to implFurther discussion is needed prior to impl✨ enhancementNew feature or requestNew feature or request🎨 sdkSDKSDK
Description
Use Case
To reduce bugs with writing code that is reflection heavy and dispatches based on what types have been reflected, it would be preferable to restrict the "kind" field to a fixed set of choices.
Example, instead of:
let t = @type(Array<str>);
assert(t.kind == "array");it can be:
assert(t.kind == std.reflect.TypeId.ARRAY);
// or
assert(t.kind == .ARRAY);Proposed Solution
No response
Implementation Notes
No response
Component
Compiler, SDK
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.
- If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.
Metadata
Metadata
Assignees
Labels
needs-discussionFurther discussion is needed prior to implFurther discussion is needed prior to impl✨ enhancementNew feature or requestNew feature or request🎨 sdkSDKSDK