sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: terminal
Issue: Windows Terminal cannot be found in the Start Menu
Labels: Issue-Question,Resolution-Answered,Product-Terminal,Needs-Tag-Fix

Due to a recent product name change ("Windows Terminal" => "Terminal"), you may not be able to find Terminal in the start menu by searching for "Windows Terminal".

We're working with the start menu search folks to make sure that it gets aliased -- that work just didn't land in time for the release (sorry!)
Repository: PowerToys
Issue: Highlight window in focus
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

Highlight the current window in FancyZones in a special colour (like AlwaysOnTop), so we quickly know which is the active window for typing.

### Scenario when this would be used?

Anytime I use FancyZones, so I don't type in the wrong spreadsheet/terminal/whatever.

### Supporting information

_No response_
Repository: pytorch
Issue: Removing deprecated `cpp_custom_type_hack`
Labels: oncall: jit,oncall: quantization,triaged,better-engineering

## Context
`at::cpp_custom_type_hack` is a deprecated utility to shepherd arbitrary C++ classes through Python by embedding an owning pointer inside a byte Tensor's storage. It's usage is already heavily discouraged:

https://github.com/pytorch/pytorch/blob/2291981eeae58d1c1bc00fff208abb0ccb0712db/aten/src/ATen/cpp_custom_type_hack.h#L18-L20

`torch/custom_class.h` is now the preferred way to expose C++ classes to Python, however the current uses may be serialized into existing `TorchScript` models so these operators must be changed with forward and backward compatibility in mind.

## Relevant operators

- [ ] `aten::quantized_gru.input_legacy`
- [ ] `aten::quantized_gru.data_legacy`
- [ ] `aten::quantized_lstm.input_legacy`
- [ ] `aten::quantized_lstm.data_legacy`
- [ ] `aten::fbgemm_linear_int8_weight_fp32_activation`
- [ ] `aten::fbgemm_pack_quantized_matrix`
- [ ] `aten::fbgemm_pack_gemm_matrix_fp16`
- [ ] `aten::fbgemm_linear_fp16_weight_fp32_activation`

- [ ] `quantized::linear_prepack_legacy`
- [ ] `quantized::linear_prepack_fp16_legacy`
- [ ] `_quantized::linear_prepack_fp16_legacy`

- [x] `profiler::_record_function_enter` (see #35026)
- [x] `profiler::_record_function_exit` (see #35026)

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @Xia-Weiwen @leslie-fang-intel @robieta @chaekit @aaronenyeshi @nbcsm @guotuofeng @guyang3532 @gaoteng-git @tiffzhaofb @dzhulgakov @davidberard98 @ilia-cher @gdankel @bitfort @ngimel @orionr @albanD @malfet
Repository: go
Issue: x/tools/gopls: -remote=auto doesn't use different addresses for different Go versions
Labels: gopls,Tools

If I start `vim` with `govim` with the `go` in PATH at `go version devel go1.18-9784ef8ab1 Wed Feb 2 16:21:08 2022 +0000 linux/amd64`, and then in another terminal I do the same but with `go` at `go version go1.17.6 linux/amd64`, both end up using the gopls with Go master (roughly 1.18beta2).

I imagine `-remote=auto` should get smarter and realise that they should both use different gopls processes, because the Go packages being loaded may be different. In my case, one of the dependencies uses build tags like `go1.17` and `go1.18`.

@findleyr points me to https://cs.opensource.google/go/x/tools/+/master:internal/lsp/lsprpc/autostart_posix.go;l=40;drc=980829d8a1276d654bdf03f4a38f26eee797d0b1, which does include the buildid of the gopls binary itself, but not the version of Go.

I think we should include all build settings that can affect how the `go list` commands will behave, including:

* `go version`
* `go env` members such as `GOOS`, `GOARCH`, `GOFLAGS`, `CGO_ENABLED`, or `CC` - but not others like `GOMOD` or `GOCACHE`

In fact, we could hash most of `go env` alone, given that we also have the version of Go itself as `GOVERSION`. Hashing the entire thing is likely a bad idea, because some env vars shouldn't matter, and others [aren't deterministic](https://github.com/golang/go/issues/42628).

```
Build info
----------
golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@v0.0.0-20220124164225-97de9ec46646 h1:XVKmWAnc/2QeTRtwIAQ43/oMv9ZrN73SvrSAvW00bhk=
    github.com/BurntSushi/toml@v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
    github.com/google/go-cmp@v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
    golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
    golang.org/x/sys@v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
    golang.org/x/text@v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
    golang.org/x/tools@v0.1.9-0.20220124164225-97de9ec46646 h1:f8aekWvlQQ8ZhD8SL7lOu18dtWslZYl029PN2F0VnS4=
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.3.0-0.dev.0.20220120121056-246e50be7597 h1:YYX8xj3UjOv5K17GjaNsJXycbFalZnPV1JhVTIXt/b4=
    mvdan.cc/gofumpt@v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
    mvdan.cc/xurls/v2@v2.3.0 h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=
```
Repository: TypeScript
Issue: Provide way to link to other files from JSDoc comments 
Labels: Suggestion,In Discussion

# Suggestion



## 🔍 Search Terms

- quickInfo
- markdown
- link
- relative path
- jsdoc

## ⭐ Suggestion

On VS Code, we have a long standing feature request to support relative file paths inside JSDoc comments:  https://github.com/microsoft/vscode/issues/86564


For example, if if I have a file `folder/foo.ts`:

```ts
/**
 * [link](./other.js)
 */
export declare function foo(x: string, y: {}): void
```

Then anywhere the documentation for `foo` is shown, we should render `link` as a clickable link to `folder/other.ts`.

On the VS Code side today, we can support rendering `link` but do not know what relative paths inside the documentation should be relative to


## Proposal
To fix this, I propose that requests that return documentation also include a path that tells us which file the documentation comes from

Here's an example using `quickInfo`:

```
[Trace  - 17:11:37.514] <semantic> Response received: quickinfo (292). Request took 2 ms. Success: true 
Result: {
    "kind": "function",
    "kindModifiers": "export,declare",
    "start": { "line": 4, "offset": 25    },
    "end": { "line": 4, "offset": 28 },
    "displayString": "function foo(x: string, y: {}): void",
    "documentation": [
        {
            "text": "[link](./files.js)",
            "kind": "text",

             // new field
             "file": "/absolute/path/to/folder/foo.ts"
        }
    ],
    "tags": []
}
```

This would likely be a new field on `SymbolDisplayPart`
Repository: godot
Issue: 4.0 alpha1 - new project folder selects installation folder
Labels: bug,platform:windows,topic:editor,usability,regression

### Godot version

4.0 alpha bf0253b

### System information

Windows 10

### Issue description

I have multiple drives and partitioned drives. I will reference all of them as drives for convenience's sake.

I have installed Godot 4.0 at the :F disk. when I first create a project, the default project location is "my documents" in the :C drive. When I select any other drives, the root folders of each drives are selected, but only for the :F drive, the installation folder is selected as default.

(skipping c and d drives because of personal data)

![image](https://user-images.githubusercontent.com/31382049/152395029-92ef934d-8d70-496a-a6d6-18f5840cd18f.png)

![image](https://user-images.githubusercontent.com/31382049/152395131-805067d9-5bb0-4222-97e6-d3b88e4f652e.png)

I hope the images are enough for the explanation.




### Steps to reproduce

New project -> select drive for the path

### Minimal reproduction project

_No response_
Repository: node
Issue: NodeJS picks up includes from a system-wide googletest
Labels: build

### Version

v16.13.2

### Platform

OpenBSD-current

### Subsystem

deps/googletest, cctest

### What steps will reproduce the bug?

* Install an older version of googletest in /usr/local/
* Build node
* gtest and cctest targets will error out, because the build uses headers from /usr/local/include rather than the bundled headers
* Uninstall the system-wide googletest
* Build node
* --> Build succeeds, bundled googletest is picked up

Note: OpenBSD currently has a very old version of googletest in their ports, so the problem may not be apparent anywhere else, as long as there's a close match between node's bundled version and the one installed system-wide.

### How often does it reproduce? Is there a required condition?

Always reproducible.

### What is the expected behavior?

A nodejs build should always use the bundled version of googletest, because there can never be a guarantee that a system-wide installation exactly matches the version that node was developed against. Particularly since googletest does not do releases anymore.

### What do you see instead?

Errors during the build ;)

### Additional information

_No response_
Repository: storybook
Issue: Change actions/checkout@v1 to v2 of chromatic.yml 
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
Prevent a mistake like #17408

**Describe the solution you'd like**
Suggest change actions/checkout@v1 to v2 and add lfs option in `storybook/docs/snippets/common/chromatic-github-action.js.mdx`
From:
```yml
      - uses: actions/checkout@v1
```
To: 
```yml
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          lfs: true
```

**Describe alternatives you've considered**
If want to use lfs, suggest to use v2 in `docs/sharing/publish-storybook.md` .

**Are you able to assist to bring the feature to reality?**
yes, I can

**Additional context**
N/A
Repository: PowerToys
Issue: Global enable/disable of File Explorer add-ons
Labels: Idea-Enhancement,Product-File Explorer

### Description of the new feature / enhancement

Other powertoys have a master toggle to enable or disable them, but File Explorer add-ons does not. This is less than desirable especially since new items that are added are automatically enabled by default.

I would like there to be a master toggle for all the add-ons like the other powertoys, or at least an option not to enable newly added functions by default.

### Scenario when this would be used?

When you don't want to have features automatically enabled when new File Explorer functions are added, especially those that need a restart to disable after the fact.

### Supporting information

_No response_
Repository: go
Issue: cmd/compile/internal/types2: runtime.mapassign1 throws in (*Checker.recordScope) during bootstrapping
Labels: NeedsInvestigation,compiler/runtime

`greplogs --dashboard -md -l -e '^goroutine \d+ .*:\n(?:.+\n\t.*\n)*(?:bootstrap/)cmd/compile/internal/types2'`

[2022-02-03T16:53:55-bec8a10/windows-386-2008](https://build.golang.org/log/7e21096c9bc02405445d2798b2a6e6104348eb7e)

```
runtime stack:
runtime.gothrow(0x11cfeb0, 0x2a)
	C:/workdir/src/runtime/panic.go:503 +0x8e fp=0x6fc50 sp=0x6fc38
runtime.sigpanic()
	C:/workdir/src/runtime/os_windows.go:36 +0x65 fp=0x6fc70 sp=0x6fc50
scanblock(0xc0833fc000, 0x1c4000, 0x0)
	C:/workdir/src/runtime/mgc0.c:311 +0xab0 fp=0x6fdb0 sp=0x6fc70
gc(0x6fee8)
	C:/workdir/src/runtime/mgc0.c:1440 +0x28b fp=0x6fec8 sp=0x6fdb0
runtime.gc_m()
	C:/workdir/src/runtime/mgc0.c:1368 +0x103 fp=0x6ff00 sp=0x6fec8
runtime.onM(0x169a5b0)
	C:/workdir/src/runtime/asm_amd64.s:257 +0x6d fp=0x6ff08 sp=0x6ff00
runtime.mstart()
	C:/workdir/src/runtime/proc.c:818 fp=0x6ff10 sp=0x6ff08

goroutine 1 [garbage collection]:
runtime.switchtoM()
	C:/workdir/src/runtime/asm_amd64.s:198 fp=0xc0834e6a80 sp=0xc0834e6a78
runtime.gogc(0x0)
	C:/workdir/src/runtime/malloc.go:469 +0x1d6 fp=0xc0834e6ab8 sp=0xc0834e6a80
runtime.mallocgc(0x34000, 0xf97360, 0x0, 0x401f89)
	C:/workdir/src/runtime/malloc.go:341 +0x398 fp=0xc0834e6b68 sp=0xc0834e6ab8
runtime.newarray(0xf97360, 0x400, 0x1aba10)
	C:/workdir/src/runtime/malloc.go:365 +0xc8 fp=0xc0834e6ba0 sp=0xc0834e6b68
runtime.hashGrow(0xe158a0, 0xc0823c9230)
	C:/workdir/src/runtime/hashmap.go:744 +0x8d fp=0xc0834e6bd0 sp=0xc0834e6ba0
runtime.mapassign1(0xe158a0, 0xc0823c9230, 0xc0834e6c98, 0xc0834e6c90)
	C:/workdir/src/runtime/hashmap.go:456 +0x56f fp=0xc0834e6c70 sp=0xc0834e6bd0
bootstrap/cmd/compile/internal/types2.(*Checker).recordScope(0xc08200e380, 0x1506d8, 0xc0825466e0, 0xc0834a6a10)
	C:/workdir/go/src/cmd/compile/internal/types2/check.go:580 +0xa6 fp=0xc0834e6cb0 sp=0xc0834e6c70
```

[2021-09-07T14:53:41-21de6bc/linux-amd64-clang](https://build.golang.org/log/b694e9cf0e6fa821452d8ed503abfecdace8b9e1)

(attn @griesemer, @findleyr)
Repository: godot
Issue: Persist the "Export with Debug" checkbox state across editor sessions
Labels: enhancement,topic:editor,usability,topic:export

### Godot version

v3.4.2.stable.mono.official [45eaa2daf]

### System information

w10 64

### Issue description

The user has to disable it every time he runs godot.
If the user disables the "Export in debug mode" option that should be memorized for future sessions.

### Steps to reproduce

Export with the option "Export in debug mode" deactivated.
Close godot
Open godot
Export and check the status of the option, it's activated again.

### Minimal reproduction project

...
Repository: pytorch
Issue: Add Sparsemax function to libtorch
Labels: feature,module: nn,triaged

### 🚀 The feature, motivation and pitch

I would love to see sparsemax https://arxiv.org/abs/1602.02068 implemented in libtorch. There exist some python only implementations (https://github.com/KrisKorrel/sparsemax-pytorch) and (https://github.com/aced125/sparsemax) but these don't work for libtorch.

Would this be a straightforward port so that we can do a sparse softmax without having to rely upon sparse tensors and the poor performance of _sparse_softmax in the cuda implementation which requires lots of cuda stream syncs...

Thoughts?

### Alternatives

_No response_

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345
Repository: PowerToys
Issue: File Explorer warning on cloud based stub files
Labels: Idea-Enhancement,Product-File Explorer

### Description of the new feature / enhancement

we see issues like https://github.com/microsoft/PowerToys/issues/15914 from time to time and it is typically due to the file actually not being on the local file system.

Display a note with something like "This file is not downloaded, please do ...."

### Scenario when this would be used?

inform users that we can't see it since it isn't on the actual device :)

### Supporting information

_No response_
Repository: create-react-app
Issue: We no longer support global installation of Create React App
Labels: needs triage,issue: bug report

<!--
    Please note that your issue will be fixed much faster if you spend about
    half an hour preparing it, including the exact reproduction steps and a demo.

    If you're in a hurry or don't feel confident, it's fine to report bugs with
    less details, but this makes it less likely they'll get fixed soon.

    In either case, please use this template and fill in as many fields below as you can.

    Note that we don't provide help for webpack questions after ejecting.
    You can find webpack docs at https://webpack.js.org/.
-->

### Describe the bug

I'm not comfortable with all of the critical bugs in the recently released CRA 5.0.0, so want to use the most recent reliable v4 instead, 4.0.3.
Can't use `npx create-react-app` any more due to following error.
```
user:~/my-dir$ npx create-react-app@4.0.3 my-new-app

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/
```

npm version: 8.1.0

### Steps to reproduce

Try creating a new react app using CRA.
- `npx create-react-app@4.0.3 your-new-app`
- Get above error, app not created.
- Try removing global install as per the given instructions with `npm uninstall -g create-react-app`
- Has no effect.

### Expected behavior
Should create a new CRA app.
Should not care about latest release.

### Actual behavior
Error.
Repository: node
Issue: Intermittent faiures in parallel/test-vm-timeout-escape-promise-module
Labels: vm,flaky-test

### Test

parallel/test-vm-timeout-escape-promise-module

### Platform

linux

### Console output

```console
..................................................
..
=== release test-vm-timeout-escape-promise-module ===
Path: parallel/test-vm-timeout-escape-promise-module
Error: --- stderr ---
(node:121432) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)


#
# Fatal error in , line 0
# Check failed: module->status() == kErrored.
#
#
#
#FailureMessage Object: 0x7ffce66ae000
 1: 0xbb4644 node::DumpBacktrace(_IO_FILE*) [out/Release/node]
 2: 0xf16d83  [out/Release/node]
 3: 0x3f0ce01 V8_Fatal(char const*, ...) [out/Release/node]
 4: 0x205790e v8::internal::SourceTextModule::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) [out/Release/node]
 5: 0x1f93d30 v8::internal::Module::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Module>) [out/Release/node]
 6: 0x1321153 v8::Module::Evaluate(v8::Local<v8::Context>) [out/Release/node]
 7: 0xcb5a45 node::loader::ModuleWrap::Evaluate(v8::FunctionCallbackInfo<v8::Value> const&) [out/Release/node]
 8: 0x1460842 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [out/Release/node]
 9: 0x145f65d  [out/Release/node]
10: 0x145d4a0 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [out/Release/node]
11: 0x2ee22b9  [out/Release/node]
Command: out/Release/node --experimental-vm-modules /home/runner/work/node/node/test/parallel/test-vm-timeout-escape-promise-module.js
--- CRASHED (Signal: 5) ---

===
=== 1 tests failed
=== 1 tests CRASHED
===
make[1]: *** [Makefile:528: test-ci] Error 1
make: *** [Makefile:557: run-ci] Error 2
Error: Process completed with exit code 2.
0s
```


### Build links

Failed in asan action:

https://github.com/nodejs/node/runs/5056354146?check_suite_focus=true

### Additional information

_No response_
Repository: go
Issue: cmd/go: "Access is denied." errors for .partial files in 'go mod download' on Windows
Labels: OS-Windows,NeedsInvestigation

`greplogs --dashboard -md -l -e '\.partial: Access is denied\.'`

[2022-02-03T16:13:58-bb28937-b004470/windows-amd64-longtest](https://build.golang.org/log/5a915408f6c9682ec3923bb1eba7a6c91e4a0b62)
[2021-11-29T19:21:29-48cbe7f-4325c37/windows-amd64-longtest](https://build.golang.org/log/1092f2705408a94736dc26025dcb936dab073e9c)
[2021-04-19T14:51:24-0739314-b21e739/windows-386-2008](https://build.golang.org/log/1b35d1db47bbd698f6ee440aa963e7fa79af0d0d)

Curiously, this only seems to reproduce through the `x/exp/cmd/gorelease` tests — they may be doing some concurrent operation that isn't covered by the regular `cmd/go` tests.

CC @matloob
Repository: pytorch
Issue: [JIT][Autocasting] Add autocasting & constant propagation as part of freezing
Labels: oncall: jit

### 🚀 The feature, motivation and pitch

In some models, there will be constants frozen into the model, that will end up being cast with `aten:: _autocast_to_reduced_precision`. This could just be applied during freezing & with constant propagation, to avoid extra copying operations during runtime.

Things to watch out for:
* We might still need an autocasting pass at runtime, to handle the `castInputsToWidestType()` cases
* Consider whether there are any issues with running a pre-autocasted/frozen model when [global settings controlling jit autocast are set to false](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/passes/autocast.cpp#L461)
* Issues with dtypes & devices, e.g. what if the user does `frozen_model.cuda()` ?

~NNC support for fusing the casting ops can also be added, see "aten::to" in [tensorexpr_fuser.cpp](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/passes/tensorexpr_fuser.cpp) and [lowerings.cpp](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/tensorexpr/lowerings.cpp#L1354)~ **fusion was added in** #72478

cc @eellison 

### Alternatives

_No response_

### Additional context

_No response_
Repository: flutter
Issue: Add trace events to account for what is happening before preroll
Labels: engine,customer: money (g3),P2,team-engine,triaged-engine

Internal: b/292548350

This is an example frame where the whole `Rasterizer::DrawToSurface` took  `146.313 ms`. It isn't obvious what was happening in the majority of time before pre roll starts.

![image](https://user-images.githubusercontent.com/1006071/152440631-4dff95b9-9100-47b1-9150-580e6ddcca77.png)

There were several frames where this behavior was seen:
![image](https://user-images.githubusercontent.com/1006071/152440887-4505e5f8-ab92-4622-bede-eed02fbbe33c.png)

The trace file for this: [HERE](https://drive.google.com/file/d/1nzec2JJjqHRH0yg2Dm5vLL8cTOFd0XHG/view?usp=sharing). Accessible only by Googlers.
Repository: TypeScript
Issue: Narrow subtype-reduction-prone unions to their narrowest constituent
Labels: Bug,Help Wanted

# Bug Report

Type narrowing doesn't seem to take into account an assignment I made to ensure the variable has the right type.

Maybe related? https://github.com/microsoft/TypeScript/issues/43584#issuecomment-816932485

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

type narrowing assignment 

### 🕗 Version & Regression Information

4.5.4

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about "type narrowing"

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground Link](https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEEQBd5QFzwPYCMBW4qAPmgHYCeA2gLrwkCupoAZgJakjABQXrz8ACijwAvGPiMW7TgEp4Aby7xlaUfBpcAvvBAQAzgj6CAhAEEYMKOQB0rPecvkhMuYpXxkACxhYA7vA5-AFELLBgBGS0uSmtYqGouIA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
declare let a: object | any[] | undefined

if (a === undefined) {
    a = [] // I expect this line to have TS understand that a is any[] from now on
} else if (!Array.isArray(a)) {
    throw new Error()
}
[...a] // complains here because a is object | any[]
```

### 🙁 Actual behavior

`a` has type `object | any[]`

### 🙂 Expected behavior

`a` to have type `any[]`