-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from SeeminglyScience/fix-empty-hashtable
Fix empty hashtables, -as, -not, -bor, -band, and IEnumerable<> index expressions If a hashtable expression does not contain elements it now generate a `New` expression instead of a `ListInit` expression. The operators `-band` and `-bor` required conversion for `Enum` types. The comparison is now performed on the underlying type and then converted to the type of the lhs expression if applicable. If an expression was typed as IEnumerable<> specifically (like Linq method results) the indexer was not being inferred correctly. If a switch statement only has a "default" case it will be replaced with an expression that is just the default body and a break label. Forgot to put in support for `-not`, and `-as` was throwing a NRE because of a method resolution error on my part.
- Loading branch information
Showing
6 changed files
with
405 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
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.