mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-22 03:01:55 +00:00
Statically eliminate unnecessary branches in generic contexts
In order to use the new compile time type checks in generics, untaken branches must be skipped because these might be invalid.
This commit is contained in:
@ -213,7 +213,7 @@ I = select<i64>(100, 200, false);
|
||||
f = select<f32>(1.25, 2.5, true);
|
||||
F = select<f64>(12.5, 25.0, false);
|
||||
|
||||
if (0) unreachable();
|
||||
if (!i) unreachable();
|
||||
|
||||
// AS specific
|
||||
|
||||
|
Reference in New Issue
Block a user