winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.76k stars 187 forks source link

fix(compiler): expected type to be "Array", but got "Array" instead #6571

Closed tsuf239 closed 1 month ago

tsuf239 commented 1 month ago

Fixes #3822 I considered a few approaches and concluded that the lightest one would be passing the parent type into the validation function, and then using it (if not None) in the diagnostic message. Updated the validation function calls accordingly. Currently supported only for the Equal and NotEqual binary operators

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

github-actions[bot] commented 1 month ago

Thanks for opening this pull request! :tada: Please consult the contributing guidelines for details on how to contribute to this project. If you need any assistance, don't hesitate to ping the relevant owner over Discord.

Topic Owner
Wing SDK and utility APIs @chriscbr
Wing Console @ainvoner, @skyrpex, @polamoros
JSON, structs, primitives and collections @hasanaburayyan
Platforms and plugins @hasanaburayyan
Frontend resources (website, react, etc) @tsuf239
Language design @chriscbr
VSCode extension and language server @markmcculloh
Compiler architecture, inflights, lifting @yoav-steinberg
Wing Testing Framework @tsuf239
Wing CLI @markmcculloh
Build system, dev environment, releases @markmcculloh
Library Ecosystem @chriscbr
Documentation @hasanaburayyan
SDK test suite @tsuf239
Examples @hasanaburayyan
Wing Playground @eladcon
monadabot commented 1 month ago

Console preview environment is available at https://wing-console-pr-6571.fly.dev :rocket:

Last Updated (UTC) 2024-05-29 12:10
monadabot commented 1 month ago

Benchmarks

Comparison to Baseline ⬜⬜⬜🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜ | Benchmark | Before | After | Change | | :-- | --: | --: | --: | | version | 56ms±0.51 | 57ms±0.78 | +1ms (+2.01%)⬜ | | functions_10.test.w -t sim | 485ms±17.97 | 497ms±18.51 | +12ms (+2.43%)⬜ | | functions_10.test.w -t tf-aws | 2036ms±23.25 | 2025ms±17.32 | -11ms (-0.56%)⬜ | | hello_world.test.w -t sim | 400ms±5.88 | 414ms±16.42 | +13ms (+3.37%)🟥 | | hello_world.test.w -t tf-aws | 1452ms±5.35 | 1459ms±8.46 | +8ms (+0.52%)⬜ | | functions_1.test.w -t sim | 397ms±8.96 | 402ms±5.96 | +5ms (+1.18%)⬜ | | functions_1.test.w -t tf-aws | 812ms±3.9 | 833ms±8 | +21ms (+2.6%)⬜ | | jsii_big.test.w -t sim | 2786ms±11.06 | 2819ms±13.84 | +34ms (+1.21%)⬜ | | jsii_big.test.w -t tf-aws | 3009ms±14.4 | 3032ms±14.69 | +23ms (+0.76%)⬜ | | empty.test.w -t sim | 362ms±3.99 | 364ms±3.02 | +2ms (+0.55%)⬜ | | empty.test.w -t tf-aws | 591ms±4.4 | 600ms±4.13 | +9ms (+1.51%)⬜ | | jsii_small.test.w -t sim | 372ms±2.93 | 379ms±5.79 | +7ms (+1.84%)⬜ | | jsii_small.test.w -t tf-aws | 616ms±7.09 | 622ms±4.14 | +6ms (+1%)⬜ | ⬜ Within 1.5 standard deviations 🟩 Faster, Above 1.5 standard deviations 🟥 Slower, Above 1.5 standard deviations _Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI._
Results |name|mean|min|max|moe|sd| |----|----|----|----|----|----| |version|57ms|56ms|60ms|1ms|1ms| |functions_10.test.w -t sim|497ms|458ms|525ms|19ms|26ms| |functions_10.test.w -t tf-aws|2025ms|1994ms|2070ms|17ms|24ms| |hello_world.test.w -t sim|414ms|396ms|477ms|16ms|23ms| |hello_world.test.w -t tf-aws|1459ms|1438ms|1472ms|8ms|12ms| |functions_1.test.w -t sim|402ms|388ms|414ms|6ms|8ms| |functions_1.test.w -t tf-aws|833ms|814ms|848ms|8ms|11ms| |jsii_big.test.w -t sim|2819ms|2797ms|2855ms|14ms|19ms| |jsii_big.test.w -t tf-aws|3032ms|2996ms|3060ms|15ms|21ms| |empty.test.w -t sim|364ms|357ms|370ms|3ms|4ms| |empty.test.w -t tf-aws|600ms|591ms|613ms|4ms|6ms| |jsii_small.test.w -t sim|379ms|367ms|390ms|6ms|8ms| |jsii_small.test.w -t tf-aws|622ms|612ms|633ms|4ms|6ms|
Last Updated (UTC) 2024-05-29 10:52
mergify[bot] commented 1 month ago

Thanks for contributing, @tsuf239! This PR will now be added to the merge queue, or immediately merged if tsuf/cant-compare-arrays-with-different-types is up-to-date with main and the queue is empty.

monadabot commented 1 month ago

Congrats! :rocket: This was released in Wing 0.74.23.