-
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
frog is incorrectly saying that String is not Object #469
Comments
This comment was originally written by [email protected] btw, just some background, I actually hit this bug because I did catch(Object e) { assuming I would catch all exception. This failed to catch string exceptions. (Also, I just noticed numbers also don't correctly report themselves as being Object in frog, so this bug is actually more general than String.) |
Yeah, it's turning "is Object" into "instanceof Object" which in JS is false for bools, numbers, strings, null and undefined. When really in Dart it should just be true always. |
Added Fixed label. |
The real issue here is static type errors in dart:html code, which we need to cleanup. But it doesn't appear to ever make sense to use the static type here. [email protected] Review URL: https://codereview.chromium.org/1754783002 .
…_stack_trace, source_maps, see, stack_trace, test, webdev bazel_worker (https://github.com/dart-lang/bazel_worker/compare/9710de6..75a947f): 75a947f 2022-10-18 Nate Bosch Prepare to publish (#63) collection (https://github.com/dart-lang/collection/compare/ca45fc4..efd709f): efd709f 2022-10-18 Kevin Moore Fix doc comment references among other new lints (#253) markdown (https://github.com/dart-lang/markdown/compare/d72ae07..93d0eee): 93d0eee 2022-10-14 Kevin Moore Misc package cleanup, mostly lints (#468) 16781b6 2022-10-14 Kevin Moore CI: update actions, add dependabot (#469) pub_semver (https://github.com/dart-lang/pub_semver/compare/7671359..28159b8): 28159b8 2022-10-14 Devon Carew prep for publishing (#73) source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/72dbf21..8d8078f): 8d8078f 2022-10-18 Devon Carew update ci; prep for publishing (#30) source_maps (https://github.com/dart-lang/source_maps/compare/e93565b..c7e8963): c7e8963 2022-10-18 Devon Carew adjust the min sdk we test against (#68) 4f0b1e2 2022-10-18 Devon Carew update ci; prep for publishing (#67) sse (https://github.com/dart-lang/sse/compare/00084c4..283568d): 283568d 2022-10-14 Devon Carew update ci; prep for publishing (#64) stack_trace (https://github.com/dart-lang/stack_trace/compare/9697e4c..dce0013): dce0013 2022-10-18 Kevin Moore fix changelog link test (https://github.com/dart-lang/test/compare/58beb14..f704d5a): f704d5af 2022-10-17 godofredoc Add scorecard badge to test repo. (#1774) webdev (https://github.com/dart-lang/webdev/compare/69aac60..5343edb): 5343edb 2022-10-17 Elliott Brooks (she/her) Migrate more files to null-safety (#1758) ce498c2 2022-10-14 Elliott Brooks (she/her) Migrate `configuration.dart` and `shared.dart` to null-safety (#1757) Change-Id: I8859b1abc22f630c2136a69b0ad5a836691b9dbd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264881 Auto-Submit: Devon Carew <[email protected]> Commit-Queue: Devon Carew <[email protected]> Reviewed-by: Kevin Moore <[email protected]>
bazel_worker (https://github.com/dart-lang/bazel_worker/compare/75a947f..03717ca): 03717ca 2022-10-19 Parker Lougheed Fix changelog mention of required SDK version (#64) html (https://github.com/dart-lang/html/compare/0740fc7..0bf6019): 0bf6019 2022-10-19 Devon Carew rev the package version in preparation for publishing (#190) markdown (https://github.com/dart-lang/markdown/compare/d72ae07..93d0eee): 93d0eee 2022-10-14 Kevin Moore Misc package cleanup, mostly lints (#468) 16781b6 2022-10-14 Kevin Moore CI: update actions, add dependabot (#469) source_maps (https://github.com/dart-lang/source_maps/compare/c7e8963..b031e2c): b031e2c 2022-10-19 Devon Carew Update README.md (#69) webdev (https://github.com/dart-lang/webdev/compare/5343edb..a02f073): a02f073 2022-10-19 Daco Harkes Support `--source` in `FrontendServerClient` (#1760) Change-Id: I16a0c8b2d6457874e3848a58f1e4fd1650a8d894 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265002 Auto-Submit: Devon Carew <[email protected]> Commit-Queue: Nate Bosch <[email protected]> Reviewed-by: Nate Bosch <[email protected]>
This issue was originally filed by [email protected]
Small example here:
main() {
String s = "hello";
if (s is Object) {
print("yes, String is Object");
} else {
print("no, String is not Object");
}
print("done");
}
frog is printing out:
no, String is not Object
done
whereas the dart vm is printing out:
yes, String is Object
done
(I'm assuming this is a frog bug, not a vm bug, so triaging to Area-Frog.)
The text was updated successfully, but these errors were encountered: