Skip to content

Name collision with globals in files named Object.svelte, Error.svelte, console.svelte… #2947

@trbrc

Description

@trbrc

A component file named Object.svelte, causes name collisions with the global Object.

Repro: https://svelte.dev/repl/dc1ccb7cbd8f47df8aa4ea4f3f318a0d?version=3.4.4

( ! )  Object$1.keys is not a function

This wouldn't be unexpected if users explicitly named components, but when they are named by the compiler based on the file name you'd expect it to deal with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions