Skip to content

Missing parser error for arguments in class fieldΒ #62062

@bvanjoi

Description

@bvanjoi

πŸ”Ž Search Terms

parse, class field, arguments

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.8.3#code/EQVwzgpgBGAuBOBLAxrYBuAUJ5B7AdnFAIbwDmIAthPrGFALxQAsATFjgDbFj0CCUAN6YooqADNcuRiXJUadKAHolMABa4QnACZRYa+LgDuUAA6lIUCPEPwANFABGIWFHy5YmAL5A

πŸ’» Code

"use strict";

const arguments = 42;

class A {
    foo = arguments // should throw parse error, but not
}

πŸ™ Actual behavior

Syntax error not thrown.

πŸ™‚ Expected behavior

Throw syntax error.

Additional information about the issue

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy