Skip to content

Commit a6f6b5b

Browse files
authored
reserve syntax that could be used for computed field types (#18466) (#26816)
1 parent 033b722 commit a6f6b5b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/julia-syntax.scm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,16 @@
862862
(if (not (symbol? v))
863863
(error (string "field name \"" (deparse v) "\" is not a symbol"))))
864864
field-names)
865+
(for-each (lambda (t)
866+
(if (expr-contains-p (lambda (e)
867+
(and (pair? e) (eq? (car e) 'call)
868+
(expr-contains-p (lambda (a) (memq a params))
869+
e)))
870+
t)
871+
(error (string "unsupported field type expression \""
872+
(deparse t)
873+
"\""))))
874+
field-types)
865875
`(block
866876
(scope-block
867877
(block

0 commit comments

Comments
 (0)