Skip to content

dsl-v2: record フィールドの読み取り(todo.id)の lowering 未対応 #112

Description

@redpeacock78

現状

record フィールドへの代入(todo.done = true)は lowering 済みだが、読み取り(let x = todo.id / return todo.id)は emit: unsupported node kind: DOT の診断 + exit 1 で拒否される。

fail-safe 原則(未対応構文は診断 + exit 1)には沿っており安全側。ただし record を書けるのに読めない非対称があり、診断文言も不親切。

なお v1 は同じ入力で生 DSL 構文(return todo.id)を exit 0 で残す fail-safe バグがあったため、v2 の拒否は v1 より改善している。

対応案

  • DOT 読み取りを todo["id"] への lowering として実装する(Bool フィールドは todo["id:bool"] キーサフィックスプロトコルに注意)
  • あわせて診断文言を「record field read is not supported yet」等の親切な形式にする

出典

dsl-v2 最終 whole-branch レビュー Minor #9(wave 29 でも持ち越し記録あり)。

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions