Skip to content

A weird bug to look at. #978

Open
Open
@theashggl

Description

@theashggl

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions