dropbox / djinni

A tool for generating cross-language type declarations and interface bindings.
Apache License 2.0
2.88k stars 487 forks source link

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

Open msjarrett opened 6 years ago

msjarrett commented 6 years ago
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 commented 6 years ago

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.