Skip to content

Constraints for text unboxed type #307

@kanghyojun

Description

@kanghyojun
@regexp-constraint("[a-zA-Z]+")
unboxed alpha (text);

As #206 suggested, it might be useful if text is validated by the regular expression that gives in an annotation.

Alpha('1234') # error
Alpha("abcABC') # it works

Metadata

Metadata

Assignees

Labels

cat:langCategory: Language designcmp:compilerComponent: Compiler backend (e.g., annotation processors, code generators)dfct:easyDifficulty: Easy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions