sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: `cannot infer type` when expression is logically negated in closure
Labels: A-closures,T-compiler,A-inference,C-bug

Hi! I’m pretty new to Rust, but I think I just encountered a bug in the compiler. 

For some reason, Rust cannot “infer” the type of `!a[i]`  in this code:

```rust
pub fn myfunction(x: &Vec<bool>) {
    let closure = |i, a: &Vec<bool>| { !a[i] };
    closure(0, x);
}
```

```
error[E0282]: type annotations needed
 --> main.rs:2:40
  |
2 |     let closure = |i, a: &Vec<bool>| { !a[i] };
  |                                        ^^^^^ cannot infer type

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
```

But when you replace `!a[i]` with just `a[i]`, then it compiles without error. So the error only occurs when there is a logical negation.

While narrowing this down, I also noticed that the error message appears to be a bit misleading: It looks like the compiler actually fails to infer the type of `i`, not `!a[i]`, as the error goes away when I add a type annotation for `i`. Here is a more elaborate example, combining all of my three test cases:

```rust
pub fn myfunction(x: &Vec<bool>) {
    let one = |i, a: &Vec<bool>| {
        a[i]  // ok
    };
    let two = |i, a: &Vec<bool>| {
        !a[i] // cannot infer type
    };
    let three = |i: usize, a: &Vec<bool>| {
        !a[i] // ok
    };

    one(0, x);
    two(0, x);
    three(0, x);
}

fn main() {
}
```

[Run it on Rust Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6c04ee64f11784c866832516ded900ee)

Reproduces on Stable, Beta and Nightly.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"chenyukang"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: godot
Issue: Editor: Horizontal Scrollbar adding wide right side margin even when there is no Vertical Scrollbar visible.
Labels: bug,confirmed,topic:gui

### Godot version

4.0, Beta 10

### System information

Manjaro Linux x86_64, Vulkan, NVIDIA GeForce GTX 1650

### Issue description

On scene tree viewer, everytime Vertical Scrollbar visible, godot add margin on the right so that the Visibility Icon (eyes) doesn't get covered by scrollbar.

**However** this margin is also applied even if there is only Horizontal Scrollbar present, which is unnecessary because there is no scrollbar covering the eyes.

![Screenshot from 2022-12-26 00-45-16](https://user-images.githubusercontent.com/23167087/209477509-9123b31c-272f-4935-b20b-cf70e8de2dfe.png)

In the screenshot above, the effect is exaggerated using custom theme, but this issue also happened on default theme.


### Steps to reproduce

Try dragging scene tree dock until either scrollbar appear or disappear.

[Peek 2022-12-26 00-27.webm](https://user-images.githubusercontent.com/23167087/209477733-50e3e4f1-6233-427f-a639-05d5b96ca3ef.webm)


### Minimal reproduction project

Project with long node names: [EmptyProject.zip](https://github.com/godotengine/godot/files/10300448/EmptyProject.zip)

Theme I'm using:
[vertex-godot-theme.res.zip](https://github.com/godotengine/godot/files/10300452/vertex-godot-theme.res.zip)
This theme is not required for reproduction. But it will make the difference clearer.
To install this, go to Editor > Editor Settings > Interface/Theme. Then set Custom Theme to `vertex.res` file.


### Godot 3

In Godot 3, the bug didn't happen but the Horizontal Scrollbar doesn't appear at all.
Repository: next.js
Issue: _document.tsx imports causes full page reload
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

nextjs 12.3/13

In the repo I setup a new app with:

_document.tsx -> ../foo/index.ts -> ../foo/Foo.tsx

If I edit Foo.tsx it will do a full page reload
If I add another export in ./foo/index.ts for -> Bar.tsx and edit this file, it will also do a page reload.

### Which area(s) of Next.js are affected? (leave empty if unsure)

_No response_

### Link to the code that reproduces this issue

https://codesandbox.io/s/winter-leftpad-2tgntn

### To Reproduce

codesandbox

### Describe the Bug


In the repo I setup a new app with:

_document.tsx -> ../foo/index.ts -> ../foo/Foo.tsx

If I edit Foo.tsx it will do a full page reload
If I add another export in ./foo/index.ts for -> Bar.tsx and edit this file, it will also do a page reload.

### Expected Behavior

fast refresh when Bar is edited

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: godot
Issue: AcceptDialog.add_button() "action" argument is optional but has useless default value
Labels: discussion,documentation,topic:gui

### Godot version

v3.5.stable.official [991bb6ac7]

### System information

Windows 10

### Issue description

The signature of the `add_button()` method of the `AcceptDialog` is documented as follows:

> Button add_button ( String text, bool right=false, String action="" )

And the `action` argument is documented as:

>  action will be passed to the custom_action signal when pressed.

So, it seems to be an optional argument with a default value of `""`. However, unless a non-empty string value is supplied for the `action` argument, the newly added button won't _do_ anything. Looking at the code, that's because of this ([code link](https://github.com/godotengine/godot/blob/34df77285c68dd11c43571c90d41d803f2f97f5a/scene/gui/dialogs.cpp#L309)):

```	
if (p_action != "") {
    button->connect("pressed", this, "_custom_action", varray(p_action));
}
```



So, the button's `pressed` signal is only connected if the `action` argument is not an empty string (which, again, is the default).

I assume that argument is passed into the callback to allow differentiation of multiple custom actions that all filter through the same function. However, if only a single button is being created, it seems unnecessary.

I'm not sure which of the following is best here, though I'd lean towards no. 2...

1. Update the documentation to make it clear that the argument must be defined (and be non-empty)
2. Update the code to allow the button's `pressed` event to be wired regardless of the value of `action`
3. Update the code to define a non-empty default value for the argument, so it works "out of the box"

With the current documentation, the fact that it doesn't work unless a value is supplied for an apparently "optional" argument is confusing - as noted in [this question](https://godotengine.org/qa/144156/how-to-use-filedialog-add_button-and-custom_action).

### Steps to reproduce

- Run the attached project
- Notice that pressing the `Custom 1` button does nothing
- Notice that pressing the `Custom 2` button prints a message to the console

The difference between the buttons is that the `Custom 1` call to `add_button` does not define the `action` argument.

### Minimal reproduction project

[AcceptDialogIssue.zip](https://github.com/godotengine/godot/files/10300629/AcceptDialogIssue.zip)
Repository: flutter
Issue: "flutter create dirname -t skeleton" creates a stray "build" directory
Labels: tool,a: quality,P2,team-tool,triaged-tool

STEPS TO REPRODUCE

0. `ls -d build` (finds no such directory)
1. `flutter create dirname -t skeleton`
2. `ls -d build` (should find no such directory, but does find one)

EXPECTED RESULTS

A "dirname" directory is created. Nothing outside that directory is affected.

ACTUAL RESULTS

A "build" directory is created next to the "dirname" output directory.


Only seems to happen when using `-t skeleton` (or at least, doesn't happen without it, I didn't check `-t app` et al).
Repository: flutter
Issue: Problems with TextInputAction.send TextInputType.multiline
Labels: a: text input,platform-ios,engine,a: internationalization,dependency: skia,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-ios,triaged-ios

很多三方的键盘[例如搜狗]， 设置之后之后
键盘上面 换行键 和发送键都有了。
但是发送键能正确使用， 换行键点击之后就无法换行了。 是一个空格的效果。
有办法能兼容这两个类型一起都是用吗？

像微信 和QQ等聊天工具都可以 换行和发送一起使用。

Many third-party keyboards [such as Sogou], after setting
Both the line feed key and the send key are available on the keyboard.
However, the Send key can be used correctly. After clicking the Line Feed key, line feed cannot be performed. Is the effect of a space.
Is there a way to be compatible with both types?
Chat tools like WeChat and QQ can be used together with line breaking and sending.

## Steps to Reproduce

`TextField(
          keyboardType: TextInputType.multiline,
          enableInteractiveSelection: true,
          maxLines: 4,
          minLines: 1,
          textInputAction: TextInputAction.send,
          onChanged: (value) {},
          onSubmitted: (value){},
)`



![image](https://user-images.githubusercontent.com/29450740/209492215-e4e28dea-ddfe-479e-aa32-f311df3af1fd.png)

https://user-images.githubusercontent.com/29450740/209492365-c3688f07-1dd0-40bd-bbde-b5ea963910bb.mp4
Repository: rust
Issue: MIR inlining introduces trait solver overflows
Labels: T-compiler,C-bug,A-mir-opt,A-mir-opt-inlining

Code: ([playground](https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=5a83c1722040cd8329a26c8a6e58ba58))
```rust
#![recursion_limit = "1"]

trait A {
    fn f();
}

trait B {}
impl<T: B> A for T {
    fn f() {}
}

trait C {}
impl<T: C> B for T {}

fn _foo<T: B>() {
    <T as A>::f();
}
```

This produces

```
error[E0275]: overflow evaluating the requirement `T: B`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "2"]` attribute to your crate (`test`)
note: required for `T` to implement `A`
 --> test.rs:8:12
  |
8 | impl<T: B> A for T {
  |            ^     ^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0275`.
```

If and only if MIR inlining is turned on. I'm not sure why, but that seems like a bug.

### Meta

`rustc --version --verbose`:
```
rustc 1.68.0-nightly (8dfb33954 2022-12-25)
binary: rustc
commit-hash: 8dfb3395411555e93399671d0c41a4ac9ed62b95
commit-date: 2022-12-25
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6
```

Reproduced by compiling the above code with each of:
```
$ rustc +nightly --crate-type lib -Zinline-mir=no test.rs
$ rustc +nightly --crate-type lib -Zinline-mir=yes test.rs
```

This regressed when MIR inlining was turned on in stable, but since this is just an overflow regression I'm not going to add the label.

@rustbot label +T-compiler +A-mir-opt +A-mir-opt-inlining
Repository: TypeScript
Issue: Conditional type on type argument reports different value when assigned to vs assigned from
Labels: Needs Investigation

# Bug Report

### 🔎 Search Terms

Conditional type, assigned to, assigned from, type arguments

### 🕗 Version & Regression Information

- This is a crash: **no**
- This changed between versions **4.2.3** and **4.3.5**

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.9.4#code/GYVwdgxgLglg9mABFApgZygHgCqJQD1TABM1EBvAXwD4AKASgoChFXkBPABxUWwEZEAXl55CKEmSqIA-MgBOIHgC5EwAIYAbNCgDcLNlC49sAJiEiAZBUqiipazPmLEK9Vt1N9rCAgzI+air85lAKuogA9BGIAKJycnByaNJeiD5gflAmgbxmwqGKOpHRAPIA1p5sab5Q-gBGKgU8wgC2amUoOHx09EVRiOWp6ZkmDU7NiG0dOCY9fdFxCUkplJ7EKBAaanI8oJCwCJPtndg9QXpAA)

### 💻 Code

```ts
function test<T extends {}>() {
    type T1 = T extends {} ? true : false;
    type T2 = T & {} extends {} ? true : false;

    const t1a: T1 = true; // Errors?
    const t2a: T2 = true; // Ok

    const t1b: true = make<T1>(); // Ok
    const t2b: true = make<T2>(); // Errors?
}

declare function make<T>(): T;
```

### 🙁 Actual behavior

1. `true` is not assignable to `T1`.
2. `T2` is not assignable to `true`.

### 🙂 Expected behavior

1. `true` is assignable to `T1`.
2. `T2` is assignable to `true`.
Repository: TypeScript
Issue: It is proposed to add support for multiple jsx factory functions.
Labels: Suggestion,Awaiting More Feedback

# Suggestion

In the same project, when multiple jsx factory functions are required, there will always be complex configurations and type conflicts. It is recommended that you configure file suffixes and type spaces for multiple factory functions in one tsconfig.json. For example:

```json
{
    "compilerOptions": {
        "jsxResolver": [{
            "ext": ".react.tsx",
            "jsxImportSource": "react"
        }, {
            "ext": ".vue.tsx",
            "jsxImportSource": "vue"
        }, {
            "ext": ".mylib.tsx",
            "jsxImportSource": "my-lib"
        }, {
            ...
        }]
    }
}
```

## 🔍 Search Terms

jsx factory, multiple jsx factory, custom jsx factory

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: storybook
Issue: [Bug]: Story component did not load SCSS as expect
Labels: bug,needs triage

### Describe the bug

I follow the docs to support SCSS. But style do not load and style lost.
<img width="1118" alt="image" src="https://user-images.githubusercontent.com/5203240/209537739-7a444f9e-3744-48c0-a88b-8650c1400b8c.png">

My code here:
```
// Button.stories.ts|tsx

import React from 'react';

import { ComponentStory, ComponentMeta } from '@storybook/react';

import Button from './';

export default {
  /* 👇 The title prop is optional.
   * See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
   * to learn how to generate automatic titles
   */
  title: 'MyButton',
  component: Button,
} as ComponentMeta<typeof Button>;

//👇 We create a “template” of how args map to rendering
const Template: ComponentStory<typeof Button> = (args) => <Button {...args}>Button</Button>;

export const Primary = Template.bind({});

Primary.args = {
  type: 'primary',
};
```

```
// main.js
module.exports = {
  stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
  addons: [
    '@storybook/addon-links',
    '@storybook/addon-essentials',
    '@storybook/addon-interactions',
    '@storybook/preset-scss',
  ],
  framework: '@storybook/react',
};
```

```
// component file
import React, { useCallback, useState } from 'react';
import cn from 'classnames';
import { ButtonProps } from '@alifd/next/types/button';
import { Button as NextButton } from '@alifd/next';

import style from './style.module.scss';

const Button: React.FC<ButtonProps> = ({ className, type, size, text, onClick, ...props }) => {
  const [_loading, setLoading] = useState(false);
 
  //...

  return (
    <NextButton
      className={cn(getBtnStyle(), getBtnFontStyle(), className)}
      type={type}
      size={size}
      text={text}
      loading={_loading}
      onClick={_onClick}
      {...props}
    />
  );
};

export default Button;
```




### To Reproduce

As code above
### System

Mac M1

### Additional context

My application use icejs refer: https://v3.ice.work/
Repository: neovim
Issue: LSP: support workspaceSymbol/resolve
Labels: enhancement,lsp

### Feature already in Vim?

_No response_

### Feature description

Language servers are allowed to answer `workspace/symbol` requests with an uri instead of a full location for each found symbol. 
With `workspaceSymbol/resolve` the client then could retrieve the full location for a selected item, see 
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_symbolResolve
Repository: godot
Issue: Clipped camera with h_offset has incorrect behavior
Labels: topic:core,documentation,topic:3d

### Godot version

v3.5.stable.official [991bb6ac7]

### System information

Pop!_OS 22.04 LTS x86_64

### Issue description

When a h_offset is used on the clipped camera the behavior is incorrect. The shape-cast to determine the location of the camera is performed to the origin of the node without the offset. This can result in the camera clipping inside objects. See the image:
![original](https://user-images.githubusercontent.com/36245389/209542310-303521dc-c889-4e0c-9dda-556fe47378cf.png)

I think the shape-cast should be performed to the offset location of the camera. This still does not result in a perfect image, the h_offset needs to be adjusted according to the safe portion of the shape-cast. See the image:
![proposal](https://user-images.githubusercontent.com/36245389/209542454-a9f91843-0942-4bb1-bc0a-d65881b2c711.png)

I think the only significant change that needs to be investigated is that this way the dynamic h_offset should be stored separately from the h_offset set by the user.

I implemented this in gdscript and it works well. The reason I think this should be part of the engine is 2 built-in settings of the same node should not conflict the way they do currently. 

I have been talking about h_offset for simplicity, but the same applies to v_offset exactly the same way.

### Steps to reproduce

Create a scene with a basic camera controller with a clipped camera and add obstructing geometry.
Add arbitrary h_offset to the camera, say 1. 
Observe the behavior when the obstructing geometry clips the camera.

### Minimal reproduction project

N/A
Repository: pytorch
Issue: getting issue 'typeindex' file not found in Littorch-Lite/install/include/ATen/core/custom_class.h
Labels: oncall: mobile

### 🐛 Describe the bug

in   Littorch-Lite/install/include/ATen/core/custom_class.h
#pragma once

#include <typeindex>
#include <memory>

### Versions

Hello Team,
I am using    pod 'LibTorch-Lite','1.13.0.1' in podfile  of iOS app with swift language. while building app getting error  ''typeindex' file not found' in file  Littorch-Lite/install/include/ATen/core/custom_class.h at line number 3.
Kindly Help.
Repository: godot
Issue: Game crashes/freezes the entire computer (Linux and Windows)
Labels: bug,topic:core,needs testing

### Godot version

4.0 dev Beta 9+

### System information

Arch Linux + Radeon RX6800XT, Windows 10 + GeFore GTX 1060

### Video demonstration

https://youtu.be/m8zEIOnCss4

### Issue description

In recent beta versions of Godot 4 me and other users of my game are experiencing entire desktop crashes. For me it's an X11 session crash that restarts the X server, for another user it's their Windows PC freezing and requiring a power cut to reboot.

Here's a `dmesg` log from my system after one such event when Godot 4 Beta 9 crashed when I caused the game to render a lot of particles. A ver ysimilar dmesg log can be seen in the above video with Beta 10 when merely attempting to start a game.

[dmesg.log](https://github.com/godotengine/godot/files/10303548/dmesg.log)

Here's what a user reported to me when testing with Beta 10:

> Downloaded Beta 10 -> Opened Liblast project -> started game -> PC Froze -> Removed pc from plug to restart... 😢
> Tried again after deleting .godot dir... still freezes my pc...
> I'm on windows... I tried gl_compatibility render... opengl... it runs but then shaders break...


### Steps to reproduce

1. Clone the Liblast project with LFS (instructions: https://codeberg.org/Liblast/Liblast#_how_to_edit_the_game)
2. Get Godot 4 Beta 10
3. Load the Liblast project
4. Start the game
5. Desktop crash / computer freeze?
   if not - stop the game and retry

### Minimal reproduction project

I am afraid I don't have one :(
Repository: PowerToys
Issue: Redesign FancyZones Editor for easier getting to edit state management
Labels: Idea-Enhancement,FancyZones-Editor,Area-User Interface

        I'll close the issue since there is no bug presented here. Feel free to open a new issue if any bug occurs.
Thanks!

_Originally posted by @SeraphimaZykova in https://github.com/microsoft/PowerToys/issues/22117#issuecomment-1365225220_
      

The problem is not solved: the bad and confusion prone UX is not solved.
Repository: flutter
Issue: `CupertinoTabScaffold`'s rendered `backgroundColor` is darker than the one that was set.
Labels: framework,f: cupertino,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design

## Steps to Reproduce

Create a new Cupertino App with `CupertinoTabScaffold`'s `backgroundColor` set to white (255, 255, 255, 255).

**Expected results:**

Background should be white.

**Actual results:**

Under Linux, Flutter 3.7.0-1.2.pre and Dart 2.19.0, the results are the following:

- Notice that the background color is gray.
- Try again with other colors, they will look darker than expected.

Maybe the issue does not present itself on an iOS device, however, I don't have one to test this issue at the moment and this should not happen on Linux.

**Reproducible sample (screenshot below):**

```dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(CupertinoApp(
    home: CupertinoTabScaffold(
      backgroundColor: Colors.white,
      tabBar: CupertinoTabBar(
        onTap: (int index) {},
        currentIndex: 0,
        items: myDestinations
            .map((d) => BottomNavigationBarItem(
                  icon: Icon(d.inactiveIconData),
                  activeIcon: Icon(d.activeIconData),
                  label: d.name,
                ))
            .toList(),
      ),
      tabBuilder: (BuildContext context, int index) {
        final pages = myDestinations.map((d) => d.page).toList();
        return CupertinoTabView(
          builder: (BuildContext context) =>
              pages[index].call(), // lazily loaded
        );
      },
    ),
  ));
}

final myDestinations = [
  Destination(
    name: "Abc",
    activeIconData: Icons.abc,
    inactiveIconData: Icons.abc_outlined,
    page: () => Center(
      child: Container(
        color: Colors.white,
        width: 100,
        height: 100,
        child: const Text("Abc"),
      ),
    ),
  ),
  Destination(
    name: "Albums",
    activeIconData: Icons.photo_album,
    inactiveIconData: Icons.photo_album_outlined,
    page: () => Center(
      child: Container(
        color: Colors.white,
        width: 100,
        height: 100,
        child: const Text("Albums"),
      ),
    ),
  ),
];

class Destination {
  final String name;
  final IconData activeIconData;
  final IconData inactiveIconData;
  final Widget Function() page;

  const Destination({
    required this.name,
    required this.activeIconData,
    required this.inactiveIconData,
    required this.page,
  });
}
```

![Screenshot from 2022-12-26 17-02-43](https://user-images.githubusercontent.com/55398763/209566459-c5150ac1-0e79-4017-9cf7-5fb7d83c40f3.png)