Skip to content

Weird formatting when assigning function to ref #8049

Closed

Description

@cknitt
let f = ref(ignore)

// Ok
f.contents = () => {
  doA()
  doB()
}

// Weird
f :=
  (
    () => {
      doA()
      doB()
    }
  )

Activity

  1. added theissue type on Dec 4, 2025
  2. self-assigned this
    on Dec 4, 2025
  3. added this to the v12.0.1 milestone on Dec 4, 2025
  4. cknitt commented on Dec 7, 2025

    @cknitt
    MemberAuthor

    And with an attribute, it gets weird in both cases:

    let f = ref(ignore)
    
    f.contents = @attr
    () => {
      doA()
      doB()
    }
    
    f :=
      (
        @attr
        () => {
          doA()
          doB()
        }
      )
  5. modified the milestones: v12.0.1, v12.1 on Dec 8, 2025
  6. modified the milestones: v12.1, v13 on Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions