fixes #6609; 'if' expressions support multiple statements; minor breaking change
This commit is contained in:
parent
9212aa9c0c
commit
742f43e572
5 changed files with 91 additions and 17 deletions
|
|
@ -32,3 +32,21 @@ let other = x:
|
|||
echo "no"
|
||||
let outer = y(5):
|
||||
echo "yes"
|
||||
|
||||
|
||||
# bug #6609
|
||||
type
|
||||
TextureInternalFormat = enum RED, RGB, RGBA
|
||||
|
||||
const channels = 4
|
||||
|
||||
let format =
|
||||
if channels == 1:
|
||||
TextureInternalFormat.RED
|
||||
elif channels == 3:
|
||||
TextureInternalFormat.RGB
|
||||
elif channels == 4:
|
||||
TextureInternalFormat.RGBA
|
||||
else:
|
||||
echo "Texture Format Unknown, assuming RGB" #This echo causes an error
|
||||
TextureInternalFormat.RGB
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue