Skip to content

Conversation

@timcassell
Copy link
Collaborator

@timcassell timcassell commented Nov 16, 2025

…ntax model for cleaner testing of assignability.

Added BDN1503.
WIP need to do the same for Params.
@silkfire
Copy link
Contributor

Didn't quite follow on the reasoning behind removing a lot of the logic for checking assignability. I don't really want to trigger a diagnostic if the user supplies an illegal value to the attribute, e.g. multidimensional arrays string[][], nullable struct arrays int?[] or reference types that aren't null or string or System.Type.

@timcassell
Copy link
Collaborator Author

Didn't quite follow on the reasoning behind removing a lot of the logic for checking assignability. I don't really want to trigger a diagnostic if the user supplies an illegal value to the attribute, e.g. multidimensional arrays string[][], nullable struct arrays int?[] or reference types that aren't null or string or System.Type.

Much of the logic became unnecessary under the semantic model. The new implementation doesn't check the type of the array passed to the attribute (other than null), it only checks the type of each element.

Updated to handle more cases.
Reverted unknown types test removal.
@timcassell timcassell marked this pull request as ready for review November 17, 2025 03:38
@timcassell timcassell requested a review from silkfire November 17, 2025 04:55
@silkfire
Copy link
Contributor

Was the issue of assigning e.g. a smaller int to a byte resolved? Otherwise looks good to me.

@timcassell
Copy link
Collaborator Author

Was the issue of assigning e.g. a smaller int to a byte resolved? Otherwise looks good to me.

Yes, it's covered by your tests. Thanks.

@timcassell timcassell merged commit b1ebcb8 into master Nov 17, 2025
16 checks passed
@timcassell timcassell deleted the multi-target-analyzers branch November 17, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrading from 0.15.6 to 0.15.7 causes compiler mismatch issues

3 participants