Skip to content
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

A weird bug to look at. #978

Open
theashggl opened this issue Oct 15, 2024 · 0 comments
Open

A weird bug to look at. #978

theashggl opened this issue Oct 15, 2024 · 0 comments

Comments

@theashggl
Copy link

🐛 Bug Report

I have a file named Solution.java in the path where I keep all the code files of Leetcode as I solve them. When I tried to open the question 476, the code file opened in the Solution.java file and the contents of the file was that of the code file to code in.

To Reproduce

I don't know if this will happen with someone again. I am on a Windows machine and I have a compiled Solution.java file in a folder where all code files get generated after selecting a question to solve on Leetcode in vscode.

Expected behavior

A separate file named 476.number-compliment.java should be created with contents as follows-:

/*
 * @lc app=leetcode id=476 lang=java
 *
 * [476] Number Complement
 */

// @lc code=start
class Solution {
    public int findComplement(int num) {
        return -(~num) - 1;
    }
}
// @lc code=end

Extension Output

I had the same code mentioned above present in the Solution.java file instead at first. When I clicked on the question again after closing the file, it corrected itself.

Guidance: Press Ctrl+Shift+U, and toggle the channel to LeetCode.

Your Environment

  • os: Windows
  • extension settings:default
  • nodejs version: v19.7.0
  • vscode version: 1.94.2
  • extension version: v0.18.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant