-
Notifications
You must be signed in to change notification settings - Fork 61
Refactored literal type casting from flytepropeller #387
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Daniel Rammer <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #387 +/- ##
==========================================
+ Coverage 76.11% 76.78% +0.67%
==========================================
Files 18 19 +1
Lines 1390 1469 +79
==========================================
+ Hits 1058 1128 +70
- Misses 280 281 +1
- Partials 52 60 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 16 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
} | ||
} | ||
// If t is an enum, it can be created from a string as Enums as just constrained String aliases | ||
if t.literalType.GetEnumType() != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use &&
with the conditions
// CastsFrom is a trivial type checker merely checks if types match exactly. | ||
func (t trivialChecker) CastsFrom(upstreamType *core.LiteralType) bool { | ||
// If upstream is an enum, it can be consumed as a string downstream | ||
if upstreamType.GetEnumType() != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use && with the conditions
@@ -0,0 +1,367 @@ | |||
package coreutils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this module was just providing type checking for upstream and downstream nodes. I think the naming of this file is a bit weird. or can you add more comments to explain what exactly this module does?
@@ -0,0 +1,140 @@ | |||
package coreutils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here, the naming of the file does not describe what this module is doing
TL;DR
To allow re-use of literal casting in other repositories this PR refactors the code out of flytepropeller.
Type
Are all requirements met?
Complete description
^^^
Tracking Issue
NA
Follow-up issue
NA