Minres / CoreDSL

Xtext project to parse CoreDSL files
Apache License 2.0
16 stars 3 forks source link

Should we allow zero-bit types? #28

Closed jopperm closed 2 years ago

jopperm commented 2 years ago

For future reference:

@AtomCrafty has a point when he says:

The correct type for the literal 0 would be unsigned<0>, that way it would implicitly convert to signed<1>, and unsigned<1> (aka bool).

AtomCrafty commented 2 years ago

Just to clarify: the idea is not to allow declaring zero-size variables, the unsigned<0> type is merely an implementation detail used during type analysis.

jopperm commented 2 years ago

Seems uncontroversial that such types would be an implementation detail while resolving #29 and #25.