1 // REQUIRED_ARGS: -w -o-
6 fail_compilation/b3841.d-mixin-32(32): Warning: `char += float` is performing truncating conversion
7 fail_compilation/b3841.d-mixin-32(32): Warning: `int += float` is performing truncating conversion
8 fail_compilation/b3841.d-mixin-32(32): Warning: `long += double` is performing truncating conversion
9 fail_compilation/b3841.d-mixin-32(32): Warning: `char -= float` is performing truncating conversion
10 fail_compilation/b3841.d-mixin-32(32): Warning: `int -= float` is performing truncating conversion
11 fail_compilation/b3841.d-mixin-32(32): Warning: `long -= double` is performing truncating conversion
12 fail_compilation/b3841.d-mixin-32(32): Warning: `char *= float` is performing truncating conversion
13 fail_compilation/b3841.d-mixin-32(32): Warning: `int *= float` is performing truncating conversion
14 fail_compilation/b3841.d-mixin-32(32): Warning: `long *= double` is performing truncating conversion
15 fail_compilation/b3841.d-mixin-32(32): Warning: `char /= float` is performing truncating conversion
16 fail_compilation/b3841.d-mixin-32(32): Warning: `int /= float` is performing truncating conversion
17 fail_compilation/b3841.d-mixin-32(32): Warning: `long /= double` is performing truncating conversion
18 fail_compilation/b3841.d-mixin-32(32): Warning: `char %= float` is performing truncating conversion
19 fail_compilation/b3841.d-mixin-32(32): Warning: `int %= float` is performing truncating conversion
20 fail_compilation/b3841.d-mixin-32(32): Warning: `long %= double` is performing truncating conversion
21 Error: warnings are treated as errors
22 Use -wi if you wish to treat warnings only as informational.
27 void f(string op
, LHS
, RHS
)()
29 // pragma(msg, LHS, " += ", RHS);
42 foreach (string op
; Ops
!("+=", "-=", "*=", "/=", "%="))
47 f
!(op
, long, short)();
48 f
!(op
, float, long)();
49 f
!(op
, double, float)();
51 // Should that really be OK ?
53 f
!(op
, float, double)();
55 // Not OK, truncating conversion.
56 f
!(op
, char, float)();
58 f
!(op
, long, double)();
62 f
!("^^=", int, int)();
63 f
!("^^=", long, int)();
64 f
!("^^=", long, short)();
65 f
!("^^=", float, long)();
66 f
!("^^=", double, float)();
67 // Should that really be OK ?
68 f
!("^^=", float, double)();