-
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.
- Loading branch information
1 parent
62ab741
commit 514d207
Showing
6 changed files
with
56 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// error: invalid cast in expression '-1.0 as uint8', floating-point value of type 'float64' is outside the representable range of integer type 'uint8' | ||
// error: invalid cast in expression '-1.0 as uint8', floating-point value of type 'float64' is outside the representable range of integer type 'uint8' | ||
// note: while evaluating expression at compile time | ||
// error: expression must be a constant expression | ||
function test() | ||
{ | ||
consteval _ = -1.0f64 as uint8; | ||
} |
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,8 @@ | ||
// error: invalid cast in expression '-1.0 as uint8', floating-point value of type 'float32' is outside the representable range of integer type 'uint8' | ||
// error: invalid cast in expression '-1.0 as uint8', floating-point value of type 'float32' is outside the representable range of integer type 'uint8' | ||
// note: while evaluating expression at compile time | ||
// error: expression must be a constant expression | ||
function test() | ||
{ | ||
consteval _ = -1.0f32 as uint8; | ||
} |
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,10 @@ | ||
// error: invalid cast in expression '-1.0 as uint8', floating-point value of type 'float64' is outside the representable range of integer type 'uint8' | ||
// note: while evaluating expression at compile time | ||
// error: failed to evaluate expression at compile time | ||
function test() | ||
{ | ||
(consteval { | ||
let x = -1.0f64; | ||
let _ = x as uint8; | ||
}); | ||
} |
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,10 @@ | ||
// error: invalid cast in expression '-1.0 as uint8', floating-point value of type 'float32' is outside the representable range of integer type 'uint8' | ||
// note: while evaluating expression at compile time | ||
// error: failed to evaluate expression at compile time | ||
function test() | ||
{ | ||
(consteval { | ||
let x = -1.0f32; | ||
let _ = x as uint8; | ||
}); | ||
} |
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,10 @@ | ||
// error: invalid cast in expression '256.0 as uint8', floating-point value of type 'float64' is outside the representable range of integer type 'uint8' | ||
// note: while evaluating expression at compile time | ||
// error: failed to evaluate expression at compile time | ||
function test() | ||
{ | ||
(consteval { | ||
let x = 256.0f64; | ||
let _ = x as uint8; | ||
}); | ||
} |
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,10 @@ | ||
// error: invalid cast in expression '256.0 as uint8', floating-point value of type 'float32' is outside the representable range of integer type 'uint8' | ||
// note: while evaluating expression at compile time | ||
// error: failed to evaluate expression at compile time | ||
function test() | ||
{ | ||
(consteval { | ||
let x = 256.0f32; | ||
let _ = x as uint8; | ||
}); | ||
} |