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
Feature marked incorrectly for Safari 10 #1175
Comments
@chicoxyzzy, by reading the description I thought it was about writing two new subtests (for |
Separate tests are good, but yes, absolutely a test should always fail on a buggy implementation. |
I was not able to cram this issue on the existing subtests, so I added new ones. |
Just upgraded to Safari Version 11.0 (12604.1.38.1.7) today and safari still throws this error with that code snippet 😡 |
Yep, my patch #1183 is not merged yet. |
I believe one of the reasons for not merging is that I haven't actually run the new tests on Safari. Could you do that and comment on the PR if it actually solves your issue? |
So I ran the build and opened up Safari to view it. In the Safari 11 column, it lists |
Yes, the result columns are hard-coded, only the "current browser" column is live. I marked it
|
So since I've upgraded my MacOS, the only easy way I have to test lower Safari versions is through crossbrowsertesting.com, and through that, Safari 10 is actually showing as passing on |
I am starting to believe the test is incomplete. Did you check the code I implemented to see if it should triggers the problem you refer to? |
The code for your tests looks fine. What's troubling is that running code like that, or the snippet at the start of this thread, in the Safari 10 version crossbrowsertesting.com supplies, works without any errors. So I'm thinking the version 10 I had used where the error did occur must have been a different build or patch version, but I no longer have access to find out what that version was. So in short, as far as I can tell, shadow scoping is now not throwing errors and working as expected in Safari 10+ |
OK, I'll fix that in my PR. But I believe you mean 10.1+, right? |
Correct, 10.1.2 to be precise |
OK, I updated the patch to reflect 10.1 results. Now the only version where this makes a difference is 10.0. Can you test it to check if this test is still necessary? |
I don't currently have access to that version. It seems crossbrowsertesting.com only supplies the latest version that comes with a particular MacOS. |
Since #1183 was merged, I believe this issue can now be closed. |
@afmenez, I would suggest that we reopen this issue. #1183 was merged, but in it, only Safari 10 and not 10.1 was marked as having this bug. See https://github.com/kangax/compat-table/blob/gh-pages/data-es6.js#L561. However, Safari 10.1 too has the bug. I’ve made a simple repro: http://safari_10_1_repro.surge.sh/ that includes the following piece of code: function func(a = 1) {
for (let a = 2; ;) {
break;
}
}
func(); I’ve tested it in Safari 10.1 and can confirm that it doesn’t work. We get |
Is it Safari 10.1.0? |
I tested in Safari 10.1.2 (12603.3.8). |
babel-preset-env
, which uses this table, ends up incorrectly excluding a plugintransform-es2015-block-scoping
when targeting support of Safari 10.I believe this is due to the features
const
andlet
under bindings being marked completed but there is a bug in Safari 10, shown here where the followingthrows
SyntaxError: Can't create duplicate variable that shadows a global property: 'a'
References babel/babel-preset-env#411
The text was updated successfully, but these errors were encountered: