Skip to content

Memberwise initializer not recognized in #Playground #74

@ethanhuang13

Description

@ethanhuang13

For some reason, @Generable type's memberwise init is not recognized in #Playground.

Environment:

  • macOS 26.2
  • Xcode 26.2

Code to reproduce:

import AnyLanguageModel
import Playgrounds

@Generable
struct FooBar {
  var foo: String
  var bar: Int
}

let fooBar = FooBar(foo: "foo", bar: 0) // OK

func globalFunc() {
  let fooBar = FooBar(foo: "foo", bar: 0) // OK
}

#Playground {
  let fooBar = FooBar(foo: "foo", bar: 0) // Cannot convert value of type 'String' to expected argument type 'GeneratedContent'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions