Added more exception handling after debugging ./examples/byte_for_demo.fun. (0.37.0)
This commit is contained in:
parent
ccd03d3bec
commit
26ddaf161e
12 changed files with 398 additions and 158 deletions
|
|
@ -1,5 +1,14 @@
|
|||
#!/usr/bin/env fun
|
||||
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
* Copyright 2025 Johannes Findeisen <you@hanez.org>
|
||||
* Licensed under the terms of the Apache-2.0 license.
|
||||
* https://opensource.org/license/apache-2-0
|
||||
*/
|
||||
|
||||
// Byte + for-loop demonstration
|
||||
|
||||
print("=== byte with hex literal and clamping ===")
|
||||
|
|
@ -32,6 +41,11 @@ print(typeof(x)) // -> "String"
|
|||
|
||||
/* Expected output:
|
||||
=== byte with hex literal and clamping ===
|
||||
OverflowError: value out of range for uint8
|
||||
*/
|
||||
|
||||
/* Expected output (OLD):
|
||||
=== byte with hex literal and clamping ===
|
||||
255
|
||||
255
|
||||
255
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue