Skip to main content

PartiallyLabeledFields

rascal-0.40.17

Synopsis

In a tuple or relation all fields should have names or none at all.

Description

The fields in tuples and relations can optionally be labelled with a name. There are only two legal situations:

  • All fields have a label.
  • No field has a label.

This error signals the case that thei fields are partially labelled.

Examples

rascal>tuple[int n, str] T;
|prompt:///|(6,5,<1,6>,<1,11>): either all fields must be labeled, or none.
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/PartiallyLabeledFields|
ok
rascal>rel[str name, int] R;
|prompt:///|(4,8,<1,4>,<1,12>): either all fields must be labeled, or none.
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/PartiallyLabeledFields|
ok