add test
This commit is contained in:
committed by
Andrew Kelley
parent
07f64a2e13
commit
59b6483d63
@@ -0,0 +1,24 @@
|
||||
export fn entry1() void {
|
||||
var f: f32 = 54.0 / 5;
|
||||
_ = f;
|
||||
}
|
||||
export fn entry2() void {
|
||||
var f: f32 = 54 / 5.0;
|
||||
_ = f;
|
||||
}
|
||||
export fn entry3() void {
|
||||
var f: f32 = 55.0 / 5;
|
||||
_ = f;
|
||||
}
|
||||
export fn entry4() void {
|
||||
var f: f32 = 55 / 5.0;
|
||||
_ = f;
|
||||
}
|
||||
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:23: error: ambiguous coercion of division operands 'comptime_float' and 'comptime_int'; division has non-zero reminder '4'
|
||||
// :6:21: error: ambiguous coercion of division operands 'comptime_int' and 'comptime_float'; division has non-zero reminder '4'
|
||||
Reference in New Issue
Block a user