# VSCode naming conflict issue

**URL:** <https://discourse.processing.org/t/vscode-naming-conflict-issue/48578>\
**Category:** Beginners\
**Created:** [May 21, 2026, 8:26pm UTC](https://discourse.processing.org/t/vscode-naming-conflict-issue/48578 "2026-05-21T20:26:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![metrixgo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/metrixgo/32/21817_2.png) [@metrixgo](https://discourse.processing.org/u/metrixgo)\
**Post date:** [May 21, 2026, 8:26pm UTC](https://discourse.processing.org/t/vscode-naming-conflict-issue/48578/1 "2026-05-21T20:26:01Z")

</div>

So I made a project in processing and I used VSCode processing extension as the editor. In the code I created:

```processing
abstract class Obstacle{...}
class Rectangle extends Obstacle{...}
class Beam extends Obstacle{...}
class Ellipse extends Obstacle{...}

```

And then the editor popped out the error:

```auto
The class “Beam” cannot have the same name as your sketch or its enclosing class

```

When I renamed the Beam class to something else, the error disappears shortly, but when I restarted VSCode it appears again, no matter what I rename it to. Weirdly other classes did not error, which have the exact same inheritance and structure.

I didn’t get this error using the [processing.org](http://processing.org)’s editor, so that’s kinda weird. Does anyone using VSCode know if it’s an editor issue or my code issue?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [May 22, 2026, 1:14am UTC](https://discourse.processing.org/t/vscode-naming-conflict-issue/48578/2 "2026-05-22T01:14:34Z")

</div>

> [@metrixgo](#):
>
> ```auto
> The class “Beam” cannot have the same name as your sketch or its enclosing class
> 
> ```
> 
> When I renamed the Beam class to something else, the error disappears shortly,

Maybe you have the name “Beam” as 1 of your project’s filenames? 🤔

> [@metrixgo](#):
>
> , but when I restarted VSCode it appears again, no matter what I rename it to.

Maybe the “VSCode Processing Extension” is still caching the original class name somehow? 🤷‍♂️
