You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Nemerle implementation doesn't allow to make namespace level macro.
It means that supporting unions requires compiler change.
It is possible to do it using macro-attribute such as:
[Union]
struct color { r : int; g : int; value : long; }
For example 'Dto' macro converts all fields to be public and creates a constructor using 'Record' macroattribute:
// Default visibility is private, changed to public by macro
[Dto] class Task { Name : string; IsDone : bool }
def t = Task("A", true);
pls add a c-like union macro by default.
sample:
will produce a struct with structlayout and struct and fieldoffset
The text was updated successfully, but these errors were encountered: