Skip to content

Commit

Permalink
Merge pull request #3805 from uchitsa/3663-fail-on-warning-on
Browse files Browse the repository at this point in the history
bug(#3663): fix warnings when failOnWarning switch on
  • Loading branch information
yegor256 authored Jan 11, 2025
2 parents 0a7b8c0 + 8b3bd20 commit aa3bb87
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
2 changes: 2 additions & 0 deletions eo-runtime/src/main/eo/org/eolang/math/e.eo
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@
+version 0.0.0

# The Euler's number.
# A fundamental mathematical constant approximately equal to 2.7182818284590452354.
# When dataized, it represents the base of natural logarithms.
2.7182818284590452354 > e
18 changes: 10 additions & 8 deletions eo-runtime/src/main/eo/org/eolang/negative-infinity.eo
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
+version 0.0.0

# Negative infinity.
# A special floating-point value representing an unbounded quantity less than all real numbers.
# When dataized, it signifies an unbounded lower limit or an unreachable maximum value.
[] > negative-infinity
number FF-F0-00-00-00-00-00-00 > @
$ > floor
Expand All @@ -35,33 +37,33 @@
false > is-integer
error "Can't convert negative infinity to i64" > as-i64

# Tests that $ = x.
# Tests that the value $ is equal to x.
[x] > eq
eq. > @
^.as-bytes
x.as-bytes

# Tests that $ < x.
# Tests that the value $ less than x.
[x] > lt
x > value!
not. > @
or.
(number value).is-nan
^.eq value

# Tests that $ <= x.
# Tests that the value $ less or equal than x.
[x] > lte
x > value!
not. > @
(number value).is-nan

# Tests that $ > x.
# Tests that the value $ greater than x.
false > [x] > gt

# Tests that $ >= x.
# Tests that the value $ greater or equal than x.
^.eq x > [x] > gte

# Multiplication of $ and x.
# Returns the result of the multiplication of $ and x.
[x] > times
x > value!
number value > num
Expand All @@ -75,7 +77,7 @@
^
positive-infinity

# Sum of $ and x.
# Returns the result of the sum of $ and x.
[x] > plus
x > value!
if. > @
Expand All @@ -85,7 +87,7 @@
nan
^

# Difference between $ and x.
# Difference between the values of $ and x.
[x] > minus
x > value!
if. > @
Expand Down
18 changes: 10 additions & 8 deletions eo-runtime/src/main/eo/org/eolang/positive-infinity.eo
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
+version 0.0.0

# Positive infinity.
# A special floating-point value representing an unbounded quantity greater than all real numbers.
# When dataized, it signifies an unbounded upper limit or an unreachable maximum value.
[] > positive-infinity
number 7F-F0-00-00-00-00-00-00 > @
$ > floor
Expand All @@ -35,33 +37,33 @@
false > is-integer
error "Can't convert positive infinity to i64" > as-i64

# Tests that $ = x.
# Tests that the value $ is equal to x.
[x] > eq
eq. > @
^.as-bytes
x.as-bytes

# Tests that $ < x.
# Tests that the value $ less than x.
false > [x] > lt

# Tests that $ <= x.
# Tests that the value $ less or equal than x.
^.eq x > [x] > lte

# Tests that $ > x.
# Tests that the value $ greater than x.
[x] > gt
x > value!
not. > @
or.
(number value).is-nan
^.eq value

# Tests that $ >= x.
# Tests that the value $ greater or equal than x.
[x] > gte
x > value!
not. > @
(number value).is-nan

# Multiplication of $ and x.
# Returns the result of the multiplication of $ and x.
[x] > times
x > value!
number value > num
Expand All @@ -75,7 +77,7 @@
^
negative-infinity

# Sum of $ and x.
# Returns the result of the sum of $ and x.
[x] > plus
x > value!
if. > @
Expand All @@ -85,7 +87,7 @@
nan
^

# Difference between $ and x.
# Difference between the values of $ and x.
[x] > minus
x > value!
if. > @
Expand Down
4 changes: 3 additions & 1 deletion eo-runtime/src/main/eo/org/eolang/tuple.eo
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
+version 0.0.0

# Tuple.
# An ordered, immutable collection of elements.
[head tail] > tuple
# Empty tuple.
# A tuple with no elements. When dataized, it represents an immutable, empty collection.
[] > empty
0 > length

Expand All @@ -37,7 +39,7 @@
# Create a new tuple with this element added to the end of it.
tuple ^ x > [x] > with

# Obtain the length of the tuple.
# Obtain the length value of the tuple.
[] > length
head.length.plus 1 > len!
number len > @
Expand Down
4 changes: 2 additions & 2 deletions eo-runtime/src/main/eo/org/eolang/txt/text.eo
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
^.rec-index-of-substr
idx.plus -1

# Returns `text` in upper case.
# Returns the `text` in upper case.
[] > up-cased
ascii "z" > ascii-z!
ascii "a" > ascii-a!
Expand Down Expand Up @@ -277,7 +277,7 @@
00-00-00-00-00-00-00
char.as-bytes

# Returns `text` in lower case.
# Returns the `text` in lower case.
[] > low-cased
^.up-cased.ascii "Z" > ascii-z
^.up-cased.ascii "A" > ascii-a
Expand Down

0 comments on commit aa3bb87

Please sign in to comment.