We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
It looks like the types captured for TestMap in here, cannot capture Properties.
Properties
package main import ( "bytes" "fmt" "os" "kcl-lang.io/kcl-go/pkg/tools/gen" ) const code = ` schema Main: maps: TestMap schema Test: name: str surname: str schema TestMap: [name: str]: Test = {name = name} ` func main() { var buf bytes.Buffer err := gen.GenGo(&buf, fmt.Sprintf("test.k"), code, nil) if err != nil { fmt.Println(err.Error()) os.Exit(1) } fmt.Println(buf.String()) }
type TestMap map[string]Test type Test struct { name string `kcl:"name=name,type=str"` // kcl-type: str surname string `kcl:"name=surname,type=str"` // kcl-type: str } type Main struct { maps *TestMap `kcl:"name=maps,type=TestMap"` // kcl-type: TestMap }
type TestMap struct { } type Test struct { name string `kcl:"name=name,type=str"` // kcl-type: str surname string `kcl:"name=surname,type=str"` // kcl-type: str } type Main struct { maps *TestMap `kcl:"name=maps,type=TestMap"` // kcl-type: TestMap }
0.10.10-darwin-arm64
The text was updated successfully, but these errors were encountered:
/cc @Peefy
Sorry, something went wrong.
Unfortunately, the schema type API does not yet support index signing, and we do not yet support that. cc @zong-zhe @He1pa
He1pa
No branches or pull requests
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
It looks like the types captured for TestMap in here, cannot capture
Properties
.2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
0.10.10-darwin-arm64
The text was updated successfully, but these errors were encountered: