-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Python generation for type casts (#1000)
### Summary of Changes Previously, the Python generator threw an error, since type casts were not handled. Now, they are handled properly.
- Loading branch information
1 parent
8d22e67
commit 621ab86
Showing
5 changed files
with
14 additions
and
1 deletion.
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
4 changes: 4 additions & 0 deletions
4
...thon/expressions/type casts/generated/tests/generation/expressions/typeCasts/gen_input.py
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 @@ | ||
# Segments --------------------------------------------------------------------- | ||
|
||
def mySegment(p): | ||
a = p |
1 change: 1 addition & 0 deletions
1
.../expressions/type casts/generated/tests/generation/expressions/typeCasts/gen_input.py.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
packages/safe-ds-lang/tests/resources/generation/python/expressions/type casts/input.sdstest
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,5 @@ | ||
package tests.generation.expressions.typeCasts | ||
|
||
segment mySegment(p: Int) { | ||
val a = p as Int; | ||
} |