Skip to content

jit:true on anonymous class falls through to AOT #549

Description

@Brooooooklyn

jit: true on an anonymous class falls through to AOT compilation.

Upstream downlevel_decorators_transform / the annotation handlers' jitForced path has no name requirement — jitDeclarations.add(node) registers the class node regardless. In this implementation find_jit_forced_decorator is only reached under a class.id.is_some() gate (component/transform.rs), so:

export default @Component({ jit: true, selector: 'c', template: 'x' }) class {}

gets an ɵcmp here while ngtsc downlevels its decorators and emits no definition. Needs a synthetic name or a name-free jit path.

Found in PR #548 review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions