-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect multiplication of number by string #208
Comments
This comment was originally written by [email protected] Added Area-Compiler, Triaged labels. |
We allow DartC to optimize under the assumption that checked mode would not encounter any AssertionError. Since operator* on num expects a num, checked mode would complain for 7*'8'. The assumptions are hence violated and the behavior thus undefined. |
This comment was originally written by [email protected] No more code generation in dartc, so the behavior at runtime should no longer be an issue. Added WontFix label. |
This bites us on Angular - dart:collection and angular's collection (facade) lib smash on top of each other, silently causing issues. We'll need a better naming convention - perhaps we should use the lib name and require uniqueness. Fixes #208 [email protected] Review URL: https://codereview.chromium.org/1145243013
… dartdoc, html, term_glyph, test, webdev, yaml_edit Revisions updated by `dart tools/rev_sdk_deps.dart`. boolean_selector (https://github.com/dart-lang/boolean_selector/compare/28dc03d..9fd3bae): 9fd3bae 2023-04-04 dependabot[bot] Bump actions/checkout from 3.3.0 to 3.5.0 (#44) browser_launcher (https://github.com/dart-lang/browser_launcher/compare/ba4e028..ed11524): ed11524 2023-04-04 dependabot[bot] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (#40) clock (https://github.com/dart-lang/clock/compare/93d9f56..6b2004c): 6b2004c 2023-04-04 dependabot[bot] Bump actions/checkout from 3.3.0 to 3.5.0 (#47) crypto (https://github.com/dart-lang/crypto/compare/8a03816..1cb1528): 1cb1528 2023-04-04 dependabot[bot] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (#142) csslib (https://github.com/dart-lang/csslib/compare/5836863..44bfbe3): 44bfbe3 2023-04-04 dependabot[bot] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (#176) dartdoc (https://github.com/dart-lang/dartdoc/compare/1a7952b..a0755f5): a0755f5f 2023-04-04 Janice Collins Fix example modifiers (#3383) html (https://github.com/dart-lang/html/compare/57b747d..0438b26): 0438b26 2023-04-05 Oleh Prypin Dart 3 compatibility: turn classes into mixins (#208) term_glyph (https://github.com/dart-lang/term_glyph/compare/f6856e2..b110501): b110501 2023-04-04 dependabot[bot] Bump actions/checkout from 3.3.0 to 3.5.0 (#35) test (https://github.com/dart-lang/test/compare/8ea4298..7832931): 78329319 2023-04-04 Devon Carew regenerate mono_repo (#1988) webdev (https://github.com/dart-lang/webdev/compare/e887316..0a2804b): 0a2804bd 2023-04-04 Elliott Brooks Fix DevTools test (#2071) yaml_edit (https://github.com/dart-lang/yaml_edit/compare/386fd33..5f392a1): 5f392a1 2023-04-04 dependabot[bot] Bump actions/checkout from 3.3.0 to 3.5.0 (#48) Change-Id: Ib9ee434634d3116db7ada89a4c31a566a28b5600 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293744 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Devon Carew <[email protected]> Auto-Submit: Devon Carew <[email protected]>
…li_util, clock, convert, crypto, csslib, dartdoc, ecosystem, ffi, fixnum, http, lints, logging, markdown, matcher, mime, native, path, pool, shelf, source_map_stack_trace, sse, stack_trace, stream_channel, string_scanner, term_glyph, test, test_descriptor, test_process, tools, typed_data, watcher, yaml, yaml_edit Revisions updated by `dart tools/rev_sdk_deps.dart`. async (https://github.com/dart-lang/async/compare/b65622a..75efa6c): 75efa6c 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#250) bazel_worker (https://github.com/dart-lang/bazel_worker/compare/c29d162..f950bbf): f950bbf 2023-08-31 Parker Lougheed Regenerate worker protocol protos to add constructors and comments (#78) 9b4c6a0 2023-08-30 Parker Lougheed Update e2e_test dependencies (#79) boolean_selector (https://github.com/dart-lang/boolean_selector/compare/303635d..f255921): f255921 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#50) browser_launcher (https://github.com/dart-lang/browser_launcher/compare/27ec600..1f69393): 1f69393 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#48) cli_util (https://github.com/dart-lang/cli_util/compare/9b7ce78..44118e3): 44118e3 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#88) clock (https://github.com/dart-lang/clock/compare/263e508..1e75f08): 1e75f08 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#55) convert (https://github.com/dart-lang/convert/compare/79ee174..c058c8f): c058c8f 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#86) crypto (https://github.com/dart-lang/crypto/compare/8b704c6..1e26879): 1e26879 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#151) csslib (https://github.com/dart-lang/csslib/compare/7e91228..bd30a1a): bd30a1a 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#188) dartdoc (https://github.com/dart-lang/dartdoc/compare/5fda5eb..695b218): 695b218c 2023-08-30 Sam Rawlins Tidy Category: (#3488) b26af96f 2023-08-30 Sam Rawlins Tidy up library exports (#3487) be35cb00 2023-08-29 Devon Carew Update dependabot.yaml (#3486) 649bb8d2 2023-08-29 Sam Rawlins Migrate to create_api_docs.dart (#3482) ecosystem (https://github.com/dart-lang/ecosystem/compare/f777da7..89e58de): 89e58de 2023-09-01 Hossein Yousefi also install flutter on validate (#160) f95d0f2 2023-09-01 Hossein Yousefi Add use-flutter arg to validate (#159) 8743a9d 2023-09-01 Moritz Pass a parameter for Flutter `firehose` support (#158) 54d1628 2023-08-31 Moritz Setup Flutter in publish workflow (#157) 8fa89c6 2023-08-31 Moritz Add flutter support (#155) 65817bf 2023-08-29 Moritz Switch to Pub API (#152) ffi (https://github.com/dart-lang/ffi/compare/e2c01a9..d36e05a): d36e05a 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#208) fixnum (https://github.com/dart-lang/fixnum/compare/00fa120..87ed065): 87ed065 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#114) http (https://github.com/dart-lang/http/compare/cad7d60..7fb6fd6): 7fb6fd6 2023-08-31 Brian Quinlan Clarify how to set the body without a content type header (#1014) lints (https://github.com/dart-lang/lints/compare/54cd7a0..da44af3): da44af3 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#144) logging (https://github.com/dart-lang/logging/compare/5214987..bcaad0f): bcaad0f 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#147) markdown (https://github.com/dart-lang/markdown/compare/56e75df..6cfd6f1): 6cfd6f1 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#554) 52be591 2023-08-30 Parker Lougheed Fix a few more lints, no longer ignore line length (#552) matcher (https://github.com/dart-lang/matcher/compare/ce8f409..80910d6): 80910d6 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#227) mime (https://github.com/dart-lang/mime/compare/799b398..37ef637): 37ef637 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#104) native (https://github.com/dart-lang/native/compare/5a1361b..a2dfedc): a2dfedc 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#117) 8dfb0d2 2023-09-01 dependabot[bot] Bump nttld/setup-ndk from 1.2.0 to 1.3.1 (#118) path (https://github.com/dart-lang/path/compare/7c2324b..96d9183): 96d9183 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#150) pool (https://github.com/dart-lang/pool/compare/7700102..a5bee35): a5bee35 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#73) shelf (https://github.com/dart-lang/shelf/compare/73edd2b..2926f76): 2926f76 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#376) source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/16e54fd..196d7bf): 196d7bf 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#41) sse (https://github.com/dart-lang/sse/compare/8cc5b11..eeb2588): eeb2588 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#87) 2bb1a6e 2023-09-01 dependabot[bot] Bump nanasess/setup-chromedriver from 2.1.1 to 2.2.0 (#88) stack_trace (https://github.com/dart-lang/stack_trace/compare/4ddd86d..bcf2a0b): bcf2a0b 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#140) stream_channel (https://github.com/dart-lang/stream_channel/compare/e54234f..0ce7ab6): 0ce7ab6 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#94) string_scanner (https://github.com/dart-lang/string_scanner/compare/413b57a..da9142c): da9142c 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#62) term_glyph (https://github.com/dart-lang/term_glyph/compare/423700a..1b28285): 1b28285 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#41) test (https://github.com/dart-lang/test/compare/d0fc4bd..27dcae1): 27dcae11 2023-09-01 dependabot[bot] Bump github/codeql-action from 2.21.2 to 2.21.5 (#2086) cf0a0a73 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#2085) test_descriptor (https://github.com/dart-lang/test_descriptor/compare/36d8617..030193d): 030193d 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#55) test_process (https://github.com/dart-lang/test_process/compare/b360784..2a6ee23): 2a6ee23 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#47) tools (https://github.com/dart-lang/tools/compare/b72fae8..2c8cbd6): 2c8cbd6 2023-09-01 Jonas Finnemann Jensen Extension discovery 2.0.0 (#156) 3e12c2e 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#157) 0f28f80 2023-08-28 Kenzie Davisson Prepare extension_discovery for 1.0.1 release (#154) typed_data (https://github.com/dart-lang/typed_data/compare/a20be90..80e8943): 80e8943 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#72) watcher (https://github.com/dart-lang/watcher/compare/7457413..1aed03e): 1aed03e 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#149) yaml (https://github.com/dart-lang/yaml/compare/7930148..ae00187): ae00187 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#150) yaml_edit (https://github.com/dart-lang/yaml_edit/compare/87dcf31..4a9734d): 4a9734d 2023-09-01 dependabot[bot] Bump actions/checkout from 3.5.3 to 3.6.0 (#56) 83f9033 2023-07-01 dependabot[bot] Bump actions/checkout from 3.5.2 to 3.5.3 (#54) Change-Id: Ie6b9d9ef138730b98e9df8cbb31c6cc330ada9f8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323703 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Devon Carew <[email protected]>
…ystem, json_rpc_2 Revisions updated by `dart tools/rev_sdk_deps.dart`. benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/e59f675..a62e416): a62e416 2023-12-14 Kevin Moore Require Dart 3.2, pub dependencies, cleanup analysis_options (#97) cli_util (https://github.com/dart-lang/cli_util/compare/500dffa..e5b38ac): e5b38ac 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#96) 91540ca 2023-12-20 Kevin Moore blast_repo fixes (#95) 1fd87c1 2023-12-15 Devon Carew require dart 3.0; rev to 0.4.1 in prep for publishing (#93) convert (https://github.com/dart-lang/convert/compare/3503170..f8a72d6): f8a72d6 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#98) e6b0558 2023-12-18 Kevin Moore Enable and fix new lints (#97) 39e5ca6 2023-12-18 Kevin Moore blast_repo fixes (#96) crypto (https://github.com/dart-lang/crypto/compare/f3e64d2..63e9a90): 63e9a90 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#160) f2c79ed 2023-12-19 Kevin Moore blast_repo fixes (#157) csslib (https://github.com/dart-lang/csslib/compare/17346e5..1ad2d1e): 1ad2d1e 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#195) 1325d75 2023-12-18 Kevin Moore blast_repo fixes (#193) ecosystem (https://github.com/dart-lang/ecosystem/compare/ce707fb..dc44e82): dc44e82 2024-01-02 Moritz Get needed version from API tool in health check (#213) 55251b1 2024-01-02 Moritz De-async health checks (#208) 2587855 2024-01-01 dependabot[bot] Bump peter-evans/create-or-update-comment (#211) 0136c56 2024-01-01 dependabot[bot] Bump actions/upload-artifact from 3.1.3 to 4.0.0 (#210) 82f4b77 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#212) 5e12e96 2024-01-01 dependabot[bot] Bump actions/labeler from 4.3.0 to 5.0.0 (#209) 5d594f4 2023-12-14 Kevin Moore Require/support latest pkg:http (#207) b8679da 2023-12-07 Devon Carew normalize sort order of package listing (#205) json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/460545c..ac1fabd): ac1fabd 2024-01-01 dependabot[bot] Bump actions/stale from 8.0.0 to 9.0.0 (#108) Change-Id: I83fa7042ac1970ae792110093bdcf8c0ec779fda Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344260 Auto-Submit: Devon Carew <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
This issue was originally filed by [email protected]
What steps will reproduce the problem?
print( 7*'8' );
What is the expected output? What do you see instead?
I would expect an exception due to an object of non-numeric type appearing as the argument to the '*' operator on int/num.
Instead I see the output '56'. I suspect a JavaScript automatic string-to-number coercion is happening where it should not be allowed to.
The text was updated successfully, but these errors were encountered: