Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Interfaces can be embedded in records with optional<> #402

Open
msjarrett opened this issue Sep 7, 2018 · 1 comment
Open

Interfaces can be embedded in records with optional<> #402

msjarrett opened this issue Sep 7, 2018 · 1 comment
Labels

Comments

@msjarrett
Copy link
Contributor

inty = interface +c { ... }

recy = record {
  field: optional<inty>;
}

This compiles. But remove the optional<...> and you get:
Interface reference cannot live in a record

@artwyman artwyman added the bug label Sep 11, 2018
@artwyman
Copy link
Contributor

Seems like a bug, though the fix is to update the error-checking to disallow this case.
As separate goal might be to support interfaces in records, though that would be a larger feature-request, and violate the "records are pure data" separation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants