-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 2.0.0 ### Breaking changes - Enums can now only contain the same type. This simplifies their usage greatly in languages that either force you or allow you to choose a backing type for your enum values. It's a breaking change because of the lack of flexibility caused by enforcing only one type, but I think that it's a reasonable change overall. ### Added DLang D was added as a beta language. It needs to be tested in production.
- Loading branch information
Showing
33 changed files
with
1,692 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
enum StringValues { | ||
first = "first" | ||
second = "second" | ||
third = "Third" | ||
fourth = "Fourth" | ||
} | ||
|
||
enum IntValues { | ||
first = 1 | ||
second = 2 | ||
third = 3 | ||
fourth = 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import basicStruct | ||
|
||
struct StructUsingImport { | ||
field: basicStruct.BasicStruct | ||
} | ||
|
||
union UnionUsingImport { | ||
ConstructorWithPayload: basicStruct.BasicStruct | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
struct HasOptionalString { | ||
stringField: ?String | ||
optionalArrayField: ?[]U32 | ||
arrayOfOptionalField: []?U32 | ||
} | ||
|
||
union HasOptionalConstructor { | ||
DoesNot: I32 | ||
Does: ?I32 | ||
HasOptionalStruct: ?HasOptionalString | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
struct BasicStruct { | ||
field1: U32 | ||
field2: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
struct PayloadStruct { | ||
field1: I32 | ||
} | ||
|
||
union BasicUnion { | ||
HasStringPayload: String | ||
HasPayload: PayloadStruct | ||
HasNoPayload | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
struct GenericStruct <T>{ | ||
field: T | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
union GenericUnion <T>{ | ||
HasTPayload: T | ||
HasNoPayload | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.