Describe the Bug
def foo(x: int | None) -> None:
...
When using the below playground link, follow these steps to get a wasm panic;
- Open the below link
- Press "Report Issue" button in the sandbox
- Quickly close the newly opened tab with ctrl+w
- Delete the
None part of x: int | None
- Crash/
Pyrefly encountered an internal error: {}.
Note that this is not 100% consistent for me, it sometimes takes repeating the above steps 2-3 times.
Tested on Firefox, Chrome, and Safari, so should not be browser dependent.
Tested on both Windows and IOS, so should not be platform dependent.
Initial panic:
panicked at /rustc/59807616e1fa2540724bfbac14d7976d7e4a3860/library/std/src/sys/pal/wasm/../unsupported/os.rs:52:5:
no filesystem on this platform
Full browser stack trace
Stack:
__wbg_new_227d7c05414eb861@https://pyrefly.org/assets/js/3190.2d555145.js:1:4197
@https://pyrefly.org/571ae969f2f60719.wasm:wasm-function[7574]:0x654b86
@https://pyrefly.org/571ae969f2f60719.wasm:wasm-function[3812]:0x5c9960
@https://pyrefly.org/571ae969f2f60719.wasm:wasm-function[6024]:0x60da20
@https://pyrefly.org/571ae969f2f60719.wasm:wasm-function[7281]:0x64dfcd
@https://pyrefly.org/571ae969f2f60719.wasm:wasm-function[2477]:0x53bae5
@https://pyrefly.org/571ae969f2f60719.wasm:wasm-function[67]:0x9f001
@https://pyrefly.org/571ae969f2f60719.wasm:wasm-function[7087]:0x63cf90
hover@https://pyrefly.org/assets/js/3190.2d555145.js:1:545
14129/F/Se/<@https://pyrefly.org/assets/js/4129.b7cff2d0.js:1:16005
provideHover@https://pyrefly.org/assets/js/4129.b7cff2d0.js:1:6521
provideHover@https://pyrefly.org/assets/js/8285.409e4c69.js:2:288430
11950/d/r</<@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2070264
11950/l/<@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2070030
l@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2069775
11950/d/r</<@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2070194
11950/d/r<@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2070444
d@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2070155
computeAsync@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2103225
46567/computeAsync/<@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2085338
computeAsync@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2085313
46567/_triggerAsyncComputation/this._asyncIterable<@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2074364
N@https://pyrefly.org/assets/js/8285.409e4c69.js:2:529017
_triggerAsyncComputation@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2074344
46567/x/this._firstWaitScheduler<@https://pyrefly.org/assets/js/8285.409e4c69.js:2:2073483
doRun@https://pyrefly.org/assets/js/8285.409e4c69.js:2:524708
onTimeout@https://pyrefly.org/assets/js/8285.409e4c69.js:2:524648
[3190.2d555145.js:1:3243](https://pyrefly.org/assets/js/3190.2d555145.js)
__wbg_error_a6fa202b58aa1cd3 https://pyrefly.org/assets/js/3190.2d555145.js:1
<anonymous> https://pyrefly.org/571ae969f2f60719.wasm:6638680
<anonymous> https://pyrefly.org/571ae969f2f60719.wasm:6068576
<anonymous> https://pyrefly.org/571ae969f2f60719.wasm:6347296
<anonymous> https://pyrefly.org/571ae969f2f60719.wasm:6610893
<anonymous> https://pyrefly.org/571ae969f2f60719.wasm:5487333
<anonymous> https://pyrefly.org/571ae969f2f60719.wasm:651265
<anonymous> https://pyrefly.org/571ae969f2f60719.wasm:6541200
hover https://pyrefly.org/assets/js/3190.2d555145.js:1
Se https://pyrefly.org/assets/js/4129.b7cff2d0.js:1
provideHover https://pyrefly.org/assets/js/4129.b7cff2d0.js:1
provideHover https://pyrefly.org/assets/js/8285.409e4c69.js:2
r https://pyrefly.org/assets/js/8285.409e4c69.js:2
l https://pyrefly.org/assets/js/8285.409e4c69.js:2
l https://pyrefly.org/assets/js/8285.409e4c69.js:2
r https://pyrefly.org/assets/js/8285.409e4c69.js:2
r https://pyrefly.org/assets/js/8285.409e4c69.js:2
d https://pyrefly.org/assets/js/8285.409e4c69.js:2
computeAsync https://pyrefly.org/assets/js/8285.409e4c69.js:2
computeAsync https://pyrefly.org/assets/js/8285.409e4c69.js:2
computeAsync https://pyrefly.org/assets/js/8285.409e4c69.js:2
_asyncIterable https://pyrefly.org/assets/js/8285.409e4c69.js:2
N https://pyrefly.org/assets/js/8285.409e4c69.js:2
_triggerAsyncComputation https://pyrefly.org/assets/js/8285.409e4c69.js:2
_firstWaitScheduler https://pyrefly.org/assets/js/8285.409e4c69.js:2
doRun https://pyrefly.org/assets/js/8285.409e4c69.js:2
onTimeout https://pyrefly.org/assets/js/8285.409e4c69.js:2
More errors happen after, though I have not included the stack traces here as they all stem from the initial wasm panic.
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSImMYABGLrgBT6I0ToAuNAPjQHK50MAJQ0AtAD5%2BgmIgA6AJznoaqmoQ0gANCDILqUUoQ64AtlAoBiGgAVS%2BsIZposefDQDGgyAHMArgqoHBCChMrWAMowMDQAFhwcxHCIAPQpegZGuAo%2BKTDoKZi4HnApXui%2BAUEhBXTZNKgAbqjQqNiwnt4Q-oHBgjS4xH3ocGHoZByxgmKNMApwNTQAvDRyIADMhACMAExrygDacwrZcAC6yn7oEKbE2RwwmGKYEPoewbPLNADk3ejZMG%2Byn%2BHDE%2BgAjn5Xo8xABrGCkMSoDweeBwL7fADuqAU6G%2BIAAvjpkR8YAAxaAwCguHAEEjkAlAA
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
When using the below playground link, follow these steps to get a wasm panic;
Nonepart ofx: int | NonePyrefly encountered an internal error: {}.Note that this is not 100% consistent for me, it sometimes takes repeating the above steps 2-3 times.
Tested on Firefox, Chrome, and Safari, so should not be browser dependent.
Tested on both Windows and IOS, so should not be platform dependent.
Initial panic:
Full browser stack trace
More errors happen after, though I have not included the stack traces here as they all stem from the initial wasm panic.
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSImMYABGLrgBT6I0ToAuNAPjQHK50MAJQ0AtAD5%2BgmIgA6AJznoaqmoQ0gANCDILqUUoQ64AtlAoBiGgAVS%2BsIZposefDQDGgyAHMArgqoHBCChMrWAMowMDQAFhwcxHCIAPQpegZGuAo%2BKTDoKZi4HnApXui%2BAUEhBXTZNKgAbqjQqNiwnt4Q-oHBgjS4xH3ocGHoZByxgmKNMApwNTQAvDRyIADMhACMAExrygDacwrZcAC6yn7oEKbE2RwwmGKYEPoewbPLNADk3ejZMG%2Byn%2BHDE%2BgAjn5Xo8xABrGCkMSoDweeBwL7fADuqAU6G%2BIAAvjpkR8YAAxaAwCguHAEEjkAlAA
(Only applicable for extension issues) IDE Information
No response