From 0081e4e72b6644c032a1d5148675c71a0643a585 Mon Sep 17 00:00:00 2001 From: royalpinto007 Date: Sat, 23 Nov 2024 16:08:51 +0530 Subject: [PATCH] feat(errors): make verrors=context global and update test outputs Signed-off-by: royalpinto007 --- compiler/src/dmd/globals.d | 2 + compiler/src/dmd/mars.d | 4 + compiler/test/compilable/b16976.d | 80 ++- compiler/test/compilable/chkformat.d | 4 +- compiler/test/compilable/compile1.d | 4 +- compiler/test/compilable/ddoc10236.d | 22 +- compiler/test/compilable/ddoc10236b.d | 18 +- compiler/test/compilable/ddoc13502.d | 16 +- compiler/test/compilable/depmsg.d | 52 +- compiler/test/compilable/deprecationlimit.d | 12 +- compiler/test/compilable/interpret3.d | 4 +- compiler/test/compilable/test12567c.d | 4 +- compiler/test/compilable/test19227.d | 4 +- compiler/test/compilable/test19609.d | 12 +- compiler/test/compilable/test20063.d | 8 +- compiler/test/compilable/test21514.d | 32 +- compiler/test/compilable/test23097.d | 20 +- compiler/test/compilable/test324.d | 8 +- compiler/test/compilable/test9701.d | 8 +- compiler/test/compilable/udamodule1.d | 4 +- compiler/test/compilable/verrors_spec.d | 4 +- compiler/test/fail_compilation/aa_init.d | 12 +- compiler/test/fail_compilation/aacmp10381.d | 4 +- .../fail_compilation/alias_instance_member.d | 6 +- .../fail_compilation/alias_instance_member2.d | 10 +- compiler/test/fail_compilation/aliasassign.d | 16 +- compiler/test/fail_compilation/aliasassign2.d | 24 +- compiler/test/fail_compilation/alignedext.i | 16 +- .../test/fail_compilation/already_defined.d | 12 + compiler/test/fail_compilation/array_bool.d | 12 +- .../fail_compilation/attributediagnostic.d | 50 +- .../attributediagnostic_nogc.d | 50 +- .../attributediagnostic_nothrow.d | 40 +- .../attributediagnostic_pure.d | 10 +- compiler/test/fail_compilation/attrpure.i | 4 +- .../test/fail_compilation/auto_ref_inout.d | 8 +- compiler/test/fail_compilation/b15069.d | 8 +- compiler/test/fail_compilation/b15875.d | 8 +- compiler/test/fail_compilation/b15909.d | 4 +- compiler/test/fail_compilation/b16967.d | 8 +- compiler/test/fail_compilation/b17285.d | 12 +- compiler/test/fail_compilation/b17918.d | 2 + compiler/test/fail_compilation/b19523.d | 14 +- compiler/test/fail_compilation/b19685.d | 4 +- compiler/test/fail_compilation/b19691.d | 4 +- compiler/test/fail_compilation/b19691e.d | 12 +- compiler/test/fail_compilation/b19717.d | 12 +- compiler/test/fail_compilation/b19717a.d | 20 +- compiler/test/fail_compilation/b19730.d | 8 +- compiler/test/fail_compilation/b20011.d | 46 +- compiler/test/fail_compilation/b20780.d | 12 +- compiler/test/fail_compilation/b20875.d | 10 + compiler/test/fail_compilation/b6227.d | 16 +- compiler/test/fail_compilation/betterc.d | 12 +- compiler/test/fail_compilation/binexperr.d | 8 +- compiler/test/fail_compilation/biterrors5.d | 8 +- compiler/test/fail_compilation/bitintro.d | 12 +- compiler/test/fail_compilation/bool_cast.d | 18 +- compiler/test/fail_compilation/bug16165.d | 8 + compiler/test/fail_compilation/bug18743.d | 8 +- compiler/test/fail_compilation/bug19569.d | 96 ++-- compiler/test/fail_compilation/bug5.d | 4 +- compiler/test/fail_compilation/bug5b.d | 4 +- compiler/test/fail_compilation/bug8150a.d | 8 +- compiler/test/fail_compilation/bug8150b.d | 12 +- compiler/test/fail_compilation/bug8891.d | 4 +- .../fail_compilation/call_function_type.d | 8 +- compiler/test/fail_compilation/callconst.d | 10 +- compiler/test/fail_compilation/cast_qual.d | 14 +- compiler/test/fail_compilation/ccast.d | 16 +- compiler/test/fail_compilation/cdeprecated.i | 16 +- compiler/test/fail_compilation/cerrors.d | 22 +- .../test/fail_compilation/checkimports2.d | 16 +- compiler/test/fail_compilation/circ10280.d | 8 +- compiler/test/fail_compilation/class1.d | 4 +- compiler/test/fail_compilation/class2.d | 4 +- compiler/test/fail_compilation/commaexp.d | 40 +- compiler/test/fail_compilation/const_ctor.d | 8 +- .../test/fail_compilation/constraints_aggr.d | 20 +- .../test/fail_compilation/constraints_defs.d | 28 +- .../test/fail_compilation/constraints_func1.d | 78 ++- .../test/fail_compilation/constraints_func2.d | 84 ++- .../test/fail_compilation/constraints_func3.d | 48 +- .../test/fail_compilation/constraints_tmpl.d | 24 +- .../fail_compilation/covariant_override.d | 12 +- compiler/test/fail_compilation/cpp_cast.d | 12 +- compiler/test/fail_compilation/cppeh1.d | 4 +- compiler/test/fail_compilation/cppeh2.d | 4 +- compiler/test/fail_compilation/cppmangle.d | 16 +- compiler/test/fail_compilation/cppmangle2.d | 4 +- compiler/test/fail_compilation/cppvar.d | 34 +- compiler/test/fail_compilation/ctfe10995.d | 8 +- compiler/test/fail_compilation/ctfe13612.d | 20 +- compiler/test/fail_compilation/ctfe14207.d | 12 +- compiler/test/fail_compilation/ctfe14465.d | 12 +- compiler/test/fail_compilation/ctfe14731.d | 8 +- compiler/test/fail_compilation/ctor_attr.d | 28 +- compiler/test/fail_compilation/ctypes.d | 8 +- compiler/test/fail_compilation/cwords.d | 16 +- compiler/test/fail_compilation/ddoc_18083.d | 8 +- .../fail_compilation/debugCaseDeclaration.d | 8 +- compiler/test/fail_compilation/dep_d1_ops.d | 166 ++++-- compiler/test/fail_compilation/depmsg15814.d | 4 +- compiler/test/fail_compilation/depmsg15815.d | 4 +- .../test/fail_compilation/deprecate12979a.d | 4 +- .../test/fail_compilation/deprecate12979b.d | 4 +- .../test/fail_compilation/deprecate12979c.d | 4 +- .../test/fail_compilation/deprecate12979d.d | 4 +- .../test/fail_compilation/deprecate1553.d | 4 +- .../deprecate_getVirtualFunctions.d | 8 +- .../test/fail_compilation/deprecated6760.d | 8 +- .../test/fail_compilation/deprecatedImports.d | 28 +- .../test/fail_compilation/deprecateopdot.d | 12 +- compiler/test/fail_compilation/deprecations.d | 22 +- compiler/test/fail_compilation/diag10089.d | 8 +- compiler/test/fail_compilation/diag10099.d | 4 +- compiler/test/fail_compilation/diag10141.d | 4 +- compiler/test/fail_compilation/diag10169.d | 6 +- compiler/test/fail_compilation/diag10221.d | 4 +- compiler/test/fail_compilation/diag10221a.d | 4 +- compiler/test/fail_compilation/diag10319.d | 54 +- compiler/test/fail_compilation/diag10359.d | 4 +- compiler/test/fail_compilation/diag10405.d | 4 +- compiler/test/fail_compilation/diag10415.d | 16 +- compiler/test/fail_compilation/diag10688.d | 8 +- compiler/test/fail_compilation/diag10768.d | 4 +- compiler/test/fail_compilation/diag10783.d | 12 +- compiler/test/fail_compilation/diag10805.d | 16 +- compiler/test/fail_compilation/diag10862.d | 106 ++-- compiler/test/fail_compilation/diag10926.d | 4 +- compiler/test/fail_compilation/diag10984.d | 8 +- compiler/test/fail_compilation/diag11078.d | 12 +- compiler/test/fail_compilation/diag11132.d | 6 +- compiler/test/fail_compilation/diag11198.d | 32 +- compiler/test/fail_compilation/diag11423.d | 4 +- compiler/test/fail_compilation/diag11425.d | 8 +- compiler/test/fail_compilation/diag11756.d | 16 +- compiler/test/fail_compilation/diag11759.d | 4 +- compiler/test/fail_compilation/diag11769.d | 8 +- compiler/test/fail_compilation/diag11819a.d | 84 ++- compiler/test/fail_compilation/diag11819b.d | 72 ++- compiler/test/fail_compilation/diag11840.d | 8 +- compiler/test/fail_compilation/diag12063.d | 28 +- compiler/test/fail_compilation/diag12124.d | 12 +- compiler/test/fail_compilation/diag12280.d | 12 +- compiler/test/fail_compilation/diag12312.d | 8 +- compiler/test/fail_compilation/diag12380.d | 4 +- compiler/test/fail_compilation/diag12432.d | 24 +- compiler/test/fail_compilation/diag12480.d | 4 +- compiler/test/fail_compilation/diag12487.d | 24 +- compiler/test/fail_compilation/diag12640.d | 8 +- compiler/test/fail_compilation/diag12678.d | 20 +- compiler/test/fail_compilation/diag12777.d | 16 +- compiler/test/fail_compilation/diag12829.d | 32 +- compiler/test/fail_compilation/diag13028.d | 24 +- compiler/test/fail_compilation/diag13082.d | 12 +- compiler/test/fail_compilation/diag13142.d | 4 +- compiler/test/fail_compilation/diag13215.d | 4 +- compiler/test/fail_compilation/diag13281.d | 52 +- compiler/test/fail_compilation/diag13320.d | 4 +- compiler/test/fail_compilation/diag13333.d | 12 +- compiler/test/fail_compilation/diag13528.d | 2 + compiler/test/fail_compilation/diag13609a.d | 12 +- compiler/test/fail_compilation/diag13787.d | 8 +- compiler/test/fail_compilation/diag13884.d | 12 +- compiler/test/fail_compilation/diag13942.d | 12 +- compiler/test/fail_compilation/diag14102.d | 16 +- compiler/test/fail_compilation/diag14145.d | 18 +- compiler/test/fail_compilation/diag14163.d | 4 +- compiler/test/fail_compilation/diag14235.d | 12 +- compiler/test/fail_compilation/diag14818.d | 40 +- compiler/test/fail_compilation/diag14876.d | 32 +- compiler/test/fail_compilation/diag15001.d | 4 +- compiler/test/fail_compilation/diag15186.d | 8 +- compiler/test/fail_compilation/diag15209.d | 8 +- compiler/test/fail_compilation/diag15235.d | 4 +- compiler/test/fail_compilation/diag15340.d | 8 +- compiler/test/fail_compilation/diag15411.d | 24 +- compiler/test/fail_compilation/diag1566.d | 24 +- compiler/test/fail_compilation/diag15669.d | 4 +- compiler/test/fail_compilation/diag15713.d | 20 +- compiler/test/fail_compilation/diag15974.d | 16 +- compiler/test/fail_compilation/diag16271.d | 4 +- compiler/test/fail_compilation/diag16499.d | 8 +- compiler/test/fail_compilation/diag16976.d | 128 +++-- compiler/test/fail_compilation/diag16977.d | 24 +- compiler/test/fail_compilation/diag1730.d | 140 +++-- compiler/test/fail_compilation/diag18460.d | 4 +- compiler/test/fail_compilation/diag18574.d | 12 +- compiler/test/fail_compilation/diag19022.d | 8 +- compiler/test/fail_compilation/diag19196.d | 8 +- compiler/test/fail_compilation/diag19225.d | 12 +- compiler/test/fail_compilation/diag20059.d | 8 +- compiler/test/fail_compilation/diag20268.d | 8 +- compiler/test/fail_compilation/diag20518.d | 4 +- compiler/test/fail_compilation/diag21883.d | 4 +- compiler/test/fail_compilation/diag23295.d | 20 +- compiler/test/fail_compilation/diag23355.d | 8 + compiler/test/fail_compilation/diag23384.d | 8 +- compiler/test/fail_compilation/diag2452.d | 4 +- compiler/test/fail_compilation/diag24812.d | 4 +- compiler/test/fail_compilation/diag3013.d | 4 +- compiler/test/fail_compilation/diag3438.d | 24 +- compiler/test/fail_compilation/diag3672.d | 36 ++ compiler/test/fail_compilation/diag3673.d | 4 +- compiler/test/fail_compilation/diag3869.d | 4 +- compiler/test/fail_compilation/diag3913.d | 16 +- compiler/test/fail_compilation/diag4479.d | 4 +- compiler/test/fail_compilation/diag4528.d | 20 +- compiler/test/fail_compilation/diag4540.d | 4 +- compiler/test/fail_compilation/diag4596.d | 16 +- compiler/test/fail_compilation/diag5385.d | 48 +- compiler/test/fail_compilation/diag5450.d | 4 +- compiler/test/fail_compilation/diag6373.d | 4 +- compiler/test/fail_compilation/diag6539.d | 4 +- compiler/test/fail_compilation/diag6677.d | 40 +- compiler/test/fail_compilation/diag6707.d | 8 +- compiler/test/fail_compilation/diag6796.d | 8 +- compiler/test/fail_compilation/diag7050a.d | 8 +- compiler/test/fail_compilation/diag7050b.d | 4 +- compiler/test/fail_compilation/diag7050c.d | 8 +- compiler/test/fail_compilation/diag7420.d | 42 +- compiler/test/fail_compilation/diag7477.d | 8 +- compiler/test/fail_compilation/diag7747.d | 4 +- compiler/test/fail_compilation/diag7998.d | 4 +- compiler/test/fail_compilation/diag8044.d | 4 +- compiler/test/fail_compilation/diag8101.d | 106 +++- compiler/test/fail_compilation/diag8101b.d | 38 +- compiler/test/fail_compilation/diag8178.d | 4 +- compiler/test/fail_compilation/diag8318.d | 24 +- compiler/test/fail_compilation/diag8425.d | 16 +- compiler/test/fail_compilation/diag8510.d | 8 +- compiler/test/fail_compilation/diag8559.d | 8 +- compiler/test/fail_compilation/diag8648.d | 36 +- compiler/test/fail_compilation/diag8684.d | 10 +- compiler/test/fail_compilation/diag8697.d | 8 +- compiler/test/fail_compilation/diag8714.d | 8 +- compiler/test/fail_compilation/diag8777.d | 52 +- compiler/test/fail_compilation/diag8787.d | 4 +- compiler/test/fail_compilation/diag8825.d | 4 +- compiler/test/fail_compilation/diag8892.d | 4 +- compiler/test/fail_compilation/diag8894.d | 32 +- compiler/test/fail_compilation/diag8928.d | 4 +- compiler/test/fail_compilation/diag9004.d | 8 +- compiler/test/fail_compilation/diag9191.d | 16 +- compiler/test/fail_compilation/diag9210a.d | 2 + compiler/test/fail_compilation/diag9247.d | 8 +- compiler/test/fail_compilation/diag9250.d | 8 +- compiler/test/fail_compilation/diag9312.d | 4 +- compiler/test/fail_compilation/diag9357.d | 24 +- compiler/test/fail_compilation/diag9358.d | 16 +- compiler/test/fail_compilation/diag9398.d | 4 +- compiler/test/fail_compilation/diag9420.d | 6 +- compiler/test/fail_compilation/diag9451.d | 24 +- compiler/test/fail_compilation/diag9479.d | 4 +- compiler/test/fail_compilation/diag9620.d | 14 +- compiler/test/fail_compilation/diag9635.d | 8 +- compiler/test/fail_compilation/diag9765.d | 4 +- compiler/test/fail_compilation/diag9831.d | 8 +- compiler/test/fail_compilation/diag9861.d | 8 +- compiler/test/fail_compilation/diag9880.d | 4 +- compiler/test/fail_compilation/diag9961.d | 16 +- .../test/fail_compilation/diag_class_alloc.d | 8 +- compiler/test/fail_compilation/diag_cstyle.d | 24 +- .../fail_compilation/diag_debug_conditional.d | 13 +- compiler/test/fail_compilation/diag_err1.d | 36 +- .../test/fail_compilation/diag_in_array.d | 16 +- compiler/test/fail_compilation/diagin.d | 18 +- compiler/test/fail_compilation/diaginref.d | 8 +- compiler/test/fail_compilation/dip22a.d | 24 +- compiler/test/fail_compilation/dip22b.d | 4 +- compiler/test/fail_compilation/dip22e.d | 4 +- compiler/test/fail_compilation/dip25.d | 20 +- compiler/test/fail_compilation/disable.d | 40 +- compiler/test/fail_compilation/disable_new.d | 8 +- .../test/fail_compilation/discard_value.d | 36 +- compiler/test/fail_compilation/e15876_1.d | 16 +- compiler/test/fail_compilation/e15876_2.d | 12 +- compiler/test/fail_compilation/e15876_3.d | 34 +- compiler/test/fail_compilation/e15876_4.d | 28 +- compiler/test/fail_compilation/e15876_5.d | 14 +- compiler/test/fail_compilation/e7804_1.d | 16 +- compiler/test/fail_compilation/e7804_2.d | 4 +- compiler/test/fail_compilation/editions.d | 4 +- compiler/test/fail_compilation/enum9921.d | 12 +- .../test/fail_compilation/enum_function.d | 16 +- compiler/test/fail_compilation/enum_member.d | 18 +- compiler/test/fail_compilation/fail10.d | 4 +- compiler/test/fail_compilation/fail100.d | 4 +- compiler/test/fail_compilation/fail10082.d | 4 +- compiler/test/fail_compilation/fail101.d | 8 +- compiler/test/fail_compilation/fail10102.d | 16 +- compiler/test/fail_compilation/fail10115.d | 24 +- compiler/test/fail_compilation/fail10254.d | 24 +- compiler/test/fail_compilation/fail10277.d | 40 ++ compiler/test/fail_compilation/fail10285.d | 28 +- compiler/test/fail_compilation/fail10299.d | 4 +- compiler/test/fail_compilation/fail10346.d | 4 +- compiler/test/fail_compilation/fail104.d | 12 +- compiler/test/fail_compilation/fail10481.d | 8 +- compiler/test/fail_compilation/fail105.d | 4 +- compiler/test/fail_compilation/fail10528.d | 40 +- compiler/test/fail_compilation/fail10534.d | 64 ++- compiler/test/fail_compilation/fail106.d | 4 +- compiler/test/fail_compilation/fail10630.d | 4 +- compiler/test/fail_compilation/fail10666.d | 4 +- compiler/test/fail_compilation/fail10806.d | 4 +- compiler/test/fail_compilation/fail10947.d | 36 +- compiler/test/fail_compilation/fail10964.d | 28 +- compiler/test/fail_compilation/fail10980.d | 32 +- compiler/test/fail_compilation/fail11.d | 4 +- compiler/test/fail_compilation/fail110.d | 24 +- compiler/test/fail_compilation/fail11038.d | 4 +- compiler/test/fail_compilation/fail11042.d | 8 +- compiler/test/fail_compilation/fail111.d | 4 +- compiler/test/fail_compilation/fail11125.d | 8 +- compiler/test/fail_compilation/fail11151.d | 4 +- compiler/test/fail_compilation/fail11163.d | 8 +- compiler/test/fail_compilation/fail113.d | 4 +- compiler/test/fail_compilation/fail11355.d | 4 +- compiler/test/fail_compilation/fail11375.d | 8 +- compiler/test/fail_compilation/fail114.d | 4 +- compiler/test/fail_compilation/fail11426.d | 16 +- compiler/test/fail_compilation/fail11445.d | 4 +- compiler/test/fail_compilation/fail11453a.d | 2 + compiler/test/fail_compilation/fail11453b.d | 2 + compiler/test/fail_compilation/fail115.d | 4 +- compiler/test/fail_compilation/fail11503a.d | 4 +- compiler/test/fail_compilation/fail11503b.d | 4 +- compiler/test/fail_compilation/fail11503c.d | 4 +- compiler/test/fail_compilation/fail11503d.d | 8 +- compiler/test/fail_compilation/fail11510.d | 16 +- compiler/test/fail_compilation/fail11532.d | 16 +- compiler/test/fail_compilation/fail11545.d | 6 +- compiler/test/fail_compilation/fail11552.d | 4 +- compiler/test/fail_compilation/fail11562.d | 16 +- compiler/test/fail_compilation/fail116.d | 8 +- compiler/test/fail_compilation/fail11653.d | 8 +- compiler/test/fail_compilation/fail117.d | 8 +- compiler/test/fail_compilation/fail11714.d | 8 +- compiler/test/fail_compilation/fail11746.d | 10 +- compiler/test/fail_compilation/fail11748.d | 4 +- compiler/test/fail_compilation/fail11751.d | 10 +- compiler/test/fail_compilation/fail118.d | 36 +- compiler/test/fail_compilation/fail12.d | 10 +- compiler/test/fail_compilation/fail120.d | 8 +- compiler/test/fail_compilation/fail12047.d | 28 +- compiler/test/fail_compilation/fail121.d | 12 +- compiler/test/fail_compilation/fail122.d | 4 +- compiler/test/fail_compilation/fail12236.d | 28 +- compiler/test/fail_compilation/fail123.d | 8 +- compiler/test/fail_compilation/fail124.d | 12 +- compiler/test/fail_compilation/fail125.d | 12 +- compiler/test/fail_compilation/fail126.d | 4 +- compiler/test/fail_compilation/fail12622.d | 40 +- compiler/test/fail_compilation/fail12636.d | 4 +- compiler/test/fail_compilation/fail127.d | 8 +- compiler/test/fail_compilation/fail12744.d | 72 ++- compiler/test/fail_compilation/fail12764.d | 4 +- compiler/test/fail_compilation/fail12901.d | 4 +- compiler/test/fail_compilation/fail12908.d | 4 +- compiler/test/fail_compilation/fail12932.d | 6 +- compiler/test/fail_compilation/fail13064.d | 4 +- compiler/test/fail_compilation/fail131.d | 4 +- compiler/test/fail_compilation/fail13116.d | 8 +- compiler/test/fail_compilation/fail13123.d | 8 +- compiler/test/fail_compilation/fail13187.d | 4 +- compiler/test/fail_compilation/fail132.d | 4 +- compiler/test/fail_compilation/fail133.d | 8 +- compiler/test/fail_compilation/fail13336a.d | 4 +- compiler/test/fail_compilation/fail13336b.d | 8 +- compiler/test/fail_compilation/fail134.d | 10 +- compiler/test/fail_compilation/fail13424.d | 12 +- .../test/fail_compilation/fail13434_m32.d | 4 +- .../test/fail_compilation/fail13434_m64.d | 4 +- compiler/test/fail_compilation/fail13435.d | 10 +- compiler/test/fail_compilation/fail13498.d | 8 +- compiler/test/fail_compilation/fail13574.d | 8 +- compiler/test/fail_compilation/fail13577.d | 4 +- compiler/test/fail_compilation/fail136.d | 4 +- compiler/test/fail_compilation/fail13601.d | 16 +- compiler/test/fail_compilation/fail13701.d | 12 +- compiler/test/fail_compilation/fail13756.d | 4 +- compiler/test/fail_compilation/fail13775.d | 16 +- compiler/test/fail_compilation/fail139.d | 4 +- compiler/test/fail_compilation/fail14.d | 4 +- compiler/test/fail_compilation/fail14009.d | 4 +- compiler/test/fail_compilation/fail14089.d | 40 +- compiler/test/fail_compilation/fail142.d | 12 +- compiler/test/fail_compilation/fail14249.d | 48 +- compiler/test/fail_compilation/fail143.d | 8 +- compiler/test/fail_compilation/fail14304.d | 40 +- compiler/test/fail_compilation/fail144.d | 8 +- compiler/test/fail_compilation/fail14416.d | 4 +- compiler/test/fail_compilation/fail14486.d | 56 +- compiler/test/fail_compilation/fail145.d | 8 +- compiler/test/fail_compilation/fail14554.d | 16 +- compiler/test/fail_compilation/fail14965.d | 48 +- compiler/test/fail_compilation/fail14997.d | 12 +- compiler/test/fail_compilation/fail15.d | 4 +- compiler/test/fail_compilation/fail150.d | 4 +- compiler/test/fail_compilation/fail15044.d | 4 +- compiler/test/fail_compilation/fail15068.d | 8 +- compiler/test/fail_compilation/fail15089.d | 4 +- compiler/test/fail_compilation/fail152.d | 8 +- compiler/test/fail_compilation/fail153.d | 4 +- compiler/test/fail_compilation/fail15361.d | 4 +- compiler/test/fail_compilation/fail154.d | 4 +- compiler/test/fail_compilation/fail15414.d | 6 +- compiler/test/fail_compilation/fail155.d | 6 +- compiler/test/fail_compilation/fail15535.d | 4 +- compiler/test/fail_compilation/fail15550.d | 12 +- compiler/test/fail_compilation/fail156.d | 12 +- compiler/test/fail_compilation/fail15616b.d | 38 +- compiler/test/fail_compilation/fail15616c.d | 38 +- compiler/test/fail_compilation/fail15626.d | 4 +- compiler/test/fail_compilation/fail15691.d | 8 +- compiler/test/fail_compilation/fail15755.d | 4 +- compiler/test/fail_compilation/fail158.d | 4 +- compiler/test/fail_compilation/fail15896.d | 8 +- compiler/test/fail_compilation/fail159.d | 4 +- compiler/test/fail_compilation/fail16.d | 6 +- compiler/test/fail_compilation/fail160.d | 4 +- compiler/test/fail_compilation/fail16001.d | 6 +- compiler/test/fail_compilation/fail161.d | 4 +- compiler/test/fail_compilation/fail162.d | 12 +- compiler/test/fail_compilation/fail16206a.d | 4 +- compiler/test/fail_compilation/fail16206b.d | 4 +- compiler/test/fail_compilation/fail163.d | 62 +-- compiler/test/fail_compilation/fail16575.d | 108 ++-- compiler/test/fail_compilation/fail16600.d | 8 +- compiler/test/fail_compilation/fail16689.d | 10 +- compiler/test/fail_compilation/fail16772.d | 6 +- compiler/test/fail_compilation/fail169.d | 4 +- compiler/test/fail_compilation/fail16997.d | 72 ++- compiler/test/fail_compilation/fail17.d | 12 +- compiler/test/fail_compilation/fail170.d | 4 +- compiler/test/fail_compilation/fail17105.d | 4 +- compiler/test/fail_compilation/fail172.d | 16 +- compiler/test/fail_compilation/fail17275.d | 8 +- compiler/test/fail_compilation/fail17354.d | 8 +- compiler/test/fail_compilation/fail17419.d | 8 +- compiler/test/fail_compilation/fail17421.d | 16 +- compiler/test/fail_compilation/fail17491.d | 32 +- compiler/test/fail_compilation/fail17492.d | 8 +- compiler/test/fail_compilation/fail17502.d | 16 +- compiler/test/fail_compilation/fail17518.d | 6 +- compiler/test/fail_compilation/fail17570.d | 14 +- compiler/test/fail_compilation/fail176.d | 12 +- compiler/test/fail_compilation/fail17602.d | 4 +- compiler/test/fail_compilation/fail17612.d | 12 +- compiler/test/fail_compilation/fail17625.d | 4 +- compiler/test/fail_compilation/fail17630.d | 4 +- compiler/test/fail_compilation/fail17646.d | 8 +- compiler/test/fail_compilation/fail17689.d | 4 +- compiler/test/fail_compilation/fail177.d | 24 +- compiler/test/fail_compilation/fail17722a.d | 4 +- compiler/test/fail_compilation/fail17722b.d | 4 +- compiler/test/fail_compilation/fail17842.d | 8 +- compiler/test/fail_compilation/fail179.d | 4 +- compiler/test/fail_compilation/fail17906.d | 6 +- compiler/test/fail_compilation/fail17927.d | 16 +- compiler/test/fail_compilation/fail17955.d | 56 +- compiler/test/fail_compilation/fail17969.d | 8 +- compiler/test/fail_compilation/fail17976.d | 8 +- compiler/test/fail_compilation/fail18.d | 4 +- compiler/test/fail_compilation/fail180.d | 24 +- compiler/test/fail_compilation/fail18057.d | 8 +- compiler/test/fail_compilation/fail18057b.d | 4 +- compiler/test/fail_compilation/fail18093.d | 12 +- compiler/test/fail_compilation/fail18143.d | 32 +- compiler/test/fail_compilation/fail18219.d | 18 +- compiler/test/fail_compilation/fail18228.d | 12 +- compiler/test/fail_compilation/fail18236.d | 4 +- compiler/test/fail_compilation/fail18243.d | 8 +- compiler/test/fail_compilation/fail183.d | 40 +- compiler/test/fail_compilation/fail184.d | 4 +- compiler/test/fail_compilation/fail18417.d | 12 +- compiler/test/fail_compilation/fail185.d | 4 +- compiler/test/fail_compilation/fail18620.d | 16 +- compiler/test/fail_compilation/fail187.d | 4 +- compiler/test/fail_compilation/fail18719.d | 8 +- compiler/test/fail_compilation/fail188.d | 4 +- compiler/test/fail_compilation/fail18892.d | 16 +- compiler/test/fail_compilation/fail189.d | 4 +- compiler/test/fail_compilation/fail18938.d | 2 + compiler/test/fail_compilation/fail18970.d | 20 +- compiler/test/fail_compilation/fail18979.d | 6 +- compiler/test/fail_compilation/fail18985.d | 8 +- compiler/test/fail_compilation/fail18994.d | 4 +- compiler/test/fail_compilation/fail190.d | 8 +- compiler/test/fail_compilation/fail1900.d | 47 +- compiler/test/fail_compilation/fail19038.d | 8 +- compiler/test/fail_compilation/fail19076.d | 12 +- compiler/test/fail_compilation/fail19098.d | 4 +- compiler/test/fail_compilation/fail19099.d | 4 +- compiler/test/fail_compilation/fail19103.d | 20 +- compiler/test/fail_compilation/fail19181.d | 4 +- compiler/test/fail_compilation/fail19182.d | 4 +- compiler/test/fail_compilation/fail192.d | 8 +- compiler/test/fail_compilation/fail19202.d | 4 +- compiler/test/fail_compilation/fail19209.d | 6 +- compiler/test/fail_compilation/fail193.d | 4 +- compiler/test/fail_compilation/fail19319a.d | 8 +- compiler/test/fail_compilation/fail19319b.d | 8 +- compiler/test/fail_compilation/fail19336.d | 12 +- compiler/test/fail_compilation/fail194.d | 4 +- compiler/test/fail_compilation/fail19441.d | 4 +- compiler/test/fail_compilation/fail195.d | 4 +- compiler/test/fail_compilation/fail19520.d | 24 +- compiler/test/fail_compilation/fail196.d | 108 ++-- compiler/test/fail_compilation/fail19609.d | 24 +- compiler/test/fail_compilation/fail19687.d | 4 +- compiler/test/fail_compilation/fail19729.d | 16 +- compiler/test/fail_compilation/fail19744.d | 4 +- .../test/fail_compilation/fail19757_m32.d | 4 +- .../test/fail_compilation/fail19757_m64.d | 4 +- compiler/test/fail_compilation/fail19759.d | 6 +- compiler/test/fail_compilation/fail198.d | 4 +- compiler/test/fail_compilation/fail19871.d | 12 +- compiler/test/fail_compilation/fail19881.d | 8 +- compiler/test/fail_compilation/fail19890a.d | 4 +- compiler/test/fail_compilation/fail19890b.d | 4 +- compiler/test/fail_compilation/fail19897.d | 4 +- compiler/test/fail_compilation/fail19898a.d | 4 +- compiler/test/fail_compilation/fail19898b.d | 12 +- compiler/test/fail_compilation/fail199.d | 8 +- compiler/test/fail_compilation/fail19911a.d | 4 +- compiler/test/fail_compilation/fail19911b.d | 4 +- compiler/test/fail_compilation/fail19911c.d | 4 +- compiler/test/fail_compilation/fail19912a.d | 4 +- compiler/test/fail_compilation/fail19912b.d | 4 +- compiler/test/fail_compilation/fail19912c.d | 4 +- compiler/test/fail_compilation/fail19912d.d | 4 +- compiler/test/fail_compilation/fail19912e.d | 4 +- compiler/test/fail_compilation/fail19913.d | 8 +- compiler/test/fail_compilation/fail19914.d | 8 +- compiler/test/fail_compilation/fail19915.d | 8 +- compiler/test/fail_compilation/fail19917.d | 12 +- compiler/test/fail_compilation/fail19919.d | 8 +- compiler/test/fail_compilation/fail19922.d | 4 +- compiler/test/fail_compilation/fail19923.d | 4 +- compiler/test/fail_compilation/fail19931.d | 12 +- compiler/test/fail_compilation/fail19948.d | 10 +- compiler/test/fail_compilation/fail1995.d | 12 +- compiler/test/fail_compilation/fail19955.d | 4 +- compiler/test/fail_compilation/fail19965.d | 4 +- compiler/test/fail_compilation/fail20.d | 4 +- compiler/test/fail_compilation/fail200.d | 8 +- compiler/test/fail_compilation/fail20000.d | 72 ++- compiler/test/fail_compilation/fail20033.d | 4 + compiler/test/fail_compilation/fail20040.d | 12 +- compiler/test/fail_compilation/fail20073.d | 8 +- compiler/test/fail_compilation/fail201.d | 8 +- compiler/test/fail_compilation/fail20108.d | 14 +- compiler/test/fail_compilation/fail20164.d | 4 +- compiler/test/fail_compilation/fail202.d | 8 +- compiler/test/fail_compilation/fail203.d | 8 +- compiler/test/fail_compilation/fail20376.d | 4 +- compiler/test/fail_compilation/fail204.d | 4 +- compiler/test/fail_compilation/fail20448.d | 8 +- compiler/test/fail_compilation/fail205.d | 4 +- compiler/test/fail_compilation/fail20538.d | 12 +- compiler/test/fail_compilation/fail20551.d | 8 +- compiler/test/fail_compilation/fail206.d | 4 +- compiler/test/fail_compilation/fail20609.d | 38 +- compiler/test/fail_compilation/fail20616.d | 16 +- compiler/test/fail_compilation/fail20637.d | 6 +- compiler/test/fail_compilation/fail20638.d | 4 +- compiler/test/fail_compilation/fail20658.d | 4 +- compiler/test/fail_compilation/fail207.d | 8 +- compiler/test/fail_compilation/fail20714.d | 8 +- compiler/test/fail_compilation/fail20730a.d | 4 +- compiler/test/fail_compilation/fail20730b.d | 10 +- compiler/test/fail_compilation/fail20771.d | 8 +- compiler/test/fail_compilation/fail20772.d | 8 +- compiler/test/fail_compilation/fail20775.d | 8 +- compiler/test/fail_compilation/fail20779.d | 4 +- compiler/test/fail_compilation/fail208.d | 8 +- compiler/test/fail_compilation/fail20800.d | 10 +- compiler/test/fail_compilation/fail209.d | 4 +- compiler/test/fail_compilation/fail20965.d | 8 +- compiler/test/fail_compilation/fail21001.d | 4 +- compiler/test/fail_compilation/fail21092.d | 24 +- compiler/test/fail_compilation/fail212.d | 10 +- compiler/test/fail_compilation/fail21206.d | 6 +- compiler/test/fail_compilation/fail21214.d | 16 +- .../test/fail_compilation/fail21227_posix.d | 7 + compiler/test/fail_compilation/fail21243.d | 28 +- compiler/test/fail_compilation/fail21275.d | 8 +- compiler/test/fail_compilation/fail213.d | 8 +- compiler/test/fail_compilation/fail21314.d | 6 +- compiler/test/fail_compilation/fail215.d | 4 +- compiler/test/fail_compilation/fail21508.d | 4 +- compiler/test/fail_compilation/fail21508_2.d | 4 +- compiler/test/fail_compilation/fail21547.d | 8 +- compiler/test/fail_compilation/fail216.d | 12 +- compiler/test/fail_compilation/fail217.d | 8 +- compiler/test/fail_compilation/fail218.d | 4 +- compiler/test/fail_compilation/fail21830.d | 6 + compiler/test/fail_compilation/fail21831.d | 14 +- compiler/test/fail_compilation/fail21868b.d | 8 +- compiler/test/fail_compilation/fail21885.d | 4 +- compiler/test/fail_compilation/fail21928.d | 4 +- compiler/test/fail_compilation/fail21928b.d | 4 +- compiler/test/fail_compilation/fail2195.d | 8 +- compiler/test/fail_compilation/fail22.d | 4 +- compiler/test/fail_compilation/fail220.d | 18 +- compiler/test/fail_compilation/fail22035.d | 6 +- compiler/test/fail_compilation/fail22039.d | 8 +- compiler/test/fail_compilation/fail22054.d | 20 +- compiler/test/fail_compilation/fail22075.d | 8 +- compiler/test/fail_compilation/fail22084.d | 4 +- compiler/test/fail_compilation/fail221.d | 4 +- compiler/test/fail_compilation/fail22118.d | 4 +- compiler/test/fail_compilation/fail22121.d | 2 + compiler/test/fail_compilation/fail22133.d | 8 +- compiler/test/fail_compilation/fail22134.d | 4 +- compiler/test/fail_compilation/fail22144.d | 4 +- compiler/test/fail_compilation/fail22151.d | 16 +- compiler/test/fail_compilation/fail22157.d | 16 +- compiler/test/fail_compilation/fail222.d | 16 +- compiler/test/fail_compilation/fail22202.d | 10 +- compiler/test/fail_compilation/fail223.d | 4 +- compiler/test/fail_compilation/fail22351.d | 10 +- compiler/test/fail_compilation/fail22366.d | 28 +- compiler/test/fail_compilation/fail224.d | 4 +- compiler/test/fail_compilation/fail22529.d | 4 +- compiler/test/fail_compilation/fail22570.d | 8 +- compiler/test/fail_compilation/fail22634.d | 4 +- compiler/test/fail_compilation/fail22729.d | 4 +- compiler/test/fail_compilation/fail22749.d | 4 +- compiler/test/fail_compilation/fail22780.d | 4 +- compiler/test/fail_compilation/fail228.d | 4 +- compiler/test/fail_compilation/fail22812.c | 16 +- compiler/test/fail_compilation/fail22825a.d | 6 +- compiler/test/fail_compilation/fail22827.d | 8 +- compiler/test/fail_compilation/fail22852.c | 20 +- compiler/test/fail_compilation/fail22853a.i | 2 + compiler/test/fail_compilation/fail22853b.c | 4 +- compiler/test/fail_compilation/fail22857.d | 4 +- compiler/test/fail_compilation/fail229.d | 8 +- compiler/test/fail_compilation/fail23.d | 4 +- compiler/test/fail_compilation/fail23036.d | 12 +- compiler/test/fail_compilation/fail231.d | 4 +- compiler/test/fail_compilation/fail23108a.d | 4 +- compiler/test/fail_compilation/fail23108b.d | 8 +- compiler/test/fail_compilation/fail23109.d | 6 + compiler/test/fail_compilation/fail23135.d | 6 +- compiler/test/fail_compilation/fail23151.d | 4 +- compiler/test/fail_compilation/fail232.d | 24 +- compiler/test/fail_compilation/fail23406.d | 4 +- compiler/test/fail_compilation/fail23439.d | 4 +- compiler/test/fail_compilation/fail2350.d | 4 +- compiler/test/fail_compilation/fail23574.d | 12 +- compiler/test/fail_compilation/fail23591.d | 8 +- compiler/test/fail_compilation/fail236.d | 12 +- compiler/test/fail_compilation/fail2361.d | 6 +- compiler/test/fail_compilation/fail23626a.d | 12 +- compiler/test/fail_compilation/fail23626b.d | 8 +- compiler/test/fail_compilation/fail237.d | 8 +- compiler/test/fail_compilation/fail23745.d | 12 +- compiler/test/fail_compilation/fail23760.d | 16 +- compiler/test/fail_compilation/fail23773.d | 4 +- compiler/test/fail_compilation/fail23822.d | 4 +- compiler/test/fail_compilation/fail23826.d | 4 +- compiler/test/fail_compilation/fail23861.d | 4 +- compiler/test/fail_compilation/fail238_m32.d | 20 +- compiler/test/fail_compilation/fail238_m64.d | 20 +- compiler/test/fail_compilation/fail239.d | 4 +- compiler/test/fail_compilation/fail24.d | 12 +- compiler/test/fail_compilation/fail240.d | 4 +- compiler/test/fail_compilation/fail241.d | 16 +- compiler/test/fail_compilation/fail24208.d | 8 +- compiler/test/fail_compilation/fail24212.d | 4 +- compiler/test/fail_compilation/fail24213.d | 4 +- compiler/test/fail_compilation/fail24224.d | 12 +- compiler/test/fail_compilation/fail243.d | 20 +- compiler/test/fail_compilation/fail24301.d | 10 +- compiler/test/fail_compilation/fail24389.c | 4 +- compiler/test/fail_compilation/fail244.d | 40 +- compiler/test/fail_compilation/fail24422.c | 4 +- compiler/test/fail_compilation/fail24485.d | 8 +- compiler/test/fail_compilation/fail245.d | 40 +- compiler/test/fail_compilation/fail2450.d | 8 +- compiler/test/fail_compilation/fail2456.d | 61 +-- compiler/test/fail_compilation/fail248.d | 4 +- compiler/test/fail_compilation/fail249.d | 4 +- compiler/test/fail_compilation/fail25.d | 4 +- compiler/test/fail_compilation/fail250.d | 4 +- compiler/test/fail_compilation/fail251.d | 12 +- compiler/test/fail_compilation/fail252.d | 4 +- compiler/test/fail_compilation/fail253.d | 12 +- compiler/test/fail_compilation/fail254.d | 20 +- compiler/test/fail_compilation/fail256.d | 4 +- compiler/test/fail_compilation/fail257.d | 8 +- compiler/test/fail_compilation/fail259.d | 4 +- compiler/test/fail_compilation/fail261.d | 8 +- compiler/test/fail_compilation/fail262.d | 4 +- compiler/test/fail_compilation/fail263.d | 10 +- compiler/test/fail_compilation/fail264.d | 4 +- compiler/test/fail_compilation/fail2656.d | 56 +- compiler/test/fail_compilation/fail267.d | 4 +- compiler/test/fail_compilation/fail27.d | 24 +- compiler/test/fail_compilation/fail270.d | 12 +- compiler/test/fail_compilation/fail272.d | 8 +- compiler/test/fail_compilation/fail273.d | 4 +- compiler/test/fail_compilation/fail2740.d | 4 +- compiler/test/fail_compilation/fail275.d | 4 +- compiler/test/fail_compilation/fail276.d | 8 +- compiler/test/fail_compilation/fail278.d | 12 +- compiler/test/fail_compilation/fail279.d | 4 +- compiler/test/fail_compilation/fail280.d | 4 +- compiler/test/fail_compilation/fail281.d | 4 +- compiler/test/fail_compilation/fail282.d | 4 +- compiler/test/fail_compilation/fail284.d | 4 +- compiler/test/fail_compilation/fail285.d | 4 +- compiler/test/fail_compilation/fail287.d | 4 +- compiler/test/fail_compilation/fail288.d | 4 +- compiler/test/fail_compilation/fail289.d | 4 +- compiler/test/fail_compilation/fail290.d | 4 +- compiler/test/fail_compilation/fail291.d | 4 +- compiler/test/fail_compilation/fail296.d | 4 +- compiler/test/fail_compilation/fail2962.d | 26 +- compiler/test/fail_compilation/fail297.d | 4 +- compiler/test/fail_compilation/fail298.d | 4 +- compiler/test/fail_compilation/fail299.d | 4 +- compiler/test/fail_compilation/fail3.d | 4 +- compiler/test/fail_compilation/fail301.d | 8 +- compiler/test/fail_compilation/fail302.d | 10 +- compiler/test/fail_compilation/fail303.d | 32 +- compiler/test/fail_compilation/fail304.d | 4 +- compiler/test/fail_compilation/fail305.d | 4 +- compiler/test/fail_compilation/fail306.d | 4 +- compiler/test/fail_compilation/fail307.d | 4 +- compiler/test/fail_compilation/fail308.d | 4 +- compiler/test/fail_compilation/fail309.d | 4 +- compiler/test/fail_compilation/fail310.d | 12 +- compiler/test/fail_compilation/fail311.d | 8 +- compiler/test/fail_compilation/fail312.d | 8 +- compiler/test/fail_compilation/fail313.d | 12 +- compiler/test/fail_compilation/fail3144.d | 8 +- compiler/test/fail_compilation/fail315.d | 18 +- compiler/test/fail_compilation/fail3150.d | 4 +- compiler/test/fail_compilation/fail316.d | 4 +- compiler/test/fail_compilation/fail317.d | 4 +- compiler/test/fail_compilation/fail318_b.d | 4 +- compiler/test/fail_compilation/fail319.d | 4 +- compiler/test/fail_compilation/fail320.d | 14 +- compiler/test/fail_compilation/fail322.d | 20 +- compiler/test/fail_compilation/fail325.d | 4 +- compiler/test/fail_compilation/fail327.d | 8 +- compiler/test/fail_compilation/fail328.d | 8 +- compiler/test/fail_compilation/fail329.d | 4 +- compiler/test/fail_compilation/fail3290.d | 4 +- compiler/test/fail_compilation/fail330.d | 4 +- compiler/test/fail_compilation/fail331.d | 4 +- compiler/test/fail_compilation/fail333.d | 4 +- compiler/test/fail_compilation/fail334.d | 4 +- compiler/test/fail_compilation/fail335.d | 4 +- compiler/test/fail_compilation/fail336.d | 4 +- compiler/test/fail_compilation/fail337.d | 16 +- compiler/test/fail_compilation/fail34.d | 4 +- compiler/test/fail_compilation/fail340.d | 8 +- compiler/test/fail_compilation/fail341.d | 8 +- compiler/test/fail_compilation/fail343.d | 8 +- compiler/test/fail_compilation/fail344.d | 28 +- compiler/test/fail_compilation/fail346.d | 16 +- compiler/test/fail_compilation/fail347.d | 24 +- compiler/test/fail_compilation/fail349.d | 8 +- compiler/test/fail_compilation/fail35.d | 4 +- compiler/test/fail_compilation/fail351.d | 4 +- compiler/test/fail_compilation/fail352.d | 4 +- compiler/test/fail_compilation/fail354.d | 8 +- compiler/test/fail_compilation/fail355.d | 4 +- compiler/test/fail_compilation/fail356a.d | 4 +- compiler/test/fail_compilation/fail356b.d | 4 +- compiler/test/fail_compilation/fail356c.d | 4 +- compiler/test/fail_compilation/fail3581a.d | 4 +- compiler/test/fail_compilation/fail3581b.d | 4 +- compiler/test/fail_compilation/fail359.d | 4 +- compiler/test/fail_compilation/fail36.d | 8 +- compiler/test/fail_compilation/fail3672.d | 10 +- compiler/test/fail_compilation/fail3673a.d | 4 +- compiler/test/fail_compilation/fail3673b.d | 20 +- compiler/test/fail_compilation/fail3703.d | 24 +- compiler/test/fail_compilation/fail3731.d | 4 +- compiler/test/fail_compilation/fail37_m32.d | 4 +- compiler/test/fail_compilation/fail37_m64.d | 4 +- compiler/test/fail_compilation/fail38.d | 4 +- compiler/test/fail_compilation/fail3882.d | 8 +- compiler/test/fail_compilation/fail3895.d | 4 +- compiler/test/fail_compilation/fail39.d | 8 +- compiler/test/fail_compilation/fail3990.d | 8 +- compiler/test/fail_compilation/fail40.d | 4 +- compiler/test/fail_compilation/fail41.d | 4 +- compiler/test/fail_compilation/fail42.d | 4 +- compiler/test/fail_compilation/fail4206.d | 4 +- compiler/test/fail_compilation/fail4269a.d | 12 +- compiler/test/fail_compilation/fail4269b.d | 8 +- compiler/test/fail_compilation/fail4269c.d | 8 +- compiler/test/fail_compilation/fail4269d.d | 4 +- compiler/test/fail_compilation/fail4269e.d | 6 +- compiler/test/fail_compilation/fail4269f.d | 4 +- compiler/test/fail_compilation/fail4269g.d | 4 +- compiler/test/fail_compilation/fail4375a.d | 4 +- compiler/test/fail_compilation/fail4375b.d | 4 +- compiler/test/fail_compilation/fail4375c.d | 4 +- compiler/test/fail_compilation/fail4375d.d | 4 +- compiler/test/fail_compilation/fail4375e.d | 4 +- compiler/test/fail_compilation/fail4375f.d | 4 +- compiler/test/fail_compilation/fail4375g.d | 4 +- compiler/test/fail_compilation/fail4375h.d | 4 +- compiler/test/fail_compilation/fail4375i.d | 4 +- compiler/test/fail_compilation/fail4375j.d | 4 +- compiler/test/fail_compilation/fail4375l.d | 4 +- compiler/test/fail_compilation/fail4375m.d | 4 +- compiler/test/fail_compilation/fail4375o.d | 4 +- compiler/test/fail_compilation/fail4375p.d | 8 +- compiler/test/fail_compilation/fail4375q.d | 8 +- compiler/test/fail_compilation/fail4375r.d | 4 +- compiler/test/fail_compilation/fail4375s.d | 4 +- compiler/test/fail_compilation/fail4375t.d | 4 +- compiler/test/fail_compilation/fail4375u.d | 4 +- compiler/test/fail_compilation/fail4375v.d | 4 +- compiler/test/fail_compilation/fail4375w.d | 4 +- compiler/test/fail_compilation/fail4375x.d | 4 +- compiler/test/fail_compilation/fail4375y.d | 4 +- compiler/test/fail_compilation/fail44.d | 4 +- compiler/test/fail_compilation/fail4421.d | 12 +- compiler/test/fail_compilation/fail4448.d | 12 +- compiler/test/fail_compilation/fail45.d | 4 +- compiler/test/fail_compilation/fail4510.d | 4 +- compiler/test/fail_compilation/fail4511.d | 4 +- compiler/test/fail_compilation/fail4544.d | 20 +- compiler/test/fail_compilation/fail46.d | 4 +- compiler/test/fail_compilation/fail4611.d | 4 +- compiler/test/fail_compilation/fail47.d | 4 +- compiler/test/fail_compilation/fail4923.d | 2 + compiler/test/fail_compilation/fail4958.d | 4 +- compiler/test/fail_compilation/fail50.d | 8 +- compiler/test/fail_compilation/fail51.d | 4 +- compiler/test/fail_compilation/fail5153.d | 6 +- compiler/test/fail_compilation/fail52.d | 4 +- compiler/test/fail_compilation/fail53.d | 6 +- compiler/test/fail_compilation/fail54.d | 24 +- compiler/test/fail_compilation/fail5435.d | 64 ++- compiler/test/fail_compilation/fail55.d | 6 +- compiler/test/fail_compilation/fail56.d | 8 +- compiler/test/fail_compilation/fail5634.d | 4 +- compiler/test/fail_compilation/fail57.d | 8 +- compiler/test/fail_compilation/fail5733.d | 4 +- compiler/test/fail_compilation/fail58.d | 20 +- compiler/test/fail_compilation/fail5851.d | 4 +- compiler/test/fail_compilation/fail59.d | 4 +- compiler/test/fail_compilation/fail5908.d | 8 +- compiler/test/fail_compilation/fail5953a1.d | 4 +- compiler/test/fail_compilation/fail5953a2.d | 12 +- compiler/test/fail_compilation/fail5953s1.d | 4 +- compiler/test/fail_compilation/fail5953s2.d | 12 +- compiler/test/fail_compilation/fail60.d | 4 +- compiler/test/fail_compilation/fail6029.d | 4 +- compiler/test/fail_compilation/fail61.d | 28 +- compiler/test/fail_compilation/fail6107.d | 8 +- compiler/test/fail_compilation/fail62.d | 4 +- compiler/test/fail_compilation/fail6242.d | 4 +- compiler/test/fail_compilation/fail63.d | 4 +- compiler/test/fail_compilation/fail6334.d | 8 +- compiler/test/fail_compilation/fail6451.d | 4 +- compiler/test/fail_compilation/fail6453.d | 12 +- compiler/test/fail_compilation/fail6497.d | 8 +- compiler/test/fail_compilation/fail6561.d | 4 +- compiler/test/fail_compilation/fail6611.d | 4 +- compiler/test/fail_compilation/fail6652.d | 16 +- compiler/test/fail_compilation/fail6781.d | 8 +- compiler/test/fail_compilation/fail6795.d | 24 +- compiler/test/fail_compilation/fail6968.d | 20 +- compiler/test/fail_compilation/fail7077.d | 4 +- compiler/test/fail_compilation/fail7173.d | 4 +- compiler/test/fail_compilation/fail7178.d | 8 +- compiler/test/fail_compilation/fail72.d | 4 +- compiler/test/fail_compilation/fail7234.d | 4 +- compiler/test/fail_compilation/fail73.d | 4 +- compiler/test/fail_compilation/fail7352.d | 38 +- compiler/test/fail_compilation/fail7369.d | 4 +- compiler/test/fail_compilation/fail7372.d | 4 + compiler/test/fail_compilation/fail74.d | 4 +- compiler/test/fail_compilation/fail7424b.d | 4 +- compiler/test/fail_compilation/fail7424c.d | 4 +- compiler/test/fail_compilation/fail7424d.d | 4 +- compiler/test/fail_compilation/fail7424e.d | 4 +- compiler/test/fail_compilation/fail7424f.d | 4 +- compiler/test/fail_compilation/fail7424g.d | 4 +- compiler/test/fail_compilation/fail7424h.d | 4 +- compiler/test/fail_compilation/fail7424i.d | 4 +- compiler/test/fail_compilation/fail7443.d | 8 +- compiler/test/fail_compilation/fail75.d | 4 +- compiler/test/fail_compilation/fail7524a.d | 4 +- compiler/test/fail_compilation/fail7524b.d | 4 +- compiler/test/fail_compilation/fail76.d | 4 +- compiler/test/fail_compilation/fail7603a.d | 4 +- compiler/test/fail_compilation/fail7603b.d | 4 +- compiler/test/fail_compilation/fail7603c.d | 4 +- compiler/test/fail_compilation/fail77.d | 4 +- compiler/test/fail_compilation/fail7702.d | 4 +- compiler/test/fail_compilation/fail7751.d | 8 +- compiler/test/fail_compilation/fail78.d | 4 +- compiler/test/fail_compilation/fail7848.d | 48 +- compiler/test/fail_compilation/fail7851.d | 12 +- compiler/test/fail_compilation/fail7859.d | 4 +- compiler/test/fail_compilation/fail7861.d | 8 +- compiler/test/fail_compilation/fail7862.d | 8 +- compiler/test/fail_compilation/fail79.d | 4 +- compiler/test/fail_compilation/fail7903.d | 12 +- compiler/test/fail_compilation/fail8009.d | 8 +- compiler/test/fail_compilation/fail8032.d | 4 +- compiler/test/fail_compilation/fail80_m32.d | 8 +- compiler/test/fail_compilation/fail80_m64.d | 8 +- compiler/test/fail_compilation/fail8168.d | 4 +- compiler/test/fail_compilation/fail8179b.d | 4 +- compiler/test/fail_compilation/fail8217.d | 4 +- compiler/test/fail_compilation/fail8262.d | 12 +- compiler/test/fail_compilation/fail8313.d | 12 +- compiler/test/fail_compilation/fail8373.d | 16 +- compiler/test/fail_compilation/fail86.d | 4 +- compiler/test/fail_compilation/fail8631.d | 4 +- compiler/test/fail_compilation/fail8691.d | 4 +- compiler/test/fail_compilation/fail8724.d | 8 +- compiler/test/fail_compilation/fail9.d | 8 +- compiler/test/fail_compilation/fail9063.d | 4 +- compiler/test/fail_compilation/fail9081.d | 12 +- compiler/test/fail_compilation/fail91.d | 4 +- compiler/test/fail_compilation/fail92.d | 8 +- compiler/test/fail_compilation/fail9279.d | 8 +- compiler/test/fail_compilation/fail9290.d | 8 +- compiler/test/fail_compilation/fail93.d | 8 +- compiler/test/fail_compilation/fail9301.d | 4 +- compiler/test/fail_compilation/fail9346.d | 8 +- compiler/test/fail_compilation/fail94.d | 4 +- compiler/test/fail_compilation/fail9413.d | 72 ++- compiler/test/fail_compilation/fail9414a.d | 72 ++- compiler/test/fail_compilation/fail9414b.d | 72 ++- compiler/test/fail_compilation/fail9414c.d | 72 ++- compiler/test/fail_compilation/fail9414d.d | 72 ++- compiler/test/fail_compilation/fail95.d | 8 +- compiler/test/fail_compilation/fail9537.d | 4 +- compiler/test/fail_compilation/fail9562.d | 20 +- compiler/test/fail_compilation/fail9572.d | 4 +- compiler/test/fail_compilation/fail96.d | 4 +- compiler/test/fail_compilation/fail9613.d | 8 +- compiler/test/fail_compilation/fail9665a.d | 108 +++- compiler/test/fail_compilation/fail97.d | 4 +- compiler/test/fail_compilation/fail9710.d | 4 +- compiler/test/fail_compilation/fail9735.d | 4 +- compiler/test/fail_compilation/fail9766.d | 21 +- compiler/test/fail_compilation/fail9773.d | 4 +- compiler/test/fail_compilation/fail9790.d | 16 +- compiler/test/fail_compilation/fail98.d | 4 +- compiler/test/fail_compilation/fail9891.d | 12 +- compiler/test/fail_compilation/fail9892.d | 4 +- compiler/test/fail_compilation/fail99.d | 6 +- compiler/test/fail_compilation/fail9936.d | 20 +- .../test/fail_compilation/failCopyCtor2.d | 12 +- .../test/fail_compilation/fail_arrayexp.d | 8 +- compiler/test/fail_compilation/fail_casting.d | 87 +--- .../test/fail_compilation/fail_casting2.d | 12 +- .../test/fail_compilation/fail_contracts1.d | 4 +- .../test/fail_compilation/fail_contracts2.d | 4 +- .../test/fail_compilation/fail_contracts3.d | 4 +- .../test/fail_compilation/fail_isZeroInit.d | 4 +- compiler/test/fail_compilation/fail_scope.d | 36 +- compiler/test/fail_compilation/fail_typeof.d | 36 +- .../test/fail_compilation/failcontracts.d | 34 +- compiler/test/fail_compilation/failcstuff1.c | 256 ++++++--- compiler/test/fail_compilation/failcstuff2.c | 144 +++-- compiler/test/fail_compilation/faildeleteaa.d | 6 +- compiler/test/fail_compilation/failescape.d | 4 +- compiler/test/fail_compilation/failinout1.d | 4 +- compiler/test/fail_compilation/failinout2.d | 8 +- compiler/test/fail_compilation/failoffset.d | 8 +- compiler/test/fail_compilation/failsafea.d | 8 +- compiler/test/fail_compilation/failsafeb.d | 4 +- compiler/test/fail_compilation/failsafec.d | 4 +- compiler/test/fail_compilation/finalswitch.d | 52 +- .../fail_compilation/finalswitch_verbose.d | 44 +- compiler/test/fail_compilation/fix17349.d | 4 +- compiler/test/fail_compilation/fix17751.d | 4 +- compiler/test/fail_compilation/fix18575.d | 16 +- compiler/test/fail_compilation/fix19018.d | 20 +- compiler/test/fail_compilation/fix19059.d | 20 +- compiler/test/fail_compilation/fix19246.d | 16 +- compiler/test/fail_compilation/fix22108.d | 4 +- compiler/test/fail_compilation/fix23138.d | 4 +- compiler/test/fail_compilation/fix350a.d | 8 +- compiler/test/fail_compilation/fix350b.d | 12 +- compiler/test/fail_compilation/fix5212.d | 4 +- compiler/test/fail_compilation/fnconstraint.d | 22 +- compiler/test/fail_compilation/foreach.d | 12 +- compiler/test/fail_compilation/foreach2.d | 20 +- .../fail_compilation/foreach_index_overflow.d | 16 +- compiler/test/fail_compilation/funcpostattr.d | 20 +- compiler/test/fail_compilation/gag4269a.d | 4 +- compiler/test/fail_compilation/gag4269b.d | 4 +- compiler/test/fail_compilation/gag4269c.d | 4 +- compiler/test/fail_compilation/gag4269d.d | 4 +- compiler/test/fail_compilation/gag4269e.d | 4 +- compiler/test/fail_compilation/gag4269f.d | 8 +- compiler/test/fail_compilation/gag4269g.d | 4 +- compiler/test/fail_compilation/gccasm1.c | 4 +- compiler/test/fail_compilation/hexstring.d | 56 +- compiler/test/fail_compilation/ice10016.d | 8 +- compiler/test/fail_compilation/ice10076.d | 12 +- compiler/test/fail_compilation/ice10212.d | 8 +- compiler/test/fail_compilation/ice10273.d | 16 +- compiler/test/fail_compilation/ice10283.d | 4 +- compiler/test/fail_compilation/ice10341.d | 4 +- compiler/test/fail_compilation/ice10382.d | 4 +- compiler/test/fail_compilation/ice10419.d | 4 +- compiler/test/fail_compilation/ice10598.d | 4 + compiler/test/fail_compilation/ice10599.d | 12 +- compiler/test/fail_compilation/ice10600.d | 4 +- compiler/test/fail_compilation/ice10616.d | 4 +- compiler/test/fail_compilation/ice10624.d | 12 +- compiler/test/fail_compilation/ice10651.d | 12 +- compiler/test/fail_compilation/ice10713.d | 8 +- compiler/test/fail_compilation/ice10727a.d | 6 + compiler/test/fail_compilation/ice10727b.d | 6 + compiler/test/fail_compilation/ice10922.d | 10 +- compiler/test/fail_compilation/ice10938.d | 10 +- compiler/test/fail_compilation/ice10949.d | 16 +- compiler/test/fail_compilation/ice11086.d | 4 +- compiler/test/fail_compilation/ice11136.d | 2 + compiler/test/fail_compilation/ice11153.d | 8 +- compiler/test/fail_compilation/ice11404.d | 4 +- compiler/test/fail_compilation/ice1144.d | 8 +- compiler/test/fail_compilation/ice11472.d | 8 +- compiler/test/fail_compilation/ice11513a.d | 2 + compiler/test/fail_compilation/ice11513b.d | 2 + compiler/test/fail_compilation/ice11518.d | 12 +- compiler/test/fail_compilation/ice11552.d | 12 +- compiler/test/fail_compilation/ice11553.d | 8 +- compiler/test/fail_compilation/ice11626.d | 4 +- compiler/test/fail_compilation/ice11726.d | 4 +- compiler/test/fail_compilation/ice11793.d | 4 +- compiler/test/fail_compilation/ice11822.d | 16 +- compiler/test/fail_compilation/ice11849b.d | 12 +- compiler/test/fail_compilation/ice11850.d | 10 +- compiler/test/fail_compilation/ice11856_0.d | 12 +- compiler/test/fail_compilation/ice11856_1.d | 14 +- compiler/test/fail_compilation/ice11919.d | 12 +- compiler/test/fail_compilation/ice11922.d | 8 +- compiler/test/fail_compilation/ice11925.d | 8 +- compiler/test/fail_compilation/ice11926.d | 8 +- compiler/test/fail_compilation/ice11944.d | 4 +- compiler/test/fail_compilation/ice11963.d | 16 +- compiler/test/fail_compilation/ice11965.d | 12 +- compiler/test/fail_compilation/ice11967.d | 20 +- compiler/test/fail_compilation/ice11968.d | 6 +- compiler/test/fail_compilation/ice11969.d | 12 +- compiler/test/fail_compilation/ice11974.d | 4 +- compiler/test/fail_compilation/ice11982.d | 32 +- compiler/test/fail_compilation/ice12040.d | 4 +- compiler/test/fail_compilation/ice12158.d | 4 +- compiler/test/fail_compilation/ice12174.d | 12 +- compiler/test/fail_compilation/ice12235.d | 12 +- compiler/test/fail_compilation/ice12350.d | 8 +- compiler/test/fail_compilation/ice12362.d | 4 +- compiler/test/fail_compilation/ice12397.d | 4 +- compiler/test/fail_compilation/ice12501.d | 24 +- compiler/test/fail_compilation/ice12534.d | 4 +- compiler/test/fail_compilation/ice12539.d | 4 +- compiler/test/fail_compilation/ice12574.d | 8 +- compiler/test/fail_compilation/ice12581.d | 4 +- compiler/test/fail_compilation/ice12673.d | 4 +- compiler/test/fail_compilation/ice12727.d | 20 +- compiler/test/fail_compilation/ice12827.d | 4 +- compiler/test/fail_compilation/ice12836.d | 8 +- compiler/test/fail_compilation/ice12838.d | 4 +- compiler/test/fail_compilation/ice12841.d | 8 +- compiler/test/fail_compilation/ice12850.d | 4 +- compiler/test/fail_compilation/ice12902.d | 8 +- compiler/test/fail_compilation/ice12907.d | 4 +- compiler/test/fail_compilation/ice13027.d | 4 +- compiler/test/fail_compilation/ice13081.d | 16 +- compiler/test/fail_compilation/ice13131.d | 2 + compiler/test/fail_compilation/ice13220.d | 4 +- compiler/test/fail_compilation/ice13221.d | 4 +- compiler/test/fail_compilation/ice13225.d | 8 +- compiler/test/fail_compilation/ice13311.d | 2 + compiler/test/fail_compilation/ice13356.d | 12 +- compiler/test/fail_compilation/ice13382.d | 32 +- compiler/test/fail_compilation/ice13385.d | 4 +- compiler/test/fail_compilation/ice13459.d | 12 +- compiler/test/fail_compilation/ice13465a.d | 6 +- compiler/test/fail_compilation/ice13465b.d | 6 +- compiler/test/fail_compilation/ice13563.d | 4 +- compiler/test/fail_compilation/ice1358.d | 4 +- compiler/test/fail_compilation/ice13644.d | 4 +- compiler/test/fail_compilation/ice13788.d | 16 +- compiler/test/fail_compilation/ice13816.d | 12 +- compiler/test/fail_compilation/ice13835.d | 8 +- compiler/test/fail_compilation/ice13921.d | 8 +- compiler/test/fail_compilation/ice13987.d | 4 +- compiler/test/fail_compilation/ice14055.d | 4 +- compiler/test/fail_compilation/ice14096.d | 12 +- compiler/test/fail_compilation/ice14116.d | 2 + compiler/test/fail_compilation/ice14130.d | 12 +- compiler/test/fail_compilation/ice14146.d | 4 +- compiler/test/fail_compilation/ice14177.d | 4 +- compiler/test/fail_compilation/ice14185.d | 4 +- compiler/test/fail_compilation/ice14272.d | 8 +- compiler/test/fail_compilation/ice14424.d | 4 +- compiler/test/fail_compilation/ice14446.d | 2 + compiler/test/fail_compilation/ice14621.d | 8 +- compiler/test/fail_compilation/ice14642.d | 8 +- compiler/test/fail_compilation/ice14844.d | 6 +- compiler/test/fail_compilation/ice14907.d | 28 +- compiler/test/fail_compilation/ice14923.d | 14 +- compiler/test/fail_compilation/ice15002.d | 8 +- compiler/test/fail_compilation/ice15092.d | 12 +- compiler/test/fail_compilation/ice15127.d | 24 +- compiler/test/fail_compilation/ice15172.d | 4 +- compiler/test/fail_compilation/ice15317.d | 4 +- compiler/test/fail_compilation/ice15332.d | 8 +- compiler/test/fail_compilation/ice15441.d | 8 +- compiler/test/fail_compilation/ice15688.d | 8 +- compiler/test/fail_compilation/ice15788.d | 10 +- compiler/test/fail_compilation/ice15816.d | 2 + compiler/test/fail_compilation/ice15855.d | 24 +- compiler/test/fail_compilation/ice15922.d | 20 +- compiler/test/fail_compilation/ice16035.d | 8 +- compiler/test/fail_compilation/ice16657.d | 4 +- compiler/test/fail_compilation/ice17074.d | 12 +- compiler/test/fail_compilation/ice17690.d | 4 +- compiler/test/fail_compilation/ice17831.d | 40 +- compiler/test/fail_compilation/ice18469.d | 4 +- compiler/test/fail_compilation/ice18753.d | 16 +- compiler/test/fail_compilation/ice19755.d | 8 +- compiler/test/fail_compilation/ice19762.d | 4 +- compiler/test/fail_compilation/ice19887.d | 4 +- compiler/test/fail_compilation/ice19950.d | 8 +- compiler/test/fail_compilation/ice20042.d | 8 +- compiler/test/fail_compilation/ice20056.d | 4 +- compiler/test/fail_compilation/ice20057.d | 4 +- compiler/test/fail_compilation/ice20264.d | 4 +- compiler/test/fail_compilation/ice20545.d | 4 +- compiler/test/fail_compilation/ice20709.d | 4 +- compiler/test/fail_compilation/ice21060.d | 2 + compiler/test/fail_compilation/ice21095.d | 8 +- compiler/test/fail_compilation/ice22377.d | 4 +- compiler/test/fail_compilation/ice22516.d | 4 +- compiler/test/fail_compilation/ice23097.d | 18 +- compiler/test/fail_compilation/ice23564.d | 4 +- compiler/test/fail_compilation/ice23569.d | 4 +- compiler/test/fail_compilation/ice23781.d | 4 +- compiler/test/fail_compilation/ice24188.d | 4 +- compiler/test/fail_compilation/ice2843.d | 4 +- compiler/test/fail_compilation/ice4094.d | 8 +- compiler/test/fail_compilation/ice4983.d | 4 +- compiler/test/fail_compilation/ice5996.d | 4 +- compiler/test/fail_compilation/ice6538.d | 12 +- compiler/test/fail_compilation/ice7645.d | 8 +- compiler/test/fail_compilation/ice7782.d | 6 +- compiler/test/fail_compilation/ice8100.d | 16 +- compiler/test/fail_compilation/ice8309.d | 4 +- compiler/test/fail_compilation/ice8499.d | 4 +- compiler/test/fail_compilation/ice8604.d | 4 +- compiler/test/fail_compilation/ice8630.d | 8 +- compiler/test/fail_compilation/ice8711.d | 4 +- compiler/test/fail_compilation/ice8742.d | 4 +- compiler/test/fail_compilation/ice9013.d | 4 +- compiler/test/fail_compilation/ice9254a.d | 24 +- compiler/test/fail_compilation/ice9254b.d | 24 +- compiler/test/fail_compilation/ice9254c.d | 24 +- compiler/test/fail_compilation/ice9273a.d | 8 +- compiler/test/fail_compilation/ice9273b.d | 4 +- compiler/test/fail_compilation/ice9284.d | 12 +- compiler/test/fail_compilation/ice9291.d | 4 +- compiler/test/fail_compilation/ice9338.d | 8 +- compiler/test/fail_compilation/ice9406.d | 4 +- compiler/test/fail_compilation/ice9439.d | 12 +- compiler/test/fail_compilation/ice9494.d | 12 +- compiler/test/fail_compilation/ice9540.d | 14 +- compiler/test/fail_compilation/ice9545.d | 4 +- compiler/test/fail_compilation/ice9759.d | 8 +- compiler/test/fail_compilation/ice9865.d | 4 +- .../fail_compilation/iconv_interface_array.d | 30 +- .../test/fail_compilation/immutable_ctor.d | 4 +- compiler/test/fail_compilation/imphint.d | 188 +++++-- .../interpolatedexpressionsequence_postfix.d | 12 +- .../test/fail_compilation/isreturnonstack.d | 8 +- compiler/test/fail_compilation/issue11070.d | 4 +- compiler/test/fail_compilation/issue15103.d | 12 +- compiler/test/fail_compilation/issue16020.d | 14 +- compiler/test/fail_compilation/issue20422.d | 16 +- compiler/test/fail_compilation/issue20627.d | 48 +- compiler/test/fail_compilation/issue20704.d | 32 +- compiler/test/fail_compilation/issue21203.d | 6 +- compiler/test/fail_compilation/issue21295.d | 4 +- compiler/test/fail_compilation/issue21378.d | 12 +- .../test/fail_compilation/issue21685_main.d | 8 +- compiler/test/fail_compilation/issue22682.d | 20 +- compiler/test/fail_compilation/issue23947.d | 4 +- compiler/test/fail_compilation/issue24534.d | 16 +- compiler/test/fail_compilation/issue3396.d | 6 +- compiler/test/fail_compilation/issue3827.d | 12 +- compiler/test/fail_compilation/lexer1.d | 88 +++- compiler/test/fail_compilation/lexer2.d | 18 +- compiler/test/fail_compilation/lexer23465.d | 24 +- compiler/test/fail_compilation/lexer3.d | 6 +- compiler/test/fail_compilation/lexer4.d | 50 +- compiler/test/fail_compilation/lexer5.d | 12 +- compiler/test/fail_compilation/lookup.d | 16 +- compiler/test/fail_compilation/main.d | 8 +- compiler/test/fail_compilation/mangle1.d | 4 +- compiler/test/fail_compilation/mangle2.d | 48 +- .../test/fail_compilation/match_func_ptr.d | 16 +- .../fail_compilation/misc_parser_err_cov1.d | 88 +++- .../test/fail_compilation/mixin_template.d | 4 +- compiler/test/fail_compilation/mixinprop.d | 4 +- compiler/test/fail_compilation/mixintype2.d | 18 +- .../test/fail_compilation/moduleundefuda.d | 4 +- compiler/test/fail_compilation/msg24094.c | 4 +- compiler/test/fail_compilation/must_use.d | 8 +- .../test/fail_compilation/must_use_comma.d | 4 +- .../test/fail_compilation/must_use_opunary.d | 4 +- .../test/fail_compilation/must_use_reserved.d | 24 +- .../test/fail_compilation/must_use_template.d | 4 +- .../test/fail_compilation/must_use_union.d | 4 +- .../fail_compilation/named_arguments_error.d | 70 ++- .../named_arguments_ifti_error.d | 24 +- .../named_arguments_overload.d | 32 +- .../fail_compilation/named_arguments_parse.d | 8 +- .../named_arguments_struct_literal.d | 4 +- .../nested_template_constraint.d | 12 +- compiler/test/fail_compilation/nestedtempl0.d | 16 +- compiler/test/fail_compilation/nestedtempl1.d | 12 +- compiler/test/fail_compilation/nestedtempl2.d | 32 +- compiler/test/fail_compilation/nestedtempl3.d | 4 +- compiler/test/fail_compilation/no_Throwable.d | 8 +- compiler/test/fail_compilation/no_TypeInfo.d | 4 +- .../test/fail_compilation/noreturn_expr.d | 4 +- .../test/fail_compilation/noreturn_expr2.d | 4 +- compiler/test/fail_compilation/notype.d | 10 + compiler/test/fail_compilation/numliteral.c | 4 +- compiler/test/fail_compilation/ob1.d | 4 +- .../test/fail_compilation/obsolete_body.d | 4 +- .../fail_compilation/onemember_overloads.d | 44 +- .../fail_compilation/operator_undefined.d | 4 +- compiler/test/fail_compilation/parse12924.d | 28 +- compiler/test/fail_compilation/parse12967b.d | 64 ++- compiler/test/fail_compilation/parse13361.d | 12 +- compiler/test/fail_compilation/parse14745.d | 8 +- compiler/test/fail_compilation/pragmainline.d | 4 +- compiler/test/fail_compilation/previewin.d | 20 + compiler/test/fail_compilation/previewin2.d | 2 + compiler/test/fail_compilation/protattr1.d | 2 + compiler/test/fail_compilation/protattr2.d | 2 + compiler/test/fail_compilation/protattr3.d | 2 + compiler/test/fail_compilation/reg6769.d | 24 +- .../test/fail_compilation/reserved_version.d | 490 +++++++++++++----- compiler/test/fail_compilation/retref2.d | 8 +- compiler/test/fail_compilation/safe_gshared.d | 8 +- .../fail_compilation/safe_pointer_index.d | 4 +- compiler/test/fail_compilation/scope_class.d | 4 +- compiler/test/fail_compilation/skip.d | 16 +- compiler/test/fail_compilation/spell23908.d | 2 + compiler/test/fail_compilation/spell9644.d | 32 +- .../fail_compilation/standalone_modctor.d | 12 +- .../test/fail_compilation/static_import.d | 4 +- .../fail_compilation/staticarrayoverflow.d | 32 +- .../fail_compilation/staticassert_sema1.d | 4 +- .../test/fail_compilation/staticassertargs.d | 4 +- .../fail_compilation/staticassertargsfail.d | 8 +- .../test/fail_compilation/staticforeach1.d | 4 +- .../test/fail_compilation/staticforeach2.d | 4 +- .../test/fail_compilation/staticforeach3.d | 4 +- compiler/test/fail_compilation/switches.d | 8 +- .../test/fail_compilation/system_ptr_cast.d | 12 +- .../test/fail_compilation/systemvariables.d | 72 ++- .../systemvariables_bool_union.d | 4 +- .../systemvariables_deprecation.d | 14 +- .../fail_compilation/systemvariables_struct.d | 36 +- .../systemvariables_var_init.d | 24 +- .../systemvariables_void_init.d | 28 +- .../test/fail_compilation/template_decl.d | 8 +- .../fail_compilation/template_enum_param.d | 8 +- .../fail_compilation/template_function_oop.d | 8 +- .../test/fail_compilation/templateoverload.d | 28 +- compiler/test/fail_compilation/templatethis.d | 22 +- compiler/test/fail_compilation/test10.d | 4 +- compiler/test/fail_compilation/test11006.d | 16 +- compiler/test/fail_compilation/test11047.d | 8 +- compiler/test/fail_compilation/test11176.d | 6 +- compiler/test/fail_compilation/test11471.d | 4 +- compiler/test/fail_compilation/test12228.d | 12 +- compiler/test/fail_compilation/test12385.d | 4 +- compiler/test/fail_compilation/test12430.d | 4 +- compiler/test/fail_compilation/test12558.d | 48 +- compiler/test/fail_compilation/test128.i | 8 +- compiler/test/fail_compilation/test12822.d | 8 +- compiler/test/fail_compilation/test13152.d | 4 +- compiler/test/fail_compilation/test13536.d | 8 +- compiler/test/fail_compilation/test13537.d | 16 +- compiler/test/fail_compilation/test13698.d | 4 +- compiler/test/fail_compilation/test13786.d | 28 +- compiler/test/fail_compilation/test13867.d | 8 +- compiler/test/fail_compilation/test14064.d | 20 +- compiler/test/fail_compilation/test14238.d | 16 +- compiler/test/fail_compilation/test143.d | 4 +- compiler/test/fail_compilation/test14496.d | 24 +- compiler/test/fail_compilation/test14538.d | 4 +- compiler/test/fail_compilation/test15177.d | 6 +- compiler/test/fail_compilation/test15191.d | 20 +- compiler/test/fail_compilation/test15306.d | 8 +- compiler/test/fail_compilation/test15368.d | 4 +- compiler/test/fail_compilation/test15373.d | 4 +- compiler/test/fail_compilation/test15399.d | 32 +- compiler/test/fail_compilation/test15525.d | 6 +- compiler/test/fail_compilation/test15660.d | 20 +- compiler/test/fail_compilation/test15672.d | 12 +- compiler/test/fail_compilation/test15703.d | 30 +- compiler/test/fail_compilation/test15704.d | 12 +- compiler/test/fail_compilation/test15785.d | 10 +- compiler/test/fail_compilation/test15785b.d | 12 +- compiler/test/fail_compilation/test15897.d | 6 +- compiler/test/fail_compilation/test15925.d | 8 +- compiler/test/fail_compilation/test15989.d | 12 +- compiler/test/fail_compilation/test16095.d | 12 +- compiler/test/fail_compilation/test16116.d | 4 +- compiler/test/fail_compilation/test16193.d | 12 +- compiler/test/fail_compilation/test16195.d | 6 +- compiler/test/fail_compilation/test16228.d | 4 +- compiler/test/fail_compilation/test16284.d | 12 +- compiler/test/fail_compilation/test16365.d | 12 +- compiler/test/fail_compilation/test16381.d | 4 +- compiler/test/fail_compilation/test16443.d | 8 +- compiler/test/fail_compilation/test16495.d | 8 +- compiler/test/fail_compilation/test16523.d | 4 +- compiler/test/fail_compilation/test16589.d | 40 +- compiler/test/fail_compilation/test16694.d | 4 +- compiler/test/fail_compilation/test17096.d | 96 +++- compiler/test/fail_compilation/test17284.d | 4 +- compiler/test/fail_compilation/test17307.d | 4 +- compiler/test/fail_compilation/test17380.d | 4 +- .../test/fail_compilation/test17380spec.d | 16 +- compiler/test/fail_compilation/test17422.d | 4 +- compiler/test/fail_compilation/test17423.d | 8 +- compiler/test/fail_compilation/test17425.d | 16 +- compiler/test/fail_compilation/test17451.d | 16 +- compiler/test/fail_compilation/test17586.d | 4 +- compiler/test/fail_compilation/test17868.d | 16 +- compiler/test/fail_compilation/test17868b.d | 12 +- compiler/test/fail_compilation/test17892.d | 12 +- compiler/test/fail_compilation/test17908a.d | 4 +- compiler/test/fail_compilation/test17908b.d | 4 +- compiler/test/fail_compilation/test17959.d | 8 +- compiler/test/fail_compilation/test17977.d | 4 +- compiler/test/fail_compilation/test18130.d | 4 +- compiler/test/fail_compilation/test18282.d | 52 +- compiler/test/fail_compilation/test18312.d | 4 +- compiler/test/fail_compilation/test18385.d | 4 +- compiler/test/fail_compilation/test18480.d | 4 + compiler/test/fail_compilation/test18484.d | 8 +- compiler/test/fail_compilation/test18597.d | 12 +- compiler/test/fail_compilation/test18607.d | 4 +- compiler/test/fail_compilation/test18644.d | 10 +- compiler/test/fail_compilation/test18708.d | 16 +- compiler/test/fail_compilation/test18736.d | 4 +- compiler/test/fail_compilation/test19097.d | 32 +- compiler/test/fail_compilation/test19107.d | 8 +- compiler/test/fail_compilation/test19112.d | 8 +- compiler/test/fail_compilation/test19176.d | 4 +- compiler/test/fail_compilation/test19193.d | 4 +- compiler/test/fail_compilation/test19473.d | 4 +- compiler/test/fail_compilation/test19608.d | 4 +- compiler/test/fail_compilation/test19646.d | 10 +- compiler/test/fail_compilation/test19661.d | 4 +- compiler/test/fail_compilation/test19971.d | 16 +- compiler/test/fail_compilation/test20023.d | 6 +- compiler/test/fail_compilation/test20096.d | 4 +- compiler/test/fail_compilation/test20149.d | 4 +- compiler/test/fail_compilation/test20245.d | 40 +- compiler/test/fail_compilation/test20267.d | 26 +- compiler/test/fail_compilation/test20324.d | 8 +- compiler/test/fail_compilation/test20383.d | 4 +- compiler/test/fail_compilation/test20515.d | 8 +- compiler/test/fail_compilation/test20522.d | 4 +- compiler/test/fail_compilation/test20549.d | 4 +- compiler/test/fail_compilation/test20569.d | 8 +- compiler/test/fail_compilation/test20610.d | 4 +- compiler/test/fail_compilation/test20626.d | 2 + compiler/test/fail_compilation/test20655.d | 30 +- compiler/test/fail_compilation/test20719.d | 12 +- compiler/test/fail_compilation/test20881.d | 16 +- compiler/test/fail_compilation/test20903.d | 4 +- compiler/test/fail_compilation/test20919.d | 4 +- compiler/test/fail_compilation/test21025.d | 16 +- compiler/test/fail_compilation/test21062.d | 18 +- compiler/test/fail_compilation/test21093.d | 16 +- compiler/test/fail_compilation/test21096.d | 6 +- compiler/test/fail_compilation/test21164.d | 6 +- compiler/test/fail_compilation/test21198.d | 4 +- compiler/test/fail_compilation/test21204.d | 4 +- compiler/test/fail_compilation/test21246.d | 4 +- compiler/test/fail_compilation/test21259.d | 16 +- compiler/test/fail_compilation/test21319.d | 4 +- compiler/test/fail_compilation/test21353.d | 26 +- compiler/test/fail_compilation/test21380.d | 8 +- compiler/test/fail_compilation/test21443.d | 6 +- compiler/test/fail_compilation/test21518.d | 20 +- compiler/test/fail_compilation/test21651.d | 4 +- compiler/test/fail_compilation/test21665.d | 8 +- compiler/test/fail_compilation/test21912.d | 48 +- compiler/test/fail_compilation/test21927.d | 8 +- compiler/test/fail_compilation/test21930.d | 12 +- compiler/test/fail_compilation/test21939.d | 8 +- compiler/test/fail_compilation/test21995.d | 4 +- compiler/test/fail_compilation/test22048.d | 4 +- compiler/test/fail_compilation/test22070.c | 4 +- compiler/test/fail_compilation/test22227.d | 8 +- compiler/test/fail_compilation/test22298.d | 8 +- compiler/test/fail_compilation/test22329.d | 12 +- compiler/test/fail_compilation/test22686.d | 4 +- compiler/test/fail_compilation/test22709.d | 8 +- compiler/test/fail_compilation/test22765.d | 4 +- compiler/test/fail_compilation/test22840.d | 4 +- compiler/test/fail_compilation/test22910.d | 8 +- compiler/test/fail_compilation/test22935.c | 4 +- compiler/test/fail_compilation/test22977.d | 8 +- compiler/test/fail_compilation/test22999.d | 8 +- compiler/test/fail_compilation/test23017.d | 4 +- compiler/test/fail_compilation/test23022.d | 4 +- compiler/test/fail_compilation/test23073.d | 8 +- compiler/test/fail_compilation/test23159.d | 8 +- compiler/test/fail_compilation/test23170.d | 4 +- compiler/test/fail_compilation/test23216.d | 8 +- compiler/test/fail_compilation/test23279.d | 4 +- compiler/test/fail_compilation/test23491.d | 12 +- compiler/test/fail_compilation/test23552.d | 4 +- compiler/test/fail_compilation/test23607.d | 8 +- compiler/test/fail_compilation/test23674.d | 8 +- compiler/test/fail_compilation/test23715.i | 4 +- compiler/test/fail_compilation/test23719.c | 4 +- compiler/test/fail_compilation/test23786.d | 30 +- compiler/test/fail_compilation/test23875.c | 8 +- compiler/test/fail_compilation/test23882.d | 4 +- compiler/test/fail_compilation/test23905.d | 4 +- compiler/test/fail_compilation/test23968.d | 4 +- compiler/test/fail_compilation/test23982.d | 8 +- compiler/test/fail_compilation/test24015.d | 4 +- compiler/test/fail_compilation/test24036.d | 8 +- compiler/test/fail_compilation/test24065.d | 12 +- compiler/test/fail_compilation/test24110.d | 4 +- compiler/test/fail_compilation/test24157.d | 8 +- compiler/test/fail_compilation/test24159.d | 4 +- compiler/test/fail_compilation/test24353.d | 8 +- compiler/test/fail_compilation/test24365.d | 12 +- compiler/test/fail_compilation/test24680.d | 4 +- compiler/test/fail_compilation/test24694.d | 4 +- compiler/test/fail_compilation/test24745.d | 4 +- compiler/test/fail_compilation/test314.d | 16 +- compiler/test/fail_compilation/test4682.d | 16 +- compiler/test/fail_compilation/test4682a.d | 16 +- compiler/test/fail_compilation/test4838.d | 24 +- compiler/test/fail_compilation/test4946.d | 28 +- compiler/test/fail_compilation/test5412a.d | 4 +- compiler/test/fail_compilation/test5412b.d | 4 +- compiler/test/fail_compilation/test5412c.d | 4 +- compiler/test/fail_compilation/test64.d | 2 + compiler/test/fail_compilation/test6883.d | 16 +- compiler/test/fail_compilation/test8509.d | 8 +- compiler/test/fail_compilation/test8556.d | 8 +- compiler/test/fail_compilation/test8662.d | 28 +- compiler/test/fail_compilation/test8751.d | 4 +- compiler/test/fail_compilation/test9150.d | 4 +- compiler/test/fail_compilation/test9176.d | 8 +- compiler/test/fail_compilation/test9701.d | 100 +++- compiler/test/fail_compilation/test9701b.d | 8 +- compiler/test/fail_compilation/testCols.d | 4 +- compiler/test/fail_compilation/testTypeof.c | 12 +- .../test/fail_compilation/testscopestatic.d | 16 +- compiler/test/fail_compilation/throwexp.d | 8 +- compiler/test/fail_compilation/tolvalue.d | 48 +- .../test/fail_compilation/trait_loc_err.d | 12 +- .../test/fail_compilation/trait_loc_ov_err.d | 8 +- compiler/test/fail_compilation/traits.d | 153 +++--- .../test/fail_compilation/traits_parameters.d | 8 +- compiler/test/fail_compilation/typeerrors.d | 80 ++- compiler/test/fail_compilation/udaparams.d | 92 +++- compiler/test/fail_compilation/udatypes.d | 4 +- compiler/test/fail_compilation/ufcs.d | 48 +- compiler/test/fail_compilation/union_conv.d | 4 +- .../test/fail_compilation/var_func_attr.d | 4 +- compiler/test/fail_compilation/vector_cast.d | 8 +- compiler/test/fail_compilation/vector_types.d | 24 +- .../test/fail_compilation/verifyhookexist.d | 24 +- compiler/test/fail_compilation/verrors0.d | 50 ++ compiler/test/fail_compilation/verrors5.d | 10 + compiler/test/fail_compilation/void_cat.d | 12 +- compiler/test/fail_compilation/warn13679.d | 4 +- compiler/test/fail_compilation/widechars.d | 4 +- compiler/test/runnable/future.d | 8 +- compiler/test/runnable/implicit.d | 8 +- compiler/test/runnable/lexer.d | 8 +- compiler/test/runnable/template10.d | 212 ++++++-- compiler/test/runnable/test8.d | 4 +- 1507 files changed, 14393 insertions(+), 5158 deletions(-) diff --git a/compiler/src/dmd/globals.d b/compiler/src/dmd/globals.d index a8a8afd2abbf..edba6e49bd80 100644 --- a/compiler/src/dmd/globals.d +++ b/compiler/src/dmd/globals.d @@ -391,6 +391,8 @@ extern (C++) struct Global params.v.color = detectTerminal(); } + params.v.printErrorContext = true; // Enable error context globally by default + compileEnv.versionNumber = parseVersionNumber(versionString()); /* Initialize date, time, and timestamp diff --git a/compiler/src/dmd/mars.d b/compiler/src/dmd/mars.d index a2e202cf33d8..9e6083f5824d 100644 --- a/compiler/src/dmd/mars.d +++ b/compiler/src/dmd/mars.d @@ -1008,6 +1008,10 @@ bool parseCommandLine(const ref Strings arguments, const size_t argc, ref Param { params.v.printErrorContext = true; } + else if (startsWith(p + 9, "none")) + { + params.v.printErrorContext = false; // Disable error context + } else if (!params.v.errorLimit.parseDigits(p.toDString()[9 .. $])) { errorInvalidSwitch(p, "Only number, `spec`, or `context` are allowed for `-verrors`"); diff --git a/compiler/test/compilable/b16976.d b/compiler/test/compilable/b16976.d index f5f45ef9076b..f5f39435ceab 100644 --- a/compiler/test/compilable/b16976.d +++ b/compiler/test/compilable/b16976.d @@ -1,26 +1,66 @@ /* REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -compilable/b16976.d(33): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(34): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(35): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(36): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(41): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(42): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(43): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(44): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(50): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(51): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(52): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(53): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(58): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(59): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(60): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(61): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(62): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(63): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -compilable/b16976.d(64): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` -compilable/b16976.d(65): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` +compilable/b16976.d(73): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach(int i, v; dyn) { } + ^ +compilable/b16976.d(74): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach_reverse(int i, v; dyn) { } + ^ +compilable/b16976.d(75): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach(char i, v; dyn) { } + ^ +compilable/b16976.d(76): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach_reverse(char i, v; dyn) { } + ^ +compilable/b16976.d(81): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach(int i, v; str) { } + ^ +compilable/b16976.d(82): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach_reverse(int i, v; str) { } + ^ +compilable/b16976.d(83): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach(char i, v; str) { } + ^ +compilable/b16976.d(84): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach_reverse(char i, v; str) { } + ^ +compilable/b16976.d(90): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach(int i, dchar v; dyn) { } + ^ +compilable/b16976.d(91): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach_reverse(int i, dchar v; dyn) { } + ^ +compilable/b16976.d(92): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach(char i, dchar v; dyn) { } + ^ +compilable/b16976.d(93): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach_reverse(char i, dchar v; dyn) { } + ^ +compilable/b16976.d(98): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach(int i, dchar v; str) { } + ^ +compilable/b16976.d(99): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach_reverse(int i, dchar v; str) { } + ^ +compilable/b16976.d(100): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach(char i, dchar v; str) { } + ^ +compilable/b16976.d(101): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach_reverse(char i, dchar v; str) { } + ^ +compilable/b16976.d(102): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach(int i, dchar v; chr) { } + ^ +compilable/b16976.d(103): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach_reverse(int i, dchar v; chr) { } + ^ +compilable/b16976.d(104): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach(char i, dchar v; chr) { } + ^ +compilable/b16976.d(105): Deprecation: foreach: loop index implicitly converted from `size_t` to `char` + foreach_reverse(char i, dchar v; chr) { } + ^ --- */ void main() diff --git a/compiler/test/compilable/chkformat.d b/compiler/test/compilable/chkformat.d index ccbe974f4001..cf527db2dc56 100644 --- a/compiler/test/compilable/chkformat.d +++ b/compiler/test/compilable/chkformat.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: ---- -compilable/chkformat.d(14): Deprecation: more format specifiers than 0 arguments +compilable/chkformat.d(16): Deprecation: more format specifiers than 0 arguments + printf("%d \n"); + ^ ---- */ import core.stdc.stdio; diff --git a/compiler/test/compilable/compile1.d b/compiler/test/compilable/compile1.d index 676108f68cfa..f182c143d433 100644 --- a/compiler/test/compilable/compile1.d +++ b/compiler/test/compilable/compile1.d @@ -3,7 +3,9 @@ // EXTRA_FILES: imports/a12506.d /* TEST_OUTPUT: --- -compilable/compile1.d(230): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead +compilable/compile1.d(232): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead +cdouble c6096; + ^ --- */ diff --git a/compiler/test/compilable/ddoc10236.d b/compiler/test/compilable/ddoc10236.d index c27289472eb6..1264f55f9728 100644 --- a/compiler/test/compilable/ddoc10236.d +++ b/compiler/test/compilable/ddoc10236.d @@ -4,12 +4,22 @@ /* TEST_OUTPUT: --- -compilable/ddoc10236.d(35): Warning: Ddoc: parameter count mismatch, expected 2, got 1 -compilable/ddoc10236.d(47): Warning: Ddoc: function declaration has no parameter 'y' -compilable/ddoc10236.d(59): Warning: Ddoc: function declaration has no parameter 'y' -compilable/ddoc10236.d(59): Warning: Ddoc: parameter count mismatch, expected 1, got 2 -compilable/ddoc10236.d(71): Warning: Ddoc: parameter count mismatch, expected 2, got 0 -compilable/ddoc10236.d(71): Note that the format is `param = description` +compilable/ddoc10236.d(45): Warning: Ddoc: parameter count mismatch, expected 2, got 1 +void foo_count_mismatch(int x, int y) // Warning: Ddoc: parameter count mismatch + ^ +compilable/ddoc10236.d(57): Warning: Ddoc: function declaration has no parameter 'y' +void foo_no_param_y(int x, int z) // Warning: Ddoc: function declaration has no parameter 'y' + ^ +compilable/ddoc10236.d(69): Warning: Ddoc: function declaration has no parameter 'y' +void foo_count_mismatch_no_param_y(int x) + ^ +compilable/ddoc10236.d(69): Warning: Ddoc: parameter count mismatch, expected 1, got 2 +void foo_count_mismatch_no_param_y(int x) + ^ +compilable/ddoc10236.d(81): Warning: Ddoc: parameter count mismatch, expected 2, got 0 +void foo_count_mismatch_wrong_format(int x, int y) + ^ +compilable/ddoc10236.d(81): Note that the format is `param = description` --- */ diff --git a/compiler/test/compilable/ddoc10236b.d b/compiler/test/compilable/ddoc10236b.d index 85783e8d1472..733eedc4259d 100644 --- a/compiler/test/compilable/ddoc10236b.d +++ b/compiler/test/compilable/ddoc10236b.d @@ -4,11 +4,19 @@ /* TEST_OUTPUT: --- -compilable/ddoc10236b.d(44): Warning: Ddoc: parameter count mismatch, expected 1, got 0 -compilable/ddoc10236b.d(44): Note that the format is `param = description` -compilable/ddoc10236b.d(56): Warning: Ddoc: function declaration has no parameter 'y' -compilable/ddoc10236b.d(68): Warning: Ddoc: function declaration has no parameter 'y' -compilable/ddoc10236b.d(68): Warning: Ddoc: parameter count mismatch, expected 0, got 1 +compilable/ddoc10236b.d(52): Warning: Ddoc: parameter count mismatch, expected 1, got 0 +void foo_count_mismatch(int x)(int y) // Warning: Ddoc: parameter count mismatch + ^ +compilable/ddoc10236b.d(52): Note that the format is `param = description` +compilable/ddoc10236b.d(64): Warning: Ddoc: function declaration has no parameter 'y' +void foo_no_param_y(int x)(int z) // Warning: Ddoc: function declaration has no parameter 'y' + ^ +compilable/ddoc10236b.d(76): Warning: Ddoc: function declaration has no parameter 'y' +void foo_count_mismatch_no_param_y(int x)() + ^ +compilable/ddoc10236b.d(76): Warning: Ddoc: parameter count mismatch, expected 0, got 1 +void foo_count_mismatch_no_param_y(int x)() + ^ --- */ diff --git a/compiler/test/compilable/ddoc13502.d b/compiler/test/compilable/ddoc13502.d index 93f383fea9f1..7c7c5e92af57 100644 --- a/compiler/test/compilable/ddoc13502.d +++ b/compiler/test/compilable/ddoc13502.d @@ -3,10 +3,18 @@ /* TEST_OUTPUT: --- -compilable/ddoc13502.d(14): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. -compilable/ddoc13502.d(17): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. -compilable/ddoc13502.d(21): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. -compilable/ddoc13502.d(24): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. +compilable/ddoc13502.d(22): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. +enum isSomeString(T) = true; + ^ +compilable/ddoc13502.d(25): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. +enum bool isArray(T) = true; + ^ +compilable/ddoc13502.d(29): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. +extern(C) alias int T1; + ^ +compilable/ddoc13502.d(32): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use $(LPAREN) instead for unpaired left parentheses. +extern(C) alias T2 = int; + ^ --- */ diff --git a/compiler/test/compilable/depmsg.d b/compiler/test/compilable/depmsg.d index 9b005d8ff737..76fc16e8765d 100644 --- a/compiler/test/compilable/depmsg.d +++ b/compiler/test/compilable/depmsg.d @@ -2,19 +2,45 @@ REQUIRED_ARGS: -dw TEST_OUTPUT: --- -compilable/depmsg.d(39): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message! -compilable/depmsg.d(39): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message! -compilable/depmsg.d(40): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message! -compilable/depmsg.d(40): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message! -compilable/depmsg.d(41): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message! -compilable/depmsg.d(41): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message! -compilable/depmsg.d(42): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message! -compilable/depmsg.d(42): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message! -compilable/depmsg.d(43): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message! -compilable/depmsg.d(43): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message! -compilable/depmsg.d(45): Deprecation: alias `depmsg.main.Inner.G` is deprecated - With message! -compilable/depmsg.d(46): Deprecation: variable `depmsg.main.Inner.H` is deprecated - With message! -compilable/depmsg.d(47): Deprecation: class `depmsg.main.Inner.I()` is deprecated - With message! +compilable/depmsg.d(65): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message! + A a; + ^ +compilable/depmsg.d(65): Deprecation: struct `depmsg.main.Inner.A` is deprecated - With message! + A a; + ^ +compilable/depmsg.d(66): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message! + B b; + ^ +compilable/depmsg.d(66): Deprecation: class `depmsg.main.Inner.B` is deprecated - With message! + B b; + ^ +compilable/depmsg.d(67): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message! + C c; + ^ +compilable/depmsg.d(67): Deprecation: interface `depmsg.main.Inner.C` is deprecated - With message! + C c; + ^ +compilable/depmsg.d(68): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message! + D d; + ^ +compilable/depmsg.d(68): Deprecation: union `depmsg.main.Inner.D` is deprecated - With message! + D d; + ^ +compilable/depmsg.d(69): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message! + E e; + ^ +compilable/depmsg.d(69): Deprecation: enum `depmsg.main.Inner.E` is deprecated - With message! + E e; + ^ +compilable/depmsg.d(71): Deprecation: alias `depmsg.main.Inner.G` is deprecated - With message! + G g; + ^ +compilable/depmsg.d(72): Deprecation: variable `depmsg.main.Inner.H` is deprecated - With message! + auto h = H; + ^ +compilable/depmsg.d(73): Deprecation: class `depmsg.main.Inner.I()` is deprecated - With message! + I!() i; + ^ --- */ void main() diff --git a/compiler/test/compilable/deprecationlimit.d b/compiler/test/compilable/deprecationlimit.d index 8ee7ab650fbf..e7612208d7bc 100644 --- a/compiler/test/compilable/deprecationlimit.d +++ b/compiler/test/compilable/deprecationlimit.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -verrors=3 TEST_OUTPUT: --- -compilable/deprecationlimit.d(18): Deprecation: function `deprecationlimit.f` is deprecated -compilable/deprecationlimit.d(19): Deprecation: function `deprecationlimit.f` is deprecated -compilable/deprecationlimit.d(20): Deprecation: function `deprecationlimit.f` is deprecated +compilable/deprecationlimit.d(24): Deprecation: function `deprecationlimit.f` is deprecated + f(); + ^ +compilable/deprecationlimit.d(25): Deprecation: function `deprecationlimit.f` is deprecated + f(); + ^ +compilable/deprecationlimit.d(26): Deprecation: function `deprecationlimit.f` is deprecated + f(); + ^ 1 deprecation warning omitted, use `-verrors=0` to show all --- */ diff --git a/compiler/test/compilable/interpret3.d b/compiler/test/compilable/interpret3.d index 69f65b1cbdf8..789fd824abaa 100644 --- a/compiler/test/compilable/interpret3.d +++ b/compiler/test/compilable/interpret3.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -compilable/interpret3.d(6350): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference +compilable/interpret3.d(6352): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference + assert(b is b); + ^ --- */ diff --git a/compiler/test/compilable/test12567c.d b/compiler/test/compilable/test12567c.d index 9a686df555ec..d8c2ad461250 100644 --- a/compiler/test/compilable/test12567c.d +++ b/compiler/test/compilable/test12567c.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -compilable/test12567c.d(10): Deprecation: module `imports.a12567` is deprecated - This module will be removed in future release. +compilable/test12567c.d(12): Deprecation: module `imports.a12567` is deprecated - This module will be removed in future release. +import imports.a12567; + ^ --- */ import imports.a12567; diff --git a/compiler/test/compilable/test19227.d b/compiler/test/compilable/test19227.d index 6ff5349f3338..8e02e974623b 100644 --- a/compiler/test/compilable/test19227.d +++ b/compiler/test/compilable/test19227.d @@ -1,7 +1,9 @@ // https://issues.dlang.org/show_bug.cgi?id=19227 /* TEST_OUTPUT: --- -compilable/test19227.d(18): Deprecation: use of complex type `cfloat` is deprecated, use `std.complex.Complex!(float)` instead +compilable/test19227.d(20): Deprecation: use of complex type `cfloat` is deprecated, use `std.complex.Complex!(float)` instead + cfloat cf; + ^ Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead Deprecation: use of complex type `const(cfloat)` is deprecated, use `std.complex.Complex!(float)` instead diff --git a/compiler/test/compilable/test19609.d b/compiler/test/compilable/test19609.d index df8f891ec8f3..acf1b815c304 100644 --- a/compiler/test/compilable/test19609.d +++ b/compiler/test/compilable/test19609.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -compilable/test19609.d(11): Deprecation: module `imports.test19609a` is deprecated -compilable/test19609.d(12): Deprecation: module `imports.test19609b` is deprecated - hello -compilable/test19609.d(13): Deprecation: module `imports.test19609c` is deprecated +compilable/test19609.d(17): Deprecation: module `imports.test19609a` is deprecated +import imports.test19609a; + ^ +compilable/test19609.d(18): Deprecation: module `imports.test19609b` is deprecated - hello +import imports.test19609b; + ^ +compilable/test19609.d(19): Deprecation: module `imports.test19609c` is deprecated +import imports.test19609c; + ^ --- */ import imports.test19609a; diff --git a/compiler/test/compilable/test20063.d b/compiler/test/compilable/test20063.d index a117e4b25ddc..2e813a8e4a18 100644 --- a/compiler/test/compilable/test20063.d +++ b/compiler/test/compilable/test20063.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -compilable/test20063.d(10): Deprecation: function `test20063.main.f!(delegate () pure nothrow @safe => new C).f` function requires a dual-context, which is deprecated -compilable/test20063.d(19): instantiated from here: `f!(delegate () pure nothrow @safe => new C)` +compilable/test20063.d(14): Deprecation: function `test20063.main.f!(delegate () pure nothrow @safe => new C).f` function requires a dual-context, which is deprecated + void f(alias fun)() {} + ^ +compilable/test20063.d(23): instantiated from here: `f!(delegate () pure nothrow @safe => new C)` + S().f!(() => new C()).handleLazily; + ^ --- */ diff --git a/compiler/test/compilable/test21514.d b/compiler/test/compilable/test21514.d index 4eb80509f326..129806a12c04 100644 --- a/compiler/test/compilable/test21514.d +++ b/compiler/test/compilable/test21514.d @@ -2,14 +2,30 @@ // DISABLED: win32 win64 /* TEST_OUTPUT: --- -compilable/test21514.d(16): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead -compilable/test21514.d(16): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead -compilable/test21514.d(17): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead -compilable/test21514.d(17): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead -compilable/test21514.d(19): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead -compilable/test21514.d(19): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead -compilable/test21514.d(20): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead -compilable/test21514.d(20): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead +compilable/test21514.d(32): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead +extern(C++) cdouble cpp_cadd1(cdouble c) { return c + 1; } + ^ +compilable/test21514.d(32): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead +extern(C++) cdouble cpp_cadd1(cdouble c) { return c + 1; } + ^ +compilable/test21514.d(33): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead +extern(C++) creal cpp_cadd1l(creal c) { return c + 1; } + ^ +compilable/test21514.d(33): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead +extern(C++) creal cpp_cadd1l(creal c) { return c + 1; } + ^ +compilable/test21514.d(35): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead +cdouble cadd1(cdouble c) { return cpp_cadd1(c); } + ^ +compilable/test21514.d(35): Deprecation: use of complex type `cdouble` is deprecated, use `std.complex.Complex!(double)` instead +cdouble cadd1(cdouble c) { return cpp_cadd1(c); } + ^ +compilable/test21514.d(36): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead +creal cadd1(creal c) { return cpp_cadd1l(c); } + ^ +compilable/test21514.d(36): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead +creal cadd1(creal c) { return cpp_cadd1l(c); } + ^ --- */ diff --git a/compiler/test/compilable/test23097.d b/compiler/test/compilable/test23097.d index 092bd774f228..6b37d6003abc 100644 --- a/compiler/test/compilable/test23097.d +++ b/compiler/test/compilable/test23097.d @@ -2,11 +2,21 @@ REQUIRED_ARGS: -verrors=spec TEST_OUTPUT: --- -(spec:2) compilable/test23097.d(14): Error: `inout` constructor `test23097.S23097.this` creates const object, not mutable -(spec:2) compilable/test23097.d(14): Error: `inout` constructor `test23097.S23097.this` creates const object, not mutable -(spec:1) compilable/test23097.d(14): Error: generated function `test23097.S23097.opAssign(S23097 p)` is not callable using argument types `(const(S23097))` -(spec:2) compilable/test23097.d(14): Error: `inout` constructor `test23097.S23097.this` creates const object, not mutable -(spec:1) compilable/test23097.d(14): `struct S23097` does not define a copy constructor for `const(S23097)` to `S23097` copies +(spec:2) compilable/test23097.d(24): Error: `inout` constructor `test23097.S23097.this` creates const object, not mutable + static if (__traits(compiles, chunk = args)) + ^ +(spec:2) compilable/test23097.d(24): Error: `inout` constructor `test23097.S23097.this` creates const object, not mutable + static if (__traits(compiles, chunk = args)) + ^ +(spec:1) compilable/test23097.d(24): Error: generated function `test23097.S23097.opAssign(S23097 p)` is not callable using argument types `(const(S23097))` + static if (__traits(compiles, chunk = args)) + ^ +(spec:2) compilable/test23097.d(24): Error: `inout` constructor `test23097.S23097.this` creates const object, not mutable + static if (__traits(compiles, chunk = args)) + ^ +(spec:1) compilable/test23097.d(24): `struct S23097` does not define a copy constructor for `const(S23097)` to `S23097` copies + static if (__traits(compiles, chunk = args)) + ^ --- */ void emplaceRef(UT, Args)(UT chunk, Args args) diff --git a/compiler/test/compilable/test324.d b/compiler/test/compilable/test324.d index b5e30f67518d..5173da74b2f1 100644 --- a/compiler/test/compilable/test324.d +++ b/compiler/test/compilable/test324.d @@ -1,15 +1,19 @@ /* TEST_OUTPUT: --- -compilable/test324.d(17): Deprecation: function `test324.main.doStuff!((i) +compilable/test324.d(21): Deprecation: function `test324.main.doStuff!((i) { return i; } ).doStuff` function requires a dual-context, which is deprecated -compilable/test324.d(23): instantiated from here: `doStuff!((i) + void doStuff(alias fun)() {} + ^ +compilable/test324.d(27): instantiated from here: `doStuff!((i) { return i; } )` + foo.doStuff!( (i) { return i; })(); + ^ --- */ struct Foo diff --git a/compiler/test/compilable/test9701.d b/compiler/test/compilable/test9701.d index 68055c4dd46b..549d6e7646cc 100644 --- a/compiler/test/compilable/test9701.d +++ b/compiler/test/compilable/test9701.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -compilable/test9701.d(68): Deprecation: enum member `test9701.Enum.value7` is deprecated -compilable/test9701.d(68): Deprecation: enum member `test9701.Enum.value8` is deprecated - message +compilable/test9701.d(72): Deprecation: enum member `test9701.Enum.value7` is deprecated +static assert(Enum.value7 != Enum.value8); + ^ +compilable/test9701.d(72): Deprecation: enum member `test9701.Enum.value8` is deprecated - message +static assert(Enum.value7 != Enum.value8); + ^ --- */ diff --git a/compiler/test/compilable/udamodule1.d b/compiler/test/compilable/udamodule1.d index 434cf5125b74..221236d249ac 100644 --- a/compiler/test/compilable/udamodule1.d +++ b/compiler/test/compilable/udamodule1.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -compilable/udamodule1.d(10): Deprecation: module `imports.udamodule1` is deprecated - This module will be removed. +compilable/udamodule1.d(12): Deprecation: module `imports.udamodule1` is deprecated - This module will be removed. +import imports.udamodule1; + ^ --- */ import imports.udamodule1; diff --git a/compiler/test/compilable/verrors_spec.d b/compiler/test/compilable/verrors_spec.d index b858008922bd..b50b8c701ea9 100644 --- a/compiler/test/compilable/verrors_spec.d +++ b/compiler/test/compilable/verrors_spec.d @@ -3,7 +3,9 @@ PERMUTE_ARGS: REQUIRED_ARGS: -verrors=spec TEST_OUTPUT: --- -(spec:1) compilable/verrors_spec.d(13): Error: cannot implicitly convert expression `& i` of type `int*` to `int` +(spec:1) compilable/verrors_spec.d(15): Error: cannot implicitly convert expression `& i` of type `int*` to `int` + bool b = __traits(compiles, {p = &i;}); + ^ --- */ diff --git a/compiler/test/fail_compilation/aa_init.d b/compiler/test/fail_compilation/aa_init.d index b1473c136da0..bea67648590b 100644 --- a/compiler/test/fail_compilation/aa_init.d +++ b/compiler/test/fail_compilation/aa_init.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -vcolumns TEST_OUTPUT: --- -fail_compilation/aa_init.d(13,18): Error: invalid associative array initializer `[]`, use `null` instead -fail_compilation/aa_init.d(14,24): Error: missing key for value `4` in initializer -fail_compilation/aa_init.d(15,9): Error: cannot implicitly convert expression `[]` of type `void[]` to `int[int]` +fail_compilation/aa_init.d(19,18): Error: invalid associative array initializer `[]`, use `null` instead + int[int] a = []; + ^ +fail_compilation/aa_init.d(20,24): Error: missing key for value `4` in initializer + int[int] b = [2:3, 4]; + ^ +fail_compilation/aa_init.d(21,9): Error: cannot implicitly convert expression `[]` of type `void[]` to `int[int]` + a = []; + ^ --- */ diff --git a/compiler/test/fail_compilation/aacmp10381.d b/compiler/test/fail_compilation/aacmp10381.d index b08889119517..6ab2c40833cf 100644 --- a/compiler/test/fail_compilation/aacmp10381.d +++ b/compiler/test/fail_compilation/aacmp10381.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/aacmp10381.d(12): Error: `>` is not defined for associative arrays +fail_compilation/aacmp10381.d(14): Error: `>` is not defined for associative arrays + return aa1 > aa2; + ^ --- */ diff --git a/compiler/test/fail_compilation/alias_instance_member.d b/compiler/test/fail_compilation/alias_instance_member.d index 8ebdbbb13163..3a4ad895478b 100644 --- a/compiler/test/fail_compilation/alias_instance_member.d +++ b/compiler/test/fail_compilation/alias_instance_member.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/alias_instance_member.d(18): Error: cannot alias variable member `v` of variable `that` -fail_compilation/alias_instance_member.d(18): Use `typeof(that)` instead to preserve behaviour +fail_compilation/alias_instance_member.d(20): Error: cannot alias variable member `v` of variable `that` + alias b = that.v; + ^ +fail_compilation/alias_instance_member.d(20): Use `typeof(that)` instead to preserve behaviour --- */ diff --git a/compiler/test/fail_compilation/alias_instance_member2.d b/compiler/test/fail_compilation/alias_instance_member2.d index f31cb8125714..15e97e6c398f 100644 --- a/compiler/test/fail_compilation/alias_instance_member2.d +++ b/compiler/test/fail_compilation/alias_instance_member2.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/alias_instance_member2.d(26): Error: cannot alias variable member `v` of variable `f` -fail_compilation/alias_instance_member2.d(26): Use `typeof(f)` instead to preserve behaviour -fail_compilation/alias_instance_member2.d(30): Error: cannot alias function member `fun` of variable `f` +fail_compilation/alias_instance_member2.d(30): Error: cannot alias variable member `v` of variable `f` + alias v = f.v; + ^ fail_compilation/alias_instance_member2.d(30): Use `typeof(f)` instead to preserve behaviour +fail_compilation/alias_instance_member2.d(34): Error: cannot alias function member `fun` of variable `f` + alias fun = f.fun; + ^ +fail_compilation/alias_instance_member2.d(34): Use `typeof(f)` instead to preserve behaviour --- */ diff --git a/compiler/test/fail_compilation/aliasassign.d b/compiler/test/fail_compilation/aliasassign.d index 499bef1e7122..a226ee101e2f 100644 --- a/compiler/test/fail_compilation/aliasassign.d +++ b/compiler/test/fail_compilation/aliasassign.d @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/aliasassign.d(13): Error: `B` must have same parent `Swap!(int, string)` as alias `B` -fail_compilation/aliasassign.d(14): Error: `A` must have same parent `Swap!(int, string)` as alias `A` -fail_compilation/aliasassign.d(21): Error: template instance `aliasassign.Swap!(int, string)` error instantiating -fail_compilation/aliasassign.d(21): while evaluating: `static assert(Swap!(int, string))` +fail_compilation/aliasassign.d(21): Error: `B` must have same parent `Swap!(int, string)` as alias `B` + B = A; + ^ +fail_compilation/aliasassign.d(22): Error: `A` must have same parent `Swap!(int, string)` as alias `A` + A = B; + ^ +fail_compilation/aliasassign.d(29): Error: template instance `aliasassign.Swap!(int, string)` error instantiating +static assert(Swap!(A, B)); + ^ +fail_compilation/aliasassign.d(29): while evaluating: `static assert(Swap!(int, string))` +static assert(Swap!(A, B)); +^ --- */ diff --git a/compiler/test/fail_compilation/aliasassign2.d b/compiler/test/fail_compilation/aliasassign2.d index dd421c90eeef..14c4e4f93308 100644 --- a/compiler/test/fail_compilation/aliasassign2.d +++ b/compiler/test/fail_compilation/aliasassign2.d @@ -1,11 +1,23 @@ /* TEST_OUTPUT: --- -fail_compilation/aliasassign2.d(16): Error: `alias aa1 = aa1;` cannot alias itself, use a qualified name to create an overload set -fail_compilation/aliasassign2.d(19): Error: template instance `aliasassign2.Tp1!()` error instantiating -fail_compilation/aliasassign2.d(24): Error: undefined identifier `unknown` -fail_compilation/aliasassign2.d(26): Error: template instance `aliasassign2.Tp2!()` error instantiating -fail_compilation/aliasassign2.d(31): Error: template instance `AliasSeqX!(aa3, 1)` template `AliasSeqX` is not defined, did you mean AliasSeq(T...)? -fail_compilation/aliasassign2.d(33): Error: template instance `aliasassign2.Tp3!()` error instantiating +fail_compilation/aliasassign2.d(28): Error: `alias aa1 = aa1;` cannot alias itself, use a qualified name to create an overload set + alias aa1 = aa1; + ^ +fail_compilation/aliasassign2.d(31): Error: template instance `aliasassign2.Tp1!()` error instantiating +alias a1 = Tp1!(); + ^ +fail_compilation/aliasassign2.d(36): Error: undefined identifier `unknown` + aa2 = AliasSeq!(aa2, unknown); + ^ +fail_compilation/aliasassign2.d(38): Error: template instance `aliasassign2.Tp2!()` error instantiating +alias a2 = Tp2!(); + ^ +fail_compilation/aliasassign2.d(43): Error: template instance `AliasSeqX!(aa3, 1)` template `AliasSeqX` is not defined, did you mean AliasSeq(T...)? + aa3 = AliasSeqX!(aa3, 1); + ^ +fail_compilation/aliasassign2.d(45): Error: template instance `aliasassign2.Tp3!()` error instantiating +alias a3 = Tp3!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/alignedext.i b/compiler/test/fail_compilation/alignedext.i index eae3137ce47a..4c32d5cf88d8 100644 --- a/compiler/test/fail_compilation/alignedext.i +++ b/compiler/test/fail_compilation/alignedext.i @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/alignedext.i(10): Error: __decspec(align(123)) must be an integer positive power of 2 and be <= 8,192 -fail_compilation/alignedext.i(11): Error: __decspec(align(16384)) must be an integer positive power of 2 and be <= 8,192 -fail_compilation/alignedext.i(13): Error: __attribute__((aligned(123))) must be an integer positive power of 2 and be <= 32,768 -fail_compilation/alignedext.i(14): Error: __attribute__((aligned(65536))) must be an integer positive power of 2 and be <= 32,768 +fail_compilation/alignedext.i(18): Error: __decspec(align(123)) must be an integer positive power of 2 and be <= 8,192 +typedef struct __declspec(align(123)) S { int a; } S; + ^ +fail_compilation/alignedext.i(19): Error: __decspec(align(16384)) must be an integer positive power of 2 and be <= 8,192 +struct __declspec(align(16384)) T { int a; }; + ^ +fail_compilation/alignedext.i(21): Error: __attribute__((aligned(123))) must be an integer positive power of 2 and be <= 32,768 +typedef struct __attribute__((aligned(123))) U { int a; } S; + ^ +fail_compilation/alignedext.i(22): Error: __attribute__((aligned(65536))) must be an integer positive power of 2 and be <= 32,768 +struct __attribute__((aligned(65536))) V { int a; }; + ^ --- */ diff --git a/compiler/test/fail_compilation/already_defined.d b/compiler/test/fail_compilation/already_defined.d index 7a97e09e6851..dc89efe573b7 100644 --- a/compiler/test/fail_compilation/already_defined.d +++ b/compiler/test/fail_compilation/already_defined.d @@ -2,16 +2,28 @@ TEST_OUTPUT: --- fail_compilation/already_defined.d(4): Error: declaration `already_defined.func1.a` is already defined +fail_compilation/already_defined.d(4): Error: declaration `already_defined.func1.a` is already defined + ^ fail_compilation/already_defined.d(3): `variable` `a` is defined here fail_compilation/already_defined.d(10): Error: declaration `already_defined.func2.core` is already defined fail_compilation/already_defined.d(9): `import` `core` is defined here +fail_compilation/already_defined.d(36): Error: declaration `Tstring` is already defined + ^ fail_compilation/already_defined.d(28): Error: declaration `Ident(T)` is already defined +fail_compilation/already_defined.d(48): Error: declaration `core` is already defined + ^ fail_compilation/already_defined.d(27): `template` `Ident(T)` is defined here +fail_compilation/already_defined.d(41): `alias` `T` is defined here + ^ fail_compilation/already_defined.d(36): Error: declaration `Tstring` is already defined fail_compilation/already_defined.d(35): `alias` `Tstring` is defined here + ^ + ^ fail_compilation/already_defined.d(42): Error: declaration `T` is already defined fail_compilation/already_defined.d(41): `alias` `T` is defined here fail_compilation/already_defined.d(48): Error: declaration `core` is already defined + import core.stdc.stdio; + ^ fail_compilation/already_defined.d(47): `import` `core` is defined here fail_compilation/already_defined.d(54): Error: declaration `core` is already defined fail_compilation/already_defined.d(53): `import` `core` is defined here diff --git a/compiler/test/fail_compilation/array_bool.d b/compiler/test/fail_compilation/array_bool.d index 923766a93fea..304352439015 100644 --- a/compiler/test/fail_compilation/array_bool.d +++ b/compiler/test/fail_compilation/array_bool.d @@ -2,10 +2,14 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/array_bool.d(13): Deprecation: assert condition cannot be a string literal -fail_compilation/array_bool.d(13): If intentional, use `"foo" !is null` instead to preserve behaviour -fail_compilation/array_bool.d(14): Deprecation: static assert condition cannot be a string literal -fail_compilation/array_bool.d(14): If intentional, use `"foo" !is null` instead to preserve behaviour +fail_compilation/array_bool.d(17): Deprecation: assert condition cannot be a string literal + assert("foo"); + ^ +fail_compilation/array_bool.d(17): If intentional, use `"foo" !is null` instead to preserve behaviour +fail_compilation/array_bool.d(18): Deprecation: static assert condition cannot be a string literal + static assert("foo"); + ^ +fail_compilation/array_bool.d(18): If intentional, use `"foo" !is null` instead to preserve behaviour --- */ void main() diff --git a/compiler/test/fail_compilation/attributediagnostic.d b/compiler/test/fail_compilation/attributediagnostic.d index 523a183d7673..e77d271a16d8 100644 --- a/compiler/test/fail_compilation/attributediagnostic.d +++ b/compiler/test/fail_compilation/attributediagnostic.d @@ -1,20 +1,42 @@ /* TEST_OUTPUT: --- -fail_compilation/attributediagnostic.d(24): Error: `@safe` function `attributediagnostic.layer2` cannot call `@system` function `attributediagnostic.layer1` -fail_compilation/attributediagnostic.d(26): which calls `attributediagnostic.layer0` -fail_compilation/attributediagnostic.d(28): which calls `attributediagnostic.system` -fail_compilation/attributediagnostic.d(30): which wasn't inferred `@safe` because of: -fail_compilation/attributediagnostic.d(30): `asm` statement is assumed to be `@system` - mark it with `@trusted` if it is not -fail_compilation/attributediagnostic.d(25): `attributediagnostic.layer1` is declared here -fail_compilation/attributediagnostic.d(46): Error: `@safe` function `D main` cannot call `@system` function `attributediagnostic.system1` -fail_compilation/attributediagnostic.d(35): which wasn't inferred `@safe` because of: -fail_compilation/attributediagnostic.d(35): cast from `uint` to `int*` not allowed in safe code -fail_compilation/attributediagnostic.d(33): `attributediagnostic.system1` is declared here -fail_compilation/attributediagnostic.d(47): Error: `@safe` function `D main` cannot call `@system` function `attributediagnostic.system2` -fail_compilation/attributediagnostic.d(41): which wasn't inferred `@safe` because of: -fail_compilation/attributediagnostic.d(41): `@safe` function `system2` cannot call `@system` `fsys` -fail_compilation/attributediagnostic.d(39): `attributediagnostic.system2` is declared here +fail_compilation/attributediagnostic.d(46): Error: `@safe` function `attributediagnostic.layer2` cannot call `@system` function `attributediagnostic.layer1` +auto layer2() @safe { layer1(); } + ^ +fail_compilation/attributediagnostic.d(48): which calls `attributediagnostic.layer0` +auto layer0() { system(); } + ^ +fail_compilation/attributediagnostic.d(50): which calls `attributediagnostic.system` +auto system() + ^ +fail_compilation/attributediagnostic.d(52): which wasn't inferred `@safe` because of: + asm {} + ^ +fail_compilation/attributediagnostic.d(52): `asm` statement is assumed to be `@system` - mark it with `@trusted` if it is not +fail_compilation/attributediagnostic.d(47): `attributediagnostic.layer1` is declared here +auto layer1() { layer0(); } + ^ +fail_compilation/attributediagnostic.d(68): Error: `@safe` function `D main` cannot call `@system` function `attributediagnostic.system1` + system1(); + ^ +fail_compilation/attributediagnostic.d(57): which wasn't inferred `@safe` because of: + int* x = cast(int*) 0xDEADBEEF; + ^ +fail_compilation/attributediagnostic.d(57): cast from `uint` to `int*` not allowed in safe code +fail_compilation/attributediagnostic.d(55): `attributediagnostic.system1` is declared here +auto system1() + ^ +fail_compilation/attributediagnostic.d(69): Error: `@safe` function `D main` cannot call `@system` function `attributediagnostic.system2` + system2(); + ^ +fail_compilation/attributediagnostic.d(63): which wasn't inferred `@safe` because of: + fsys(); + ^ +fail_compilation/attributediagnostic.d(63): `@safe` function `system2` cannot call `@system` `fsys` +fail_compilation/attributediagnostic.d(61): `attributediagnostic.system2` is declared here +auto system2() + ^ --- */ diff --git a/compiler/test/fail_compilation/attributediagnostic_nogc.d b/compiler/test/fail_compilation/attributediagnostic_nogc.d index e3dbee899fc1..af81f08f408e 100644 --- a/compiler/test/fail_compilation/attributediagnostic_nogc.d +++ b/compiler/test/fail_compilation/attributediagnostic_nogc.d @@ -1,23 +1,43 @@ /* TEST_OUTPUT: --- -fail_compilation/attributediagnostic_nogc.d(21): Error: `@nogc` function `attributediagnostic_nogc.layer2` cannot call non-@nogc function `attributediagnostic_nogc.layer1` -fail_compilation/attributediagnostic_nogc.d(22): which calls `attributediagnostic_nogc.layer0` -fail_compilation/attributediagnostic_nogc.d(23): which calls `attributediagnostic_nogc.gc` -fail_compilation/attributediagnostic_nogc.d(27): which wasn't inferred `@nogc` because of: -fail_compilation/attributediagnostic_nogc.d(27): `asm` statement in function `attributediagnostic_nogc.gc` is assumed to use the GC - mark it with `@nogc` if it does not -fail_compilation/attributediagnostic_nogc.d(43): Error: `@nogc` function `D main` cannot call non-@nogc function `attributediagnostic_nogc.gc1` -fail_compilation/attributediagnostic_nogc.d(32): which wasn't inferred `@nogc` because of: -fail_compilation/attributediagnostic_nogc.d(32): cannot use `new` in `@nogc` function `attributediagnostic_nogc.gc1` -fail_compilation/attributediagnostic_nogc.d(44): Error: `@nogc` function `D main` cannot call non-@nogc function `attributediagnostic_nogc.gc2` -fail_compilation/attributediagnostic_nogc.d(38): which wasn't inferred `@nogc` because of: -fail_compilation/attributediagnostic_nogc.d(38): `@nogc` function `attributediagnostic_nogc.gc2` cannot call non-@nogc `fgc` -fail_compilation/attributediagnostic_nogc.d(45): Error: `@nogc` function `D main` cannot call non-@nogc function `attributediagnostic_nogc.gcClosure` -fail_compilation/attributediagnostic_nogc.d(48): which wasn't inferred `@nogc` because of: -fail_compilation/attributediagnostic_nogc.d(48): function `attributediagnostic_nogc.gcClosure` is `@nogc` yet allocates closure for `gcClosure()` with the GC +fail_compilation/attributediagnostic_nogc.d(44): Error: `@nogc` function `attributediagnostic_nogc.layer2` cannot call non-@nogc function `attributediagnostic_nogc.layer1` +auto layer2() @nogc { layer1(); } + ^ +fail_compilation/attributediagnostic_nogc.d(45): which calls `attributediagnostic_nogc.layer0` +auto layer1() { layer0(); } + ^ +fail_compilation/attributediagnostic_nogc.d(46): which calls `attributediagnostic_nogc.gc` +auto layer0() { gc(); } + ^ +fail_compilation/attributediagnostic_nogc.d(50): which wasn't inferred `@nogc` because of: + asm {} + ^ +fail_compilation/attributediagnostic_nogc.d(50): `asm` statement in function `attributediagnostic_nogc.gc` is assumed to use the GC - mark it with `@nogc` if it does not +fail_compilation/attributediagnostic_nogc.d(66): Error: `@nogc` function `D main` cannot call non-@nogc function `attributediagnostic_nogc.gc1` + gc1(); + ^ +fail_compilation/attributediagnostic_nogc.d(55): which wasn't inferred `@nogc` because of: + int* x = new int; + ^ +fail_compilation/attributediagnostic_nogc.d(55): cannot use `new` in `@nogc` function `attributediagnostic_nogc.gc1` +fail_compilation/attributediagnostic_nogc.d(67): Error: `@nogc` function `D main` cannot call non-@nogc function `attributediagnostic_nogc.gc2` + gc2(); + ^ +fail_compilation/attributediagnostic_nogc.d(61): which wasn't inferred `@nogc` because of: + fgc(); + ^ +fail_compilation/attributediagnostic_nogc.d(61): `@nogc` function `attributediagnostic_nogc.gc2` cannot call non-@nogc `fgc` +fail_compilation/attributediagnostic_nogc.d(68): Error: `@nogc` function `D main` cannot call non-@nogc function `attributediagnostic_nogc.gcClosure` + gcClosure(); + ^ +fail_compilation/attributediagnostic_nogc.d(71): which wasn't inferred `@nogc` because of: +auto gcClosure() + ^ +fail_compilation/attributediagnostic_nogc.d(71): function `attributediagnostic_nogc.gcClosure` is `@nogc` yet allocates closure for `gcClosure()` with the GC --- */ -#line 18 +// Line 18 starts here // Issue 17374 - Improve inferred attribute error message // https://issues.dlang.org/show_bug.cgi?id=17374 diff --git a/compiler/test/fail_compilation/attributediagnostic_nothrow.d b/compiler/test/fail_compilation/attributediagnostic_nothrow.d index 7fea32244126..afd16211118c 100644 --- a/compiler/test/fail_compilation/attributediagnostic_nothrow.d +++ b/compiler/test/fail_compilation/attributediagnostic_nothrow.d @@ -1,17 +1,35 @@ /* TEST_OUTPUT: --- -fail_compilation/attributediagnostic_nothrow.d(21): Error: function `attributediagnostic_nothrow.layer1` is not `nothrow` -fail_compilation/attributediagnostic_nothrow.d(22): which calls `attributediagnostic_nothrow.layer0` -fail_compilation/attributediagnostic_nothrow.d(23): which calls `attributediagnostic_nothrow.gc` -fail_compilation/attributediagnostic_nothrow.d(27): which wasn't inferred `nothrow` because of: -fail_compilation/attributediagnostic_nothrow.d(27): `asm` statement is assumed to throw - mark it with `nothrow` if it does not -fail_compilation/attributediagnostic_nothrow.d(21): Error: function `attributediagnostic_nothrow.layer2` may throw but is marked as `nothrow` -fail_compilation/attributediagnostic_nothrow.d(43): Error: function `attributediagnostic_nothrow.gc1` is not `nothrow` -fail_compilation/attributediagnostic_nothrow.d(32): which wasn't inferred `nothrow` because of: -fail_compilation/attributediagnostic_nothrow.d(32): `object.Exception` is thrown but not caught -fail_compilation/attributediagnostic_nothrow.d(44): Error: function `attributediagnostic_nothrow.gc2` is not `nothrow` -fail_compilation/attributediagnostic_nothrow.d(41): Error: function `D main` may throw but is marked as `nothrow` +fail_compilation/attributediagnostic_nothrow.d(39): Error: function `attributediagnostic_nothrow.layer1` is not `nothrow` +auto layer2() nothrow { layer1(); } + ^ +fail_compilation/attributediagnostic_nothrow.d(40): which calls `attributediagnostic_nothrow.layer0` +auto layer1() { layer0(); } + ^ +fail_compilation/attributediagnostic_nothrow.d(41): which calls `attributediagnostic_nothrow.gc` +auto layer0() { gc(); } + ^ +fail_compilation/attributediagnostic_nothrow.d(45): which wasn't inferred `nothrow` because of: + asm {} + ^ +fail_compilation/attributediagnostic_nothrow.d(45): `asm` statement is assumed to throw - mark it with `nothrow` if it does not +fail_compilation/attributediagnostic_nothrow.d(39): Error: function `attributediagnostic_nothrow.layer2` may throw but is marked as `nothrow` +auto layer2() nothrow { layer1(); } + ^ +fail_compilation/attributediagnostic_nothrow.d(61): Error: function `attributediagnostic_nothrow.gc1` is not `nothrow` + gc1(); + ^ +fail_compilation/attributediagnostic_nothrow.d(50): which wasn't inferred `nothrow` because of: + throw new Exception("msg"); + ^ +fail_compilation/attributediagnostic_nothrow.d(50): `object.Exception` is thrown but not caught +fail_compilation/attributediagnostic_nothrow.d(62): Error: function `attributediagnostic_nothrow.gc2` is not `nothrow` + gc2(); + ^ +fail_compilation/attributediagnostic_nothrow.d(59): Error: function `D main` may throw but is marked as `nothrow` +void main() nothrow + ^ --- */ diff --git a/compiler/test/fail_compilation/attributediagnostic_pure.d b/compiler/test/fail_compilation/attributediagnostic_pure.d index a120dabf852d..3aa6dedea6ad 100644 --- a/compiler/test/fail_compilation/attributediagnostic_pure.d +++ b/compiler/test/fail_compilation/attributediagnostic_pure.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/attributediagnostic_pure.d(20): Error: `pure` function `D main` cannot call impure function `attributediagnostic_pure.gc` -fail_compilation/attributediagnostic_pure.d(15): which wasn't inferred `pure` because of: -fail_compilation/attributediagnostic_pure.d(15): `asm` statement is assumed to be impure - mark it with `pure` if it is not +fail_compilation/attributediagnostic_pure.d(24): Error: `pure` function `D main` cannot call impure function `attributediagnostic_pure.gc` + gc(); + ^ +fail_compilation/attributediagnostic_pure.d(19): which wasn't inferred `pure` because of: + asm {} + ^ +fail_compilation/attributediagnostic_pure.d(19): `asm` statement is assumed to be impure - mark it with `pure` if it is not --- */ diff --git a/compiler/test/fail_compilation/attrpure.i b/compiler/test/fail_compilation/attrpure.i index ae2ed880b33e..15e3537cbc56 100644 --- a/compiler/test/fail_compilation/attrpure.i +++ b/compiler/test/fail_compilation/attrpure.i @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/attrpure.i(11): Error: `pure` function `attrpure.pureAsSnow` cannot call impure function `attrpure.impure` +fail_compilation/attrpure.i(13): Error: `pure` function `attrpure.pureAsSnow` cannot call impure function `attrpure.impure` + impure(); + ^ --- */ diff --git a/compiler/test/fail_compilation/auto_ref_inout.d b/compiler/test/fail_compilation/auto_ref_inout.d index 8d53012a061e..671641c8fe7c 100644 --- a/compiler/test/fail_compilation/auto_ref_inout.d +++ b/compiler/test/fail_compilation/auto_ref_inout.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/auto_ref_inout.d(12): Error: template `f` is not callable using argument types `!()(int)` -fail_compilation/auto_ref_inout.d(10): Candidate is: `f(T)(auto ref inout T a, auto ref inout T b)` +fail_compilation/auto_ref_inout.d(16): Error: template `f` is not callable using argument types `!()(int)` +enum e = f(5); + ^ +fail_compilation/auto_ref_inout.d(14): Candidate is: `f(T)(auto ref inout T a, auto ref inout T b)` +auto ref inout(T) f(T)(auto ref inout T a, auto ref inout T b); + ^ --- */ diff --git a/compiler/test/fail_compilation/b15069.d b/compiler/test/fail_compilation/b15069.d index 4ff426658261..fc04dd5464ca 100644 --- a/compiler/test/fail_compilation/b15069.d +++ b/compiler/test/fail_compilation/b15069.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/b15069.d(15): Error: template instance `T!int` `T` is not a template declaration, it is a alias -fail_compilation/b15069.d(10): Error: template instance `b15069.Stuff!(Thing!float)` error instantiating +fail_compilation/b15069.d(19): Error: template instance `T!int` `T` is not a template declaration, it is a alias + T!(int) var; + ^ +fail_compilation/b15069.d(14): Error: template instance `b15069.Stuff!(Thing!float)` error instantiating + Stuff!(Thing!(float)) s; + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/b15875.d b/compiler/test/fail_compilation/b15875.d index 15f362bc885e..3fbf7a771f3a 100644 --- a/compiler/test/fail_compilation/b15875.d +++ b/compiler/test/fail_compilation/b15875.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/b15875.d(9): Error: undefined identifier `a` -fail_compilation/b15875.d(10): Error: circular reference to `b15875.f` +fail_compilation/b15875.d(13): Error: undefined identifier `a` +d o(int[a]a)(){} + ^ +fail_compilation/b15875.d(14): Error: circular reference to `b15875.f` +f.T f(){} + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=15875 diff --git a/compiler/test/fail_compilation/b15909.d b/compiler/test/fail_compilation/b15909.d index 22c58da610b8..be26144164ed 100644 --- a/compiler/test/fail_compilation/b15909.d +++ b/compiler/test/fail_compilation/b15909.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/b15909.d(12): Error: duplicate `case 'a'` in `switch` statement +fail_compilation/b15909.d(14): Error: duplicate `case 'a'` in `switch` statement + case 'a': + ^ --- */ diff --git a/compiler/test/fail_compilation/b16967.d b/compiler/test/fail_compilation/b16967.d index 7a2c3e4685fd..f8a3e782e2a4 100644 --- a/compiler/test/fail_compilation/b16967.d +++ b/compiler/test/fail_compilation/b16967.d @@ -1,8 +1,12 @@ /* * TEST_OUTPUT: --- -fail_compilation/b16967.d(15): Error: switch case fallthrough - use 'goto default;' if intended -fail_compilation/b16967.d(25): Error: switch case fallthrough - use 'goto default;' if intended +fail_compilation/b16967.d(19): Error: switch case fallthrough - use 'goto default;' if intended + default: + ^ +fail_compilation/b16967.d(29): Error: switch case fallthrough - use 'goto default;' if intended + default: + ^ --- */ int foo(int x) diff --git a/compiler/test/fail_compilation/b17285.d b/compiler/test/fail_compilation/b17285.d index 7b79cf0666fc..2ce4d9b697d2 100644 --- a/compiler/test/fail_compilation/b17285.d +++ b/compiler/test/fail_compilation/b17285.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/b17285.d(14): Error: type `ONE` has no value -fail_compilation/b17285.d(14): Error: type `TWO` has no value -fail_compilation/b17285.d(14): Error: cannot implicitly convert expression `ONE` of type `b17285.ONE` to `int` +fail_compilation/b17285.d(20): Error: type `ONE` has no value + foreach(key; [ONE, TWO, 1]) {} + ^ +fail_compilation/b17285.d(20): Error: type `TWO` has no value + foreach(key; [ONE, TWO, 1]) {} + ^ +fail_compilation/b17285.d(20): Error: cannot implicitly convert expression `ONE` of type `b17285.ONE` to `int` + foreach(key; [ONE, TWO, 1]) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/b17918.d b/compiler/test/fail_compilation/b17918.d index 00f2b76b8c63..d4a745a48233 100644 --- a/compiler/test/fail_compilation/b17918.d +++ b/compiler/test/fail_compilation/b17918.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/b17918a.d TEST_OUTPUT: --- fail_compilation/imports/b17918a.d(7): Error: undefined identifier `_listMap` + return _listMap; + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=17918 diff --git a/compiler/test/fail_compilation/b19523.d b/compiler/test/fail_compilation/b19523.d index d2a05c73dc1a..f4e3128404c8 100644 --- a/compiler/test/fail_compilation/b19523.d +++ b/compiler/test/fail_compilation/b19523.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: ---- -fail_compilation/b19523.d(13): Error: undefined identifier `SomeStruct` -fail_compilation/b19523.d(14): Error: function `foo` is not callable using argument types `(_error_)` -fail_compilation/b19523.d(14): cannot pass argument `__lambda2` of type `_error_` to parameter `int delegate() arg` -fail_compilation/b19523.d(19): `b19523.foo(int delegate() arg)` declared here +fail_compilation/b19523.d(19): Error: undefined identifier `SomeStruct` + SomeStruct s; + ^ +fail_compilation/b19523.d(20): Error: function `foo` is not callable using argument types `(_error_)` + foo({ + ^ +fail_compilation/b19523.d(20): cannot pass argument `__lambda2` of type `_error_` to parameter `int delegate() arg` +fail_compilation/b19523.d(25): `b19523.foo(int delegate() arg)` declared here +void foo (int delegate() arg) {} + ^ ---- */ module b19523; diff --git a/compiler/test/fail_compilation/b19685.d b/compiler/test/fail_compilation/b19685.d index 99addd839249..ac4d8804a9b3 100644 --- a/compiler/test/fail_compilation/b19685.d +++ b/compiler/test/fail_compilation/b19685.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/b19685.d(6): Error: overlapping default initialization for field `b` and `a` +fail_compilation/b19685.d(8): Error: overlapping default initialization for field `b` and `a` +struct S +^ --- */ struct S diff --git a/compiler/test/fail_compilation/b19691.d b/compiler/test/fail_compilation/b19691.d index d01c76490ab7..3c6668f36856 100644 --- a/compiler/test/fail_compilation/b19691.d +++ b/compiler/test/fail_compilation/b19691.d @@ -1,7 +1,9 @@ // REQUIRED_ARGS: -de /* TEST_OUTPUT: --- -fail_compilation/b19691.d(12): Error: forward reference to template `this` +fail_compilation/b19691.d(14): Error: forward reference to template `this` + S2(42, ""); + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=19691 diff --git a/compiler/test/fail_compilation/b19691e.d b/compiler/test/fail_compilation/b19691e.d index 1b8aa1c4f18a..b7541dd5edc8 100644 --- a/compiler/test/fail_compilation/b19691e.d +++ b/compiler/test/fail_compilation/b19691e.d @@ -1,9 +1,15 @@ // REQUIRED_ARGS: -de /* TEST_OUTPUT: --- -fail_compilation/b19691e.d(16): Error: forward reference to template `this` -fail_compilation/b19691e.d(16): Error: constructor `b19691e.S2.this(int a, S1 s = "")` is not callable using argument types `(int, string)` -fail_compilation/b19691e.d(16): Error: forward reference to template `this` +fail_compilation/b19691e.d(22): Error: forward reference to template `this` + S2(42, ""); + ^ +fail_compilation/b19691e.d(22): Error: constructor `b19691e.S2.this(int a, S1 s = "")` is not callable using argument types `(int, string)` + S2(42, ""); + ^ +fail_compilation/b19691e.d(22): Error: forward reference to template `this` + S2(42, ""); + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=19691 diff --git a/compiler/test/fail_compilation/b19717.d b/compiler/test/fail_compilation/b19717.d index 6a48b886e036..1aa4750c221d 100644 --- a/compiler/test/fail_compilation/b19717.d +++ b/compiler/test/fail_compilation/b19717.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/b19717.d(16): Error: undefined identifier `Foo`, did you mean function `foo`? -fail_compilation/b19717.d(13): Error: forward reference to template `foo` -fail_compilation/b19717.d(13): Error: forward reference to inferred return type of function call `foo()` +fail_compilation/b19717.d(22): Error: undefined identifier `Foo`, did you mean function `foo`? +void foo(Foo) {} + ^ +fail_compilation/b19717.d(19): Error: forward reference to template `foo` + return foo(); + ^ +fail_compilation/b19717.d(19): Error: forward reference to inferred return type of function call `foo()` + return foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/b19717a.d b/compiler/test/fail_compilation/b19717a.d index d10b3f940709..82ccb69a6b85 100644 --- a/compiler/test/fail_compilation/b19717a.d +++ b/compiler/test/fail_compilation/b19717a.d @@ -1,11 +1,21 @@ // REQUIRED_ARGS: -de /* TEST_OUTPUT: --- -fail_compilation/b19717a.d(14): Error: forward reference to template `a` -fail_compilation/b19717a.d(14): Error: forward reference to template `a` -fail_compilation/b19717a.d(14): Error: none of the overloads of `a` are callable using argument types `()` -fail_compilation/b19717a.d(13): Candidates are: `b19717a.a(int b)` -fail_compilation/b19717a.d(14): `b19717a.a(int b = a)` +fail_compilation/b19717a.d(24): Error: forward reference to template `a` +auto a(int b = a) {} + ^ +fail_compilation/b19717a.d(24): Error: forward reference to template `a` +auto a(int b = a) {} + ^ +fail_compilation/b19717a.d(24): Error: none of the overloads of `a` are callable using argument types `()` +auto a(int b = a) {} + ^ +fail_compilation/b19717a.d(23): Candidates are: `b19717a.a(int b)` +auto a(int b) {} + ^ +fail_compilation/b19717a.d(24): `b19717a.a(int b = a)` +auto a(int b = a) {} + ^ --- */ module b19717a; diff --git a/compiler/test/fail_compilation/b19730.d b/compiler/test/fail_compilation/b19730.d index 903d62978894..a9bb326fa240 100644 --- a/compiler/test/fail_compilation/b19730.d +++ b/compiler/test/fail_compilation/b19730.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/b19730.d(10): Error: found `)` while expecting `=` or identifier -fail_compilation/b19730.d(11): Error: found `)` while expecting `=` or identifier +fail_compilation/b19730.d(14): Error: found `)` while expecting `=` or identifier + if (const x) {} + ^ +fail_compilation/b19730.d(15): Error: found `)` while expecting `=` or identifier + if (auto x) {} + ^ --- */ void func() { diff --git a/compiler/test/fail_compilation/b20011.d b/compiler/test/fail_compilation/b20011.d index 50ef6aff6097..43bd3f9f96a2 100644 --- a/compiler/test/fail_compilation/b20011.d +++ b/compiler/test/fail_compilation/b20011.d @@ -1,19 +1,39 @@ /* TEST_OUTPUT: --- -fail_compilation/b20011.d(28): Error: cannot modify expression `S1(cast(ubyte)0u).member` because it is not an lvalue -fail_compilation/b20011.d(31): Error: cannot modify expression `S2(null).member` because it is not an lvalue -fail_compilation/b20011.d(32): Error: cannot modify expression `S2(null).member` because it is not an lvalue -fail_compilation/b20011.d(35): Error: cannot modify expression `U1(cast(ubyte)0u, ).m2` because it is not an lvalue -fail_compilation/b20011.d(40): Error: function `assignableByRef` is not callable using argument types `(ubyte)` -fail_compilation/b20011.d(40): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref ubyte p` -fail_compilation/b20011.d(37): `b20011.main.assignableByRef(ref ubyte p)` declared here -fail_compilation/b20011.d(41): Error: function `assignableByOut` is not callable using argument types `(ubyte)` -fail_compilation/b20011.d(41): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `out ubyte p` -fail_compilation/b20011.d(38): `b20011.main.assignableByOut(out ubyte p)` declared here -fail_compilation/b20011.d(42): Error: function `assignableByConstRef` is not callable using argument types `(ubyte)` -fail_compilation/b20011.d(42): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref const(ubyte) p` -fail_compilation/b20011.d(39): `b20011.main.assignableByConstRef(ref const(ubyte) p)` declared here +fail_compilation/b20011.d(48): Error: cannot modify expression `S1(cast(ubyte)0u).member` because it is not an lvalue + s1.member = 42; + ^ +fail_compilation/b20011.d(51): Error: cannot modify expression `S2(null).member` because it is not an lvalue + s2.member = []; + ^ +fail_compilation/b20011.d(52): Error: cannot modify expression `S2(null).member` because it is not an lvalue + s2.member ~= []; + ^ +fail_compilation/b20011.d(55): Error: cannot modify expression `U1(cast(ubyte)0u, ).m2` because it is not an lvalue + u1.m2 = 42; + ^ +fail_compilation/b20011.d(60): Error: function `assignableByRef` is not callable using argument types `(ubyte)` + assignableByRef(s1.member); + ^ +fail_compilation/b20011.d(60): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref ubyte p` +fail_compilation/b20011.d(57): `b20011.main.assignableByRef(ref ubyte p)` declared here + void assignableByRef(ref ubyte p){ p = 42; } + ^ +fail_compilation/b20011.d(61): Error: function `assignableByOut` is not callable using argument types `(ubyte)` + assignableByOut(s1.member); + ^ +fail_compilation/b20011.d(61): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `out ubyte p` +fail_compilation/b20011.d(58): `b20011.main.assignableByOut(out ubyte p)` declared here + void assignableByOut(out ubyte p){ p = 42; } + ^ +fail_compilation/b20011.d(62): Error: function `assignableByConstRef` is not callable using argument types `(ubyte)` + assignableByConstRef(s1.member); + ^ +fail_compilation/b20011.d(62): cannot pass rvalue argument `S1(cast(ubyte)0u).member` of type `ubyte` to parameter `ref const(ubyte) p` +fail_compilation/b20011.d(59): `b20011.main.assignableByConstRef(ref const(ubyte) p)` declared here + void assignableByConstRef(ref const ubyte p){} + ^ --- */ module b20011; diff --git a/compiler/test/fail_compilation/b20780.d b/compiler/test/fail_compilation/b20780.d index ec6917bb58ae..358cec9ac235 100644 --- a/compiler/test/fail_compilation/b20780.d +++ b/compiler/test/fail_compilation/b20780.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/b20780.d(10): Error: `@identifier` or `@(ArgumentList)` expected, not `@)` -fail_compilation/b20780.d(11): Error: `@identifier` or `@(ArgumentList)` expected, not `@,` -fail_compilation/b20780.d(11): Error: basic type expected, not `,` +fail_compilation/b20780.d(16): Error: `@identifier` or `@(ArgumentList)` expected, not `@)` +void f(@){} + ^ +fail_compilation/b20780.d(17): Error: `@identifier` or `@(ArgumentList)` expected, not `@,` +void g(@,){} + ^ +fail_compilation/b20780.d(17): Error: basic type expected, not `,` +void g(@,){} + ^ --- */ diff --git a/compiler/test/fail_compilation/b20875.d b/compiler/test/fail_compilation/b20875.d index 8fd85055b306..972f5ed389cd 100644 --- a/compiler/test/fail_compilation/b20875.d +++ b/compiler/test/fail_compilation/b20875.d @@ -4,12 +4,22 @@ module b20875; TEST_OUTPUT: --- fail_compilation/b20875.d(10): Error: template instance `Foo!int` does not match template declaration `Foo(alias T : None!U, U...)` +fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()` + ^ fail_compilation/b20875.d(10): while evaluating: `static assert(Foo!int)` +fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()` +^ fail_compilation/b20875.d(11): Error: template instance `Bar!int` does not match template declaration `Bar(alias T : None!U, U...)` fail_compilation/b20875.d(11): while evaluating: `static assert(!Bar!int)` fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()` +fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()` + ^ fail_compilation/b20875.d(15): while looking for match for `Baz!int` +fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()` + ^ fail_compilation/b20875.d(15): while evaluating: `static assert(!Baz!int)` +fail_compilation/b20875.d(14): Error: template parameter specialization for a type must be a type and not `NotAType()` +^ --- */ diff --git a/compiler/test/fail_compilation/b6227.d b/compiler/test/fail_compilation/b6227.d index c975a436e6db..2d7959a4da94 100644 --- a/compiler/test/fail_compilation/b6227.d +++ b/compiler/test/fail_compilation/b6227.d @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/b6227.d(16): Error: comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType` -fail_compilation/b6227.d(16): while evaluating: `static assert(!(X.O != Y.U))` -fail_compilation/b6227.d(17): Error: comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType` -fail_compilation/b6227.d(17): while evaluating: `static assert(X.O == Y.U)` +fail_compilation/b6227.d(24): Error: comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType` +static assert(!(X.O != Y.U)); + ^ +fail_compilation/b6227.d(24): while evaluating: `static assert(!(X.O != Y.U))` +static assert(!(X.O != Y.U)); +^ +fail_compilation/b6227.d(25): Error: comparison between different enumeration types `X` and `Y`; If this behavior is intended consider using `std.conv.asOriginalType` +static assert( (X.O == Y.U)); + ^ +fail_compilation/b6227.d(25): while evaluating: `static assert(X.O == Y.U)` +static assert( (X.O == Y.U)); +^ --- */ enum X { diff --git a/compiler/test/fail_compilation/betterc.d b/compiler/test/fail_compilation/betterc.d index 6f4fb036b7f0..2656842bb30c 100644 --- a/compiler/test/fail_compilation/betterc.d +++ b/compiler/test/fail_compilation/betterc.d @@ -1,9 +1,15 @@ /* REQUIRED_ARGS: -betterC * TEST_OUTPUT: --- -fail_compilation/betterc.d(12): Error: cannot use `throw` statements with -betterC -fail_compilation/betterc.d(17): Error: cannot use try-catch statements with -betterC -fail_compilation/betterc.d(29): Error: `TypeInfo` cannot be used with -betterC +fail_compilation/betterc.d(18): Error: cannot use `throw` statements with -betterC + throw new Exception("msg"); + ^ +fail_compilation/betterc.d(23): Error: cannot use try-catch statements with -betterC + try + ^ +fail_compilation/betterc.d(35): Error: `TypeInfo` cannot be used with -betterC + auto ti = typeid(i); + ^ --- */ diff --git a/compiler/test/fail_compilation/binexperr.d b/compiler/test/fail_compilation/binexperr.d index 695b2746b186..1c0aa6f47e79 100644 --- a/compiler/test/fail_compilation/binexperr.d +++ b/compiler/test/fail_compilation/binexperr.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/binexperr.d(12): Error: expression expected, not `)` -fail_compilation/binexperr.d(12): Error: missing closing `)` after `if (A1 * (__error)` +fail_compilation/binexperr.d(16): Error: expression expected, not `)` + if (A1*) {} + ^ +fail_compilation/binexperr.d(16): Error: missing closing `)` after `if (A1 * (__error)` + if (A1*) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/biterrors5.d b/compiler/test/fail_compilation/biterrors5.d index 2665d69cc98e..be0ddcaeb9a3 100644 --- a/compiler/test/fail_compilation/biterrors5.d +++ b/compiler/test/fail_compilation/biterrors5.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=bitfields * TEST_OUTPUT: --- -fail_compilation/biterrors5.d(23): Error: bitfield symbol expected not struct `biterrors5.S` -fail_compilation/biterrors5.d(24): Error: bitfield symbol expected not variable `biterrors5.test0.i` +fail_compilation/biterrors5.d(27): Error: bitfield symbol expected not struct `biterrors5.S` + i = __traits(getBitfieldOffset, S); + ^ +fail_compilation/biterrors5.d(28): Error: bitfield symbol expected not variable `biterrors5.test0.i` + i = __traits(getBitfieldOffset, i); + ^ --- */ diff --git a/compiler/test/fail_compilation/bitintro.d b/compiler/test/fail_compilation/bitintro.d index d58c3ea56ff0..43c3964e2d82 100644 --- a/compiler/test/fail_compilation/bitintro.d +++ b/compiler/test/fail_compilation/bitintro.d @@ -29,9 +29,17 @@ static assert(S.c.bitwidth == 6); /* TEST_OUTPUT: --- fail_compilation/bitintro.d(6): Error: `a` is not a bitfield, cannot apply `bitoffsetof` -fail_compilation/bitintro.d(37): while evaluating: `static assert(a.bitoffsetof)` + int a; + ^ +fail_compilation/bitintro.d(45): while evaluating: `static assert(a.bitoffsetof)` +static assert(S.a.bitoffsetof); +^ fail_compilation/bitintro.d(6): Error: `a` is not a bitfield, cannot apply `bitwidth` -fail_compilation/bitintro.d(38): while evaluating: `static assert(a.bitwidth)` + int a; + ^ +fail_compilation/bitintro.d(46): while evaluating: `static assert(a.bitwidth)` +static assert(S.a.bitwidth); +^ --- */ static assert(S.a.bitoffsetof); diff --git a/compiler/test/fail_compilation/bool_cast.d b/compiler/test/fail_compilation/bool_cast.d index 830360a74c34..12480d20546c 100644 --- a/compiler/test/fail_compilation/bool_cast.d +++ b/compiler/test/fail_compilation/bool_cast.d @@ -2,12 +2,18 @@ REQUIRED_ARGS: -de -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/bool_cast.d(17): Deprecation: cast from `ubyte[]` to `bool[]` not allowed in safe code -fail_compilation/bool_cast.d(17): Source element may have bytes which are not 0 or 1 -fail_compilation/bool_cast.d(22): Deprecation: cast from `int*` to `bool*` not allowed in safe code -fail_compilation/bool_cast.d(22): Source element may have bytes which are not 0 or 1 -fail_compilation/bool_cast.d(24): Deprecation: cast from `bool*` to `byte*` not allowed in safe code -fail_compilation/bool_cast.d(24): Target element could be assigned a byte which is not 0 or 1 +fail_compilation/bool_cast.d(23): Deprecation: cast from `ubyte[]` to `bool[]` not allowed in safe code + auto b = cast(bool[]) a; // reinterprets a's data + ^ +fail_compilation/bool_cast.d(23): Source element may have bytes which are not 0 or 1 +fail_compilation/bool_cast.d(28): Deprecation: cast from `int*` to `bool*` not allowed in safe code + auto p = cast(bool*) &i; + ^ +fail_compilation/bool_cast.d(28): Source element may have bytes which are not 0 or 1 +fail_compilation/bool_cast.d(30): Deprecation: cast from `bool*` to `byte*` not allowed in safe code + auto bp = cast(byte*) &v; + ^ +fail_compilation/bool_cast.d(30): Target element could be assigned a byte which is not 0 or 1 --- */ diff --git a/compiler/test/fail_compilation/bug16165.d b/compiler/test/fail_compilation/bug16165.d index 608e34785158..2dd687debf42 100644 --- a/compiler/test/fail_compilation/bug16165.d +++ b/compiler/test/fail_compilation/bug16165.d @@ -11,10 +11,18 @@ void g() TEST_OUTPUT: --- fail_compilation/bug16165.d(6): Error: function `f` is not callable using argument types `(Object, Object, int)` + f(o, o, 404); + ^ fail_compilation/bug16165.d(6): cannot pass argument `o` of type `object.Object` to parameter `int x` fail_compilation/bug16165.d(1): `bug16165.f(int x, Object y)` declared here +void f(int x, Object y); + ^ fail_compilation/bug16165.d(7): Error: function `f` is not callable using argument types `(int, int, int)` + f(5, 6, 404); + ^ fail_compilation/bug16165.d(7): cannot pass argument `6` of type `int` to parameter `Object y` fail_compilation/bug16165.d(1): `bug16165.f(int x, Object y)` declared here +void f(int x, Object y); + ^ --- */ diff --git a/compiler/test/fail_compilation/bug18743.d b/compiler/test/fail_compilation/bug18743.d index 9d2f88864812..9b6bd91bb9b7 100644 --- a/compiler/test/fail_compilation/bug18743.d +++ b/compiler/test/fail_compilation/bug18743.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/bug18743.d(18): Error: `a ? a = 4 : a` must be surrounded by parentheses when next to operator `=` -fail_compilation/bug18743.d(19): Error: `a ? --a : a` must be surrounded by parentheses when next to operator `+=` +fail_compilation/bug18743.d(22): Error: `a ? a = 4 : a` must be surrounded by parentheses when next to operator `=` + a ? a = 4 : a = 5; + ^ +fail_compilation/bug18743.d(23): Error: `a ? --a : a` must be surrounded by parentheses when next to operator `+=` + a ? --a : a += 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/bug19569.d b/compiler/test/fail_compilation/bug19569.d index a314142a53d1..c38cbf7bec0c 100644 --- a/compiler/test/fail_compilation/bug19569.d +++ b/compiler/test/fail_compilation/bug19569.d @@ -1,54 +1,78 @@ /* TEST_OUTPUT: --- -fail_compilation/bug19569.d(70): Error: `bug19569.test0` called with argument types `()` matches both: -fail_compilation/bug19569.d(56): `bug19569.test0()` +fail_compilation/bug19569.d(94): Error: `bug19569.test0` called with argument types `()` matches both: +fail_compilation/bug19569.d(80): `bug19569.test0()` and: -fail_compilation/bug19569.d(57): `bug19569.test0()` -fail_compilation/bug19569.d(71): Error: `bug19569.test1` called with argument types `()` matches both: -fail_compilation/bug19569.d(59): `bug19569.test1()` +fail_compilation/bug19569.d(81): `bug19569.test0()` + test0(); + ^ +fail_compilation/bug19569.d(95): Error: `bug19569.test1` called with argument types `()` matches both: +fail_compilation/bug19569.d(83): `bug19569.test1()` and: -fail_compilation/bug19569.d(60): `bug19569.test1()` -fail_compilation/bug19569.d(72): Error: `bug19569.test2` called with argument types `()` matches both: -fail_compilation/bug19569.d(62): `bug19569.test2!().test2()` +fail_compilation/bug19569.d(84): `bug19569.test1()` + test1(); + ^ +fail_compilation/bug19569.d(96): Error: `bug19569.test2` called with argument types `()` matches both: +fail_compilation/bug19569.d(86): `bug19569.test2!().test2()` and: -fail_compilation/bug19569.d(63): `bug19569.test2!().test2()` -fail_compilation/bug19569.d(73): Error: `bug19569.test3` called with argument types `()` matches both: -fail_compilation/bug19569.d(65): `bug19569.test3!().test3()` +fail_compilation/bug19569.d(87): `bug19569.test2!().test2()` + test2(); + ^ +fail_compilation/bug19569.d(97): Error: `bug19569.test3` called with argument types `()` matches both: +fail_compilation/bug19569.d(89): `bug19569.test3!().test3()` and: -fail_compilation/bug19569.d(66): `bug19569.test3!().test3()` -fail_compilation/bug19569.d(78): Error: `bug19569.test0` called with argument types `()` matches both: -fail_compilation/bug19569.d(56): `bug19569.test0()` +fail_compilation/bug19569.d(90): `bug19569.test3!().test3()` + test3(); + ^ +fail_compilation/bug19569.d(102): Error: `bug19569.test0` called with argument types `()` matches both: +fail_compilation/bug19569.d(80): `bug19569.test0()` and: -fail_compilation/bug19569.d(57): `bug19569.test0()` -fail_compilation/bug19569.d(79): Error: `bug19569.test1` called with argument types `()` matches both: -fail_compilation/bug19569.d(59): `bug19569.test1()` +fail_compilation/bug19569.d(81): `bug19569.test0()` + test0(); + ^ +fail_compilation/bug19569.d(103): Error: `bug19569.test1` called with argument types `()` matches both: +fail_compilation/bug19569.d(83): `bug19569.test1()` and: -fail_compilation/bug19569.d(60): `bug19569.test1()` -fail_compilation/bug19569.d(80): Error: `bug19569.test2` called with argument types `()` matches both: -fail_compilation/bug19569.d(62): `bug19569.test2!().test2()` +fail_compilation/bug19569.d(84): `bug19569.test1()` + test1(); + ^ +fail_compilation/bug19569.d(104): Error: `bug19569.test2` called with argument types `()` matches both: +fail_compilation/bug19569.d(86): `bug19569.test2!().test2()` and: -fail_compilation/bug19569.d(63): `bug19569.test2!().test2()` -fail_compilation/bug19569.d(81): Error: `bug19569.test3` called with argument types `()` matches both: -fail_compilation/bug19569.d(65): `bug19569.test3!().test3()` +fail_compilation/bug19569.d(87): `bug19569.test2!().test2()` + test2(); + ^ +fail_compilation/bug19569.d(105): Error: `bug19569.test3` called with argument types `()` matches both: +fail_compilation/bug19569.d(89): `bug19569.test3!().test3()` and: -fail_compilation/bug19569.d(66): `bug19569.test3!().test3()` -fail_compilation/bug19569.d(86): Error: `bug19569.test0` called with argument types `()` matches both: -fail_compilation/bug19569.d(56): `bug19569.test0()` +fail_compilation/bug19569.d(90): `bug19569.test3!().test3()` + test3(); + ^ +fail_compilation/bug19569.d(110): Error: `bug19569.test0` called with argument types `()` matches both: +fail_compilation/bug19569.d(80): `bug19569.test0()` and: -fail_compilation/bug19569.d(57): `bug19569.test0()` -fail_compilation/bug19569.d(87): Error: `bug19569.test1` called with argument types `()` matches both: -fail_compilation/bug19569.d(59): `bug19569.test1()` +fail_compilation/bug19569.d(81): `bug19569.test0()` + test0(); + ^ +fail_compilation/bug19569.d(111): Error: `bug19569.test1` called with argument types `()` matches both: +fail_compilation/bug19569.d(83): `bug19569.test1()` and: -fail_compilation/bug19569.d(60): `bug19569.test1()` -fail_compilation/bug19569.d(88): Error: `bug19569.test2` called with argument types `()` matches both: -fail_compilation/bug19569.d(62): `bug19569.test2!().test2()` +fail_compilation/bug19569.d(84): `bug19569.test1()` + test1(); + ^ +fail_compilation/bug19569.d(112): Error: `bug19569.test2` called with argument types `()` matches both: +fail_compilation/bug19569.d(86): `bug19569.test2!().test2()` and: -fail_compilation/bug19569.d(63): `bug19569.test2!().test2()` -fail_compilation/bug19569.d(89): Error: `bug19569.test3` called with argument types `()` matches both: -fail_compilation/bug19569.d(65): `bug19569.test3!().test3()` +fail_compilation/bug19569.d(87): `bug19569.test2!().test2()` + test2(); + ^ +fail_compilation/bug19569.d(113): Error: `bug19569.test3` called with argument types `()` matches both: +fail_compilation/bug19569.d(89): `bug19569.test3!().test3()` and: -fail_compilation/bug19569.d(66): `bug19569.test3!().test3()` +fail_compilation/bug19569.d(90): `bug19569.test3!().test3()` + test3(); + ^ --- */ diff --git a/compiler/test/fail_compilation/bug5.d b/compiler/test/fail_compilation/bug5.d index 44e4c80e8066..82158a7d8301 100644 --- a/compiler/test/fail_compilation/bug5.d +++ b/compiler/test/fail_compilation/bug5.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/bug5.d(8): Error: function `bug5.test1` no `return exp;` or `assert(0);` at end of function +fail_compilation/bug5.d(10): Error: function `bug5.test1` no `return exp;` or `assert(0);` at end of function +int test1() + ^ --- */ diff --git a/compiler/test/fail_compilation/bug5b.d b/compiler/test/fail_compilation/bug5b.d index 487f22efde12..a3186b80f36e 100644 --- a/compiler/test/fail_compilation/bug5b.d +++ b/compiler/test/fail_compilation/bug5b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/bug5b.d(8): Error: function `bug5b.test1` has no `return` statement, but is expected to return a value of type `int` +fail_compilation/bug5b.d(10): Error: function `bug5b.test1` has no `return` statement, but is expected to return a value of type `int` +int test1() + ^ --- */ diff --git a/compiler/test/fail_compilation/bug8150a.d b/compiler/test/fail_compilation/bug8150a.d index fab12c20b841..5f48441ee0f6 100644 --- a/compiler/test/fail_compilation/bug8150a.d +++ b/compiler/test/fail_compilation/bug8150a.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/bug8150a.d(14): Error: `object.Exception` is thrown but not caught -fail_compilation/bug8150a.d(12): Error: constructor `bug8150a.Foo.this` may throw but is marked as `nothrow` +fail_compilation/bug8150a.d(18): Error: `object.Exception` is thrown but not caught + throw new Exception("something"); + ^ +fail_compilation/bug8150a.d(16): Error: constructor `bug8150a.Foo.this` may throw but is marked as `nothrow` + this(int) nothrow + ^ --- */ diff --git a/compiler/test/fail_compilation/bug8150b.d b/compiler/test/fail_compilation/bug8150b.d index 606b628270b8..08c207712bde 100644 --- a/compiler/test/fail_compilation/bug8150b.d +++ b/compiler/test/fail_compilation/bug8150b.d @@ -2,9 +2,15 @@ /* TEST_OUTPUT: --- -fail_compilation/bug8150b.d(15): Error: `object.Exception` is thrown but not caught -fail_compilation/bug8150b.d(13): Error: constructor `bug8150b.Foo.__ctor!().this` may throw but is marked as `nothrow` -fail_compilation/bug8150b.d(20): Error: template instance `bug8150b.Foo.__ctor!()` error instantiating +fail_compilation/bug8150b.d(21): Error: `object.Exception` is thrown but not caught + throw new Exception("something"); + ^ +fail_compilation/bug8150b.d(19): Error: constructor `bug8150b.Foo.__ctor!().this` may throw but is marked as `nothrow` + this()(int) nothrow + ^ +fail_compilation/bug8150b.d(26): Error: template instance `bug8150b.Foo.__ctor!()` error instantiating + Foo(1); + ^ --- */ diff --git a/compiler/test/fail_compilation/bug8891.d b/compiler/test/fail_compilation/bug8891.d index 7b927f97007e..cfe2de048f0d 100644 --- a/compiler/test/fail_compilation/bug8891.d +++ b/compiler/test/fail_compilation/bug8891.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/bug8891.d(21): Error: calling non-static function `opCall` requires an instance of type `S` +fail_compilation/bug8891.d(23): Error: calling non-static function `opCall` requires an instance of type `S` + S s = 10; + ^ --- */ diff --git a/compiler/test/fail_compilation/call_function_type.d b/compiler/test/fail_compilation/call_function_type.d index da60092c8491..317a8a6ab356 100644 --- a/compiler/test/fail_compilation/call_function_type.d +++ b/compiler/test/fail_compilation/call_function_type.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/call_function_type.d(18): Error: missing argument for parameter #1: `int` -fail_compilation/call_function_type.d(19): Error: cannot call `int(int)(3)` at compile time +fail_compilation/call_function_type.d(22): Error: missing argument for parameter #1: `int` + enum X0 = FT(); + ^ +fail_compilation/call_function_type.d(23): Error: cannot call `int(int)(3)` at compile time + enum X1 = FT(3); + ^ --- */ diff --git a/compiler/test/fail_compilation/callconst.d b/compiler/test/fail_compilation/callconst.d index a3aee7c6b59f..caf7d7866cd6 100644 --- a/compiler/test/fail_compilation/callconst.d +++ b/compiler/test/fail_compilation/callconst.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/callconst.d(14): Error: function `func` is not callable using argument types `(const(X))` -fail_compilation/callconst.d(14): cannot pass argument `x` of type `const(X)` to parameter `ref X` -fail_compilation/callconst.d(17): `callconst.func(ref X)` declared here +fail_compilation/callconst.d(18): Error: function `func` is not callable using argument types `(const(X))` + func(x); + ^ +fail_compilation/callconst.d(18): cannot pass argument `x` of type `const(X)` to parameter `ref X` +fail_compilation/callconst.d(21): `callconst.func(ref X)` declared here +void func(ref X); + ^ --- */ struct X {} diff --git a/compiler/test/fail_compilation/cast_qual.d b/compiler/test/fail_compilation/cast_qual.d index 5821dc149940..9693e7299461 100644 --- a/compiler/test/fail_compilation/cast_qual.d +++ b/compiler/test/fail_compilation/cast_qual.d @@ -2,10 +2,16 @@ REQUIRED_ARGS: -preview=dip1000 -de TEST_OUTPUT: --- -fail_compilation/cast_qual.d(17): Deprecation: cast from `const(int)` to `int` cannot be used as an lvalue in @safe code -fail_compilation/cast_qual.d(19): Deprecation: cast from `const(int)` to `int` cannot be used as an lvalue in @safe code -fail_compilation/cast_qual.d(25): Error: cast from `const(Object)` to `object.Object` not allowed in safe code -fail_compilation/cast_qual.d(25): Incompatible type qualifier +fail_compilation/cast_qual.d(23): Deprecation: cast from `const(int)` to `int` cannot be used as an lvalue in @safe code + int* p = &cast() i; // this should not compile in @safe code + ^ +fail_compilation/cast_qual.d(25): Deprecation: cast from `const(int)` to `int` cannot be used as an lvalue in @safe code + cast() i = 5; // NG + ^ +fail_compilation/cast_qual.d(31): Error: cast from `const(Object)` to `object.Object` not allowed in safe code + auto o = cast() co; + ^ +fail_compilation/cast_qual.d(31): Incompatible type qualifier --- */ diff --git a/compiler/test/fail_compilation/ccast.d b/compiler/test/fail_compilation/ccast.d index 3558e0cc655d..c8adb05a2b02 100644 --- a/compiler/test/fail_compilation/ccast.d +++ b/compiler/test/fail_compilation/ccast.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ccast.d(12): Error: C style cast illegal, use `cast(byte)i` -fail_compilation/ccast.d(25): Error: C style cast illegal, use `cast(foo)5` -fail_compilation/ccast.d(27): Error: C style cast illegal, use `cast(void*)5` -fail_compilation/ccast.d(30): Error: C style cast illegal, use `cast(void*)5` +fail_compilation/ccast.d(20): Error: C style cast illegal, use `cast(byte)i` +byte b = (byte)i; + ^ +fail_compilation/ccast.d(33): Error: C style cast illegal, use `cast(foo)5` + (foo)5; + ^ +fail_compilation/ccast.d(35): Error: C style cast illegal, use `cast(void*)5` + (void*)5; + ^ +fail_compilation/ccast.d(38): Error: C style cast illegal, use `cast(void*)5` + (void*) + ^ --- */ diff --git a/compiler/test/fail_compilation/cdeprecated.i b/compiler/test/fail_compilation/cdeprecated.i index 75ce2acbe6e9..89dc6d88f109 100644 --- a/compiler/test/fail_compilation/cdeprecated.i +++ b/compiler/test/fail_compilation/cdeprecated.i @@ -1,10 +1,18 @@ /* REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/cdeprecated.i(18): Deprecation: function `cdeprecated.mars` is deprecated -fail_compilation/cdeprecated.i(19): Deprecation: function `cdeprecated.jupiter` is deprecated - jumping jupiter -fail_compilation/cdeprecated.i(20): Deprecation: function `cdeprecated.saturn` is deprecated -fail_compilation/cdeprecated.i(21): Deprecation: function `cdeprecated.neptune` is deprecated - spinning neptune +fail_compilation/cdeprecated.i(26): Deprecation: function `cdeprecated.mars` is deprecated + mars() + + ^ +fail_compilation/cdeprecated.i(27): Deprecation: function `cdeprecated.jupiter` is deprecated - jumping jupiter + jupiter() + + ^ +fail_compilation/cdeprecated.i(28): Deprecation: function `cdeprecated.saturn` is deprecated + saturn() + + ^ +fail_compilation/cdeprecated.i(29): Deprecation: function `cdeprecated.neptune` is deprecated - spinning neptune + neptune(); + ^ --- */ __declspec(deprecated) int mars(); diff --git a/compiler/test/fail_compilation/cerrors.d b/compiler/test/fail_compilation/cerrors.d index db306c1f2134..d362949db28b 100644 --- a/compiler/test/fail_compilation/cerrors.d +++ b/compiler/test/fail_compilation/cerrors.d @@ -1,12 +1,22 @@ /* REQUIRED_ARGS: -wi TEST_OUTPUT: --- -fail_compilation/cerrors.d(13): Error: C preprocessor directive `#if` is not supported, use `version` or `static if` -fail_compilation/cerrors.d(13): Error: declaration expected, not `#` -fail_compilation/cerrors.d(17): Error: C preprocessor directive `#endif` is not supported -fail_compilation/cerrors.d(17): Error: declaration expected, not `#` -fail_compilation/cerrors.d(21): Error: token string requires valid D tokens, not `#if` -fail_compilation/cerrors.d(22): Deprecation: token string requires valid D tokens, not `#include` +fail_compilation/cerrors.d(23): Error: C preprocessor directive `#if` is not supported, use `version` or `static if` +#if 1 + ^ +fail_compilation/cerrors.d(23): Error: declaration expected, not `#` +#if 1 +^ +fail_compilation/cerrors.d(27): Error: C preprocessor directive `#endif` is not supported +fail_compilation/cerrors.d(27): Error: declaration expected, not `#` +#endif +^ +fail_compilation/cerrors.d(31): Error: token string requires valid D tokens, not `#if` +#if 1 + ^ +fail_compilation/cerrors.d(32): Deprecation: token string requires valid D tokens, not `#include` +#include + ^ --- */ diff --git a/compiler/test/fail_compilation/checkimports2.d b/compiler/test/fail_compilation/checkimports2.d index 44c237f144f8..883625f95601 100644 --- a/compiler/test/fail_compilation/checkimports2.d +++ b/compiler/test/fail_compilation/checkimports2.d @@ -2,10 +2,18 @@ /* TEST_OUTPUT: --- -fail_compilation/checkimports2.d(25): Error: no property `X` for type `checkimports2.B`, did you mean `imports.imp2.X`? -fail_compilation/checkimports2.d(25): while evaluating: `static assert((B).X == 0)` -fail_compilation/checkimports2.d(26): Error: no property `Y` for type `checkimports2.B`, did you mean `imports.imp2.Y`? -fail_compilation/checkimports2.d(26): while evaluating: `static assert((B).Y == 2)` +fail_compilation/checkimports2.d(33): Error: no property `X` for type `checkimports2.B`, did you mean `imports.imp2.X`? + static assert(B.X == 0); // imp2.X --> error + ^ +fail_compilation/checkimports2.d(33): while evaluating: `static assert((B).X == 0)` + static assert(B.X == 0); // imp2.X --> error + ^ +fail_compilation/checkimports2.d(34): Error: no property `Y` for type `checkimports2.B`, did you mean `imports.imp2.Y`? + static assert(B.Y == 2); // imp2.Y --> error + ^ +fail_compilation/checkimports2.d(34): while evaluating: `static assert((B).Y == 2)` + static assert(B.Y == 2); // imp2.Y --> error + ^ --- */ diff --git a/compiler/test/fail_compilation/circ10280.d b/compiler/test/fail_compilation/circ10280.d index 176295fea71f..f681e9df2ec4 100644 --- a/compiler/test/fail_compilation/circ10280.d +++ b/compiler/test/fail_compilation/circ10280.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/circ10280.d(11): Error: circular initialization of variable `circ10280.q10280` -fail_compilation/circ10280.d(10): called from here: `foo10280()` +fail_compilation/circ10280.d(15): Error: circular initialization of variable `circ10280.q10280` +int foo10280() { return q10280; } + ^ +fail_compilation/circ10280.d(14): called from here: `foo10280()` +const int q10280 = foo10280(); + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=10280 diff --git a/compiler/test/fail_compilation/class1.d b/compiler/test/fail_compilation/class1.d index a8907ef30c27..36ed1796a6aa 100644 --- a/compiler/test/fail_compilation/class1.d +++ b/compiler/test/fail_compilation/class1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/class1.d(11): Error: class `class1.C` identity assignment operator overload is illegal +fail_compilation/class1.d(13): Error: class `class1.C` identity assignment operator overload is illegal + void opAssign(C rhs){} + ^ --- */ diff --git a/compiler/test/fail_compilation/class2.d b/compiler/test/fail_compilation/class2.d index a35591761a7a..7b44f704f9e4 100644 --- a/compiler/test/fail_compilation/class2.d +++ b/compiler/test/fail_compilation/class2.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/class2.d(11): Error: class `class2.C` identity assignment operator overload is illegal +fail_compilation/class2.d(13): Error: class `class2.C` identity assignment operator overload is illegal + void opAssign(T)(T rhs){} + ^ --- */ diff --git a/compiler/test/fail_compilation/commaexp.d b/compiler/test/fail_compilation/commaexp.d index 3874fb18ef10..0500ac5ad088 100644 --- a/compiler/test/fail_compilation/commaexp.d +++ b/compiler/test/fail_compilation/commaexp.d @@ -1,16 +1,36 @@ /* REQUIRED_ARGS: -o- TEST_OUTPUT: --- -fail_compilation/commaexp.d(27): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(39): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(40): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(41): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(42): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(44): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(45): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(56): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(69): Error: using the result of a comma expression is not allowed -fail_compilation/commaexp.d(81): Error: using the result of a comma expression is not allowed +fail_compilation/commaexp.d(47): Error: using the result of a comma expression is not allowed + enum ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED = (WINHTTP_ERROR_BASE, + 44); + ^ +fail_compilation/commaexp.d(59): Error: using the result of a comma expression is not allowed + for (size_t i; i < 5; ++i, i += (i++, 1)) {} + ^ +fail_compilation/commaexp.d(60): Error: using the result of a comma expression is not allowed + for (; aggr++, aggr > 5;) {} + ^ +fail_compilation/commaexp.d(61): Error: using the result of a comma expression is not allowed + if (Object o = (ok = true, null)) {} + ^ +fail_compilation/commaexp.d(62): Error: using the result of a comma expression is not allowed + ok = (true, mc.append(new Entry)); + ^ +fail_compilation/commaexp.d(64): Error: using the result of a comma expression is not allowed + ok = true, (ok = (true, false)); + ^ +fail_compilation/commaexp.d(65): Error: using the result of a comma expression is not allowed + return 42, 0; + ^ +fail_compilation/commaexp.d(76): Error: using the result of a comma expression is not allowed + return type == Type.Colon, type == Type.Comma; + ^ +fail_compilation/commaexp.d(89): Error: using the result of a comma expression is not allowed + return type == Type.Colon, type == Type.Comma; + ^ +fail_compilation/commaexp.d(101): Error: using the result of a comma expression is not allowed + bar11((i,p), &i); + ^ --- */ diff --git a/compiler/test/fail_compilation/const_ctor.d b/compiler/test/fail_compilation/const_ctor.d index ae37023f0a10..7eadb1a9ffea 100644 --- a/compiler/test/fail_compilation/const_ctor.d +++ b/compiler/test/fail_compilation/const_ctor.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/const_ctor.d(23): Error: `const` copy constructor `const_ctor.S1.this` cannot construct a mutable object -fail_compilation/const_ctor.d(25): Error: `const` constructor `const_ctor.S2.this` cannot construct a mutable object +fail_compilation/const_ctor.d(27): Error: `const` copy constructor `const_ctor.S1.this` cannot construct a mutable object + S1 m1 = s1; + ^ +fail_compilation/const_ctor.d(29): Error: `const` constructor `const_ctor.S2.this` cannot construct a mutable object + S2 s2 = S2(5); + ^ --- */ diff --git a/compiler/test/fail_compilation/constraints_aggr.d b/compiler/test/fail_compilation/constraints_aggr.d index 4c31e9e729b9..c40fad87ffd9 100755 --- a/compiler/test/fail_compilation/constraints_aggr.d +++ b/compiler/test/fail_compilation/constraints_aggr.d @@ -2,25 +2,37 @@ EXTRA_FILES: imports/constraints.d TEST_OUTPUT: --- -fail_compilation/constraints_aggr.d(32): Error: template `f` is not callable using argument types `!()(int)` +fail_compilation/constraints_aggr.d(44): Error: template `f` is not callable using argument types `!()(int)` + c.f(0); + ^ fail_compilation/imports/constraints.d(60): Candidate is: `f(T)(T v)` with `T = int` must satisfy the following constraint: ` !P!T` -fail_compilation/constraints_aggr.d(33): Error: template `g` is not callable using argument types `!()()` + void f(T)(T v) if (P!T && !P!T) + ^ +fail_compilation/constraints_aggr.d(45): Error: template `g` is not callable using argument types `!()()` + c.g(); + ^ fail_compilation/imports/constraints.d(63): Candidate is: `g(this T)()` with `T = imports.constraints.C` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_aggr.d(35): Error: template instance `imports.constraints.S!int` does not match template declaration `S(T)` + void g(this T)() if (N!T) + ^ +fail_compilation/constraints_aggr.d(47): Error: template instance `imports.constraints.S!int` does not match template declaration `S(T)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_aggr.d(44): Error: template instance `imports.constraints.BitFlags!(Enum)` does not match template declaration `BitFlags(E, bool unsafe = false)` + S!int; + ^ +fail_compilation/constraints_aggr.d(56): Error: template instance `imports.constraints.BitFlags!(Enum)` does not match template declaration `BitFlags(E, bool unsafe = false)` with `E = Enum` must satisfy one of the following constraints: ` unsafe N!E` + BitFlags!Enum flags; + ^ --- */ diff --git a/compiler/test/fail_compilation/constraints_defs.d b/compiler/test/fail_compilation/constraints_defs.d index 751520864371..fdc1b7440fb8 100755 --- a/compiler/test/fail_compilation/constraints_defs.d +++ b/compiler/test/fail_compilation/constraints_defs.d @@ -2,43 +2,57 @@ EXTRA_FILES: imports/constraints.d TEST_OUTPUT: --- -fail_compilation/constraints_defs.d(49): Error: template instance `constraints_defs.main.def!(int, 0, (a) => a)` does not match template declaration `def(T, int i = 5, alias R)()` +fail_compilation/constraints_defs.d(63): Error: template instance `constraints_defs.main.def!(int, 0, (a) => a)` does not match template declaration `def(T, int i = 5, alias R)()` with `T = int, i = 0, R = __lambda1` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_defs.d(50): Error: template instance `imports.constraints.defa!int` does not match template declaration `defa(T, U = int)()` + def!(int, 0, a => a)(); + ^ +fail_compilation/constraints_defs.d(64): Error: template instance `imports.constraints.defa!int` does not match template declaration `defa(T, U = int)()` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_defs.d(51): Error: template instance `imports.constraints.defv!()` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` + defa!(int)(); + ^ +fail_compilation/constraints_defs.d(65): Error: template instance `imports.constraints.defv!()` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` with `Ts = ()` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_defs.d(52): Error: template instance `imports.constraints.defv!int` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` + defv!()(); + ^ +fail_compilation/constraints_defs.d(66): Error: template instance `imports.constraints.defv!int` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` with `T = int, Ts = ()` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_defs.d(53): Error: template instance `imports.constraints.defv!(int, 0)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` + defv!(int)(); + ^ +fail_compilation/constraints_defs.d(67): Error: template instance `imports.constraints.defv!(int, 0)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` with `T = int, i = 0, Ts = ()` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_defs.d(54): Error: template instance `imports.constraints.defv!(int, 0, bool)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` + defv!(int, 0)(); + ^ +fail_compilation/constraints_defs.d(68): Error: template instance `imports.constraints.defv!(int, 0, bool)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` with `T = int, i = 0, Ts = (bool)` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_defs.d(55): Error: template instance `imports.constraints.defv!(int, 0, bool, float)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` + defv!(int, 0, bool)(); + ^ +fail_compilation/constraints_defs.d(69): Error: template instance `imports.constraints.defv!(int, 0, bool, float)` does not match template declaration `defv(T = bool, int i = 5, Ts...)()` with `T = int, i = 0, Ts = (bool, float)` must satisfy the following constraint: ` N!T` + defv!(int, 0, bool, float)(); + ^ --- */ diff --git a/compiler/test/fail_compilation/constraints_func1.d b/compiler/test/fail_compilation/constraints_func1.d index d15d2817df03..20a40e483c9f 100755 --- a/compiler/test/fail_compilation/constraints_func1.d +++ b/compiler/test/fail_compilation/constraints_func1.d @@ -2,73 +2,125 @@ EXTRA_FILES: imports/constraints.d TEST_OUTPUT: --- -fail_compilation/constraints_func1.d(79): Error: template `test1` is not callable using argument types `!()(int)` +fail_compilation/constraints_func1.d(131): Error: template `test1` is not callable using argument types `!()(int)` + test1(0); + ^ fail_compilation/imports/constraints.d(9): Candidate is: `test1(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_func1.d(80): Error: template `test2` is not callable using argument types `!()(int)` +void test1(T)(T v) if (N!T); + ^ +fail_compilation/constraints_func1.d(132): Error: template `test2` is not callable using argument types `!()(int)` + test2(0); + ^ fail_compilation/imports/constraints.d(10): Candidate is: `test2(T)(T v)` with `T = int` must satisfy the following constraint: ` !P!T` -fail_compilation/constraints_func1.d(81): Error: template `test3` is not callable using argument types `!()(int)` +void test2(T)(T v) if (!P!T); + ^ +fail_compilation/constraints_func1.d(133): Error: template `test3` is not callable using argument types `!()(int)` + test3(0); + ^ fail_compilation/imports/constraints.d(11): Candidate is: `test3(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_func1.d(82): Error: template `test4` is not callable using argument types `!()(int)` +void test3(T)(T v) if (P!T && N!T); + ^ +fail_compilation/constraints_func1.d(134): Error: template `test4` is not callable using argument types `!()(int)` + test4(0); + ^ fail_compilation/imports/constraints.d(12): Candidate is: `test4(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_func1.d(83): Error: template `test5` is not callable using argument types `!()(int)` +void test4(T)(T v) if (P!T && N!T && P!T); + ^ +fail_compilation/constraints_func1.d(135): Error: template `test5` is not callable using argument types `!()(int)` + test5(0); + ^ fail_compilation/imports/constraints.d(13): Candidate is: `test5(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T N!T` -fail_compilation/constraints_func1.d(84): Error: template `test6` is not callable using argument types `!()(int)` +void test5(T)(T v) if (N!T || N!T); + ^ +fail_compilation/constraints_func1.d(136): Error: template `test6` is not callable using argument types `!()(int)` + test6(0); + ^ fail_compilation/imports/constraints.d(14): Candidate is: `test6(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T N!T !P!T` -fail_compilation/constraints_func1.d(85): Error: template `test7` is not callable using argument types `!()(int)` +void test6(T)(T v) if (N!T || N!T || !P!T); + ^ +fail_compilation/constraints_func1.d(137): Error: template `test7` is not callable using argument types `!()(int)` + test7(0); + ^ fail_compilation/imports/constraints.d(15): Candidate is: `test7(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T N!T` -fail_compilation/constraints_func1.d(86): Error: template `test8` is not callable using argument types `!()(int)` +void test7(T)(T v) if (N!T || P!T && N!T); + ^ +fail_compilation/constraints_func1.d(138): Error: template `test8` is not callable using argument types `!()(int)` + test8(0); + ^ fail_compilation/imports/constraints.d(16): Candidate is: `test8(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_func1.d(87): Error: template `test9` is not callable using argument types `!()(int)` +void test8(T)(T v) if ((N!T || P!T) && N!T); + ^ +fail_compilation/constraints_func1.d(139): Error: template `test9` is not callable using argument types `!()(int)` + test9(0); + ^ fail_compilation/imports/constraints.d(17): Candidate is: `test9(T)(T v)` with `T = int` must satisfy the following constraint: ` !P!T` -fail_compilation/constraints_func1.d(88): Error: template `test10` is not callable using argument types `!()(int)` +void test9(T)(T v) if (!P!T && !N!T); + ^ +fail_compilation/constraints_func1.d(140): Error: template `test10` is not callable using argument types `!()(int)` + test10(0); + ^ fail_compilation/imports/constraints.d(18): Candidate is: `test10(T)(T v)` with `T = int` must satisfy the following constraint: ` !P!T` -fail_compilation/constraints_func1.d(89): Error: template `test11` is not callable using argument types `!()(int)` +void test10(T)(T v) if (!N!T && !P!T); + ^ +fail_compilation/constraints_func1.d(141): Error: template `test11` is not callable using argument types `!()(int)` + test11(0); + ^ fail_compilation/imports/constraints.d(19): Candidate is: `test11(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T !P!T` -fail_compilation/constraints_func1.d(90): Error: template `test12` is not callable using argument types `!()(int)` +void test11(T)(T v) if (!(!N!T && P!T)); + ^ +fail_compilation/constraints_func1.d(142): Error: template `test12` is not callable using argument types `!()(int)` + test12(0); + ^ fail_compilation/imports/constraints.d(20): Candidate is: `test12(T)(T v)` with `T = int` must satisfy the following constraint: ` !P!T` -fail_compilation/constraints_func1.d(92): Error: template `test1` is not callable using argument types `!()(int, int)` +void test12(T)(T v) if (!(N!T || P!T)); + ^ +fail_compilation/constraints_func1.d(144): Error: template `test1` is not callable using argument types `!()(int, int)` + test1(0, 0); + ^ fail_compilation/imports/constraints.d(9): Candidate is: `test1(T)(T v)` +void test1(T)(T v) if (N!T); + ^ --- */ diff --git a/compiler/test/fail_compilation/constraints_func2.d b/compiler/test/fail_compilation/constraints_func2.d index 36fa55423d57..610840b81b3e 100755 --- a/compiler/test/fail_compilation/constraints_func2.d +++ b/compiler/test/fail_compilation/constraints_func2.d @@ -2,88 +2,144 @@ EXTRA_FILES: imports/constraints.d TEST_OUTPUT: --- -fail_compilation/constraints_func2.d(94): Error: template `test13` is not callable using argument types `!()(int)` +fail_compilation/constraints_func2.d(150): Error: template `test13` is not callable using argument types `!()(int)` + test13(0); + ^ fail_compilation/imports/constraints.d(23): Candidate is: `test13(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T !P!T` -fail_compilation/constraints_func2.d(95): Error: template `test14` is not callable using argument types `!()(int)` +void test13(T)(T v) if (P!T ? N!T : P!T); // P!T && N!T || !P!T && P!T + ^ +fail_compilation/constraints_func2.d(151): Error: template `test14` is not callable using argument types `!()(int)` + test14(0); + ^ fail_compilation/imports/constraints.d(24): Candidate is: `test14(T)(T v)` with `T = int` must satisfy one of the following constraints: ` !P!T N!T` -fail_compilation/constraints_func2.d(96): Error: template `test15` is not callable using argument types `!()(int)` +void test14(T)(T v) if (!P!T ? P!T : N!T); + ^ +fail_compilation/constraints_func2.d(152): Error: template `test15` is not callable using argument types `!()(int)` + test15(0); + ^ fail_compilation/imports/constraints.d(25): Candidate is: `test15(T)(T v)` with `T = int` must satisfy one of the following constraints: ` !P!T !P!T` -fail_compilation/constraints_func2.d(97): Error: template `test16` is not callable using argument types `!()(int)` +void test15(T)(T v) if (!(P!T ? P!T : N!T)); // (!P!T || !P!T) && (P!T || !N!T) + ^ +fail_compilation/constraints_func2.d(153): Error: template `test16` is not callable using argument types `!()(int)` + test16(0); + ^ fail_compilation/imports/constraints.d(26): Candidate is: `test16(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T N!T` -fail_compilation/constraints_func2.d(98): Error: template `test17` is not callable using argument types `!()(int)` +void test16(T)(T v) if (N!T && P!T || N!T); + ^ +fail_compilation/constraints_func2.d(154): Error: template `test17` is not callable using argument types `!()(int)` + test17(0); + ^ fail_compilation/imports/constraints.d(27): Candidate is: `test17(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_func2.d(99): Error: template `test18` is not callable using argument types `!()(int)` +void test17(T)(T v) if (N!T && P!T && (P!T || P!T)); + ^ +fail_compilation/constraints_func2.d(155): Error: template `test18` is not callable using argument types `!()(int)` + test18(0); + ^ fail_compilation/imports/constraints.d(28): Candidate is: `test18(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T N!T` -fail_compilation/constraints_func2.d(100): Error: template `test19` is not callable using argument types `!()(int)` +void test18(T)(T v) if ((N!T || P!T && N!T) && P!T); + ^ +fail_compilation/constraints_func2.d(156): Error: template `test19` is not callable using argument types `!()(int)` + test19(0); + ^ fail_compilation/imports/constraints.d(29): Candidate is: `test19(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T !P!T N!T` -fail_compilation/constraints_func2.d(101): Error: template `test20` is not callable using argument types `!()(int)` +void test19(T)(T v) if ((N!T ? P!T : !P!T) ? P!T : N!T); // (N!T && P!T || !N!T && !P!T) && P!T || (!N!T || !P!T) && (N!T || P!T) && N!T + ^ +fail_compilation/constraints_func2.d(157): Error: template `test20` is not callable using argument types `!()(int)` + test20(0); + ^ fail_compilation/imports/constraints.d(30): Candidate is: `test20(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_func2.d(102): Error: template `test21` is not callable using argument types `!()(int)` +void test20(T)(T v) if (N!T && (P!T && N!T || N!T)); + ^ +fail_compilation/constraints_func2.d(158): Error: template `test21` is not callable using argument types `!()(int)` + test21(0); + ^ fail_compilation/imports/constraints.d(31): Candidate is: `test21(T)(T v)` with `T = int` must satisfy one of the following constraints: ` N!T N!T` -fail_compilation/constraints_func2.d(103): Error: template `test22` is not callable using argument types `!()(int)` +void test21(T)(T v) if (P!T && (N!T && P!T || N!T)); + ^ +fail_compilation/constraints_func2.d(159): Error: template `test22` is not callable using argument types `!()(int)` + test22(0); + ^ fail_compilation/imports/constraints.d(32): Candidate is: `test22(T)(T v)` with `T = int` must satisfy one of the following constraints: ` !P!T !P!T` -fail_compilation/constraints_func2.d(104): Error: template `test23` is not callable using argument types `!()(int)` +void test22(T)(T v) if ((!P!T || !P!T && P!T) && (N!T || !P!T)); + ^ +fail_compilation/constraints_func2.d(160): Error: template `test23` is not callable using argument types `!()(int)` + test23(0); + ^ fail_compilation/imports/constraints.d(33): Candidate is: `test23(T)(T v)` with `T = int` must satisfy one of the following constraints: ` !P!T N!T !P!T` -fail_compilation/constraints_func2.d(105): Error: template `test24` is not callable using argument types `!()(int)` +void test23(T)(T v) if (!P!T || P!T && N!T || !P!T); + ^ +fail_compilation/constraints_func2.d(161): Error: template `test24` is not callable using argument types `!()(int)` + test24(0); + ^ fail_compilation/imports/constraints.d(34): Candidate is: `test24(R)(R r)` with `R = int` must satisfy the following constraint: ` __traits(hasMember, R, "stuff")` -fail_compilation/constraints_func2.d(106): Error: template `test25` is not callable using argument types `!()(int)` +void test24(R)(R r) if (__traits(hasMember, R, "stuff")); + ^ +fail_compilation/constraints_func2.d(162): Error: template `test25` is not callable using argument types `!()(int)` + test25(0); + ^ fail_compilation/imports/constraints.d(35): Candidate is: `test25(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_func2.d(107): Error: template `test26` is not callable using argument types `!(float)(int)` +int test25(T)(T v) if (N!T); + ^ +fail_compilation/constraints_func2.d(163): Error: template `test26` is not callable using argument types `!(float)(int)` + test26!float(5); + ^ fail_compilation/imports/constraints.d(36): Candidate is: `test26(T, U)(U u)` with `T = float, U = int` must satisfy the following constraint: ` N!U` +float test26(T, U)(U u) if (N!U); + ^ --- */ diff --git a/compiler/test/fail_compilation/constraints_func3.d b/compiler/test/fail_compilation/constraints_func3.d index b4bc3fe02794..361da0d30f00 100755 --- a/compiler/test/fail_compilation/constraints_func3.d +++ b/compiler/test/fail_compilation/constraints_func3.d @@ -2,47 +2,83 @@ EXTRA_FILES: imports/constraints.d TEST_OUTPUT: ---- -fail_compilation/constraints_func3.d(53): Error: none of the overloads of template `imports.constraints.overload` are callable using argument types `!()(int)` +fail_compilation/constraints_func3.d(89): Error: none of the overloads of template `imports.constraints.overload` are callable using argument types `!()(int)` + overload(0); + ^ fail_compilation/imports/constraints.d(39): Candidates are: `overload(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` +void overload(T)(T v) if (N!T); + ^ fail_compilation/imports/constraints.d(40): `overload(T)(T v)` with `T = int` must satisfy the following constraint: ` !P!T` +void overload(T)(T v) if (!P!T); + ^ fail_compilation/imports/constraints.d(41): `overload(T)(T v1, T v2)` +void overload(T)(T v1, T v2) if (N!T); + ^ fail_compilation/imports/constraints.d(42): `overload(T, V)(T v1, V v2)` -fail_compilation/constraints_func3.d(54): Error: none of the overloads of template `imports.constraints.overload` are callable using argument types `!()(int, string)` +void overload(T, V)(T v1, V v2) if (N!T || N!V); + ^ +fail_compilation/constraints_func3.d(90): Error: none of the overloads of template `imports.constraints.overload` are callable using argument types `!()(int, string)` + overload(0, ""); + ^ fail_compilation/imports/constraints.d(39): Candidates are: `overload(T)(T v)` +void overload(T)(T v) if (N!T); + ^ fail_compilation/imports/constraints.d(40): `overload(T)(T v)` +void overload(T)(T v) if (!P!T); + ^ fail_compilation/imports/constraints.d(41): `overload(T)(T v1, T v2)` +void overload(T)(T v1, T v2) if (N!T); + ^ fail_compilation/imports/constraints.d(42): `overload(T, V)(T v1, V v2)` with `T = int, V = string` must satisfy one of the following constraints: ` N!T N!V` -fail_compilation/constraints_func3.d(56): Error: template `variadic` is not callable using argument types `!()()` +void overload(T, V)(T v1, V v2) if (N!T || N!V); + ^ +fail_compilation/constraints_func3.d(92): Error: template `variadic` is not callable using argument types `!()()` + variadic(); + ^ fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)` -fail_compilation/constraints_func3.d(57): Error: template `variadic` is not callable using argument types `!()(int)` +void variadic(A, T...)(A a, T v) if (N!int); + ^ +fail_compilation/constraints_func3.d(93): Error: template `variadic` is not callable using argument types `!()(int)` + variadic(0); + ^ fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)` with `A = int, T = ()` must satisfy the following constraint: ` N!int` -fail_compilation/constraints_func3.d(58): Error: template `variadic` is not callable using argument types `!()(int, int)` +void variadic(A, T...)(A a, T v) if (N!int); + ^ +fail_compilation/constraints_func3.d(94): Error: template `variadic` is not callable using argument types `!()(int, int)` + variadic(0, 1); + ^ fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)` with `A = int, T = (int)` must satisfy the following constraint: ` N!int` -fail_compilation/constraints_func3.d(59): Error: template `variadic` is not callable using argument types `!()(int, int, int)` +void variadic(A, T...)(A a, T v) if (N!int); + ^ +fail_compilation/constraints_func3.d(95): Error: template `variadic` is not callable using argument types `!()(int, int, int)` + variadic(0, 1, 2); + ^ fail_compilation/imports/constraints.d(43): Candidate is: `variadic(A, T...)(A a, T v)` with `A = int, T = (int, int)` must satisfy the following constraint: ` N!int` +void variadic(A, T...)(A a, T v) if (N!int); + ^ ---- */ diff --git a/compiler/test/fail_compilation/constraints_tmpl.d b/compiler/test/fail_compilation/constraints_tmpl.d index 06caa52493d2..f0f67303599d 100755 --- a/compiler/test/fail_compilation/constraints_tmpl.d +++ b/compiler/test/fail_compilation/constraints_tmpl.d @@ -2,29 +2,41 @@ EXTRA_FILES: imports/constraints.d TEST_OUTPUT: --- -fail_compilation/constraints_tmpl.d(35): Error: template instance `imports.constraints.dummy!()` does not match template declaration `dummy()()` +fail_compilation/constraints_tmpl.d(47): Error: template instance `imports.constraints.dummy!()` does not match template declaration `dummy()()` must satisfy the following constraint: ` false` -fail_compilation/constraints_tmpl.d(37): Error: template instance `imports.constraints.message_nice!(int, int)` does not match template declaration `message_nice(T, U)()` + dummy!(); + ^ +fail_compilation/constraints_tmpl.d(49): Error: template instance `imports.constraints.message_nice!(int, int)` does not match template declaration `message_nice(T, U)()` with `T = int, U = int` must satisfy the following constraint: ` N!U` -fail_compilation/constraints_tmpl.d(38): Error: template instance `imports.constraints.message_ugly!int` does not match template declaration `message_ugly(T)(T v)` + message_nice!(int, int); + ^ +fail_compilation/constraints_tmpl.d(50): Error: template instance `imports.constraints.message_ugly!int` does not match template declaration `message_ugly(T)(T v)` with `T = int` must satisfy the following constraint: ` N!T` -fail_compilation/constraints_tmpl.d(40): Error: template instance `args!int` does not match template declaration `args(T, U)()` -fail_compilation/constraints_tmpl.d(41): Error: template instance `imports.constraints.args!(int, float)` does not match template declaration `args(T, U)()` + message_ugly!int; + ^ +fail_compilation/constraints_tmpl.d(52): Error: template instance `args!int` does not match template declaration `args(T, U)()` + args!int; + ^ +fail_compilation/constraints_tmpl.d(53): Error: template instance `imports.constraints.args!(int, float)` does not match template declaration `args(T, U)()` with `T = int, U = float` must satisfy one of the following constraints: ` N!T N!U` -fail_compilation/constraints_tmpl.d(43): Error: template instance `constraints_tmpl.main.lambda!((a) => a)` does not match template declaration `lambda(alias pred)()` + args!(int, float); + ^ +fail_compilation/constraints_tmpl.d(55): Error: template instance `constraints_tmpl.main.lambda!((a) => a)` does not match template declaration `lambda(alias pred)()` with `pred = __lambda1` must satisfy the following constraint: ` N!int` + lambda!(a => a)(); + ^ --- */ diff --git a/compiler/test/fail_compilation/covariant_override.d b/compiler/test/fail_compilation/covariant_override.d index 7738770775d4..8654fca0858e 100644 --- a/compiler/test/fail_compilation/covariant_override.d +++ b/compiler/test/fail_compilation/covariant_override.d @@ -3,9 +3,15 @@ https://issues.dlang.org/show_bug.cgi?id=21538 TEST_OUTPUT: --- -fail_compilation/covariant_override.d(23): Error: function `@safe void covariant_override.CI.f(void delegate() @safe dg)` does not override any function, did you mean to override `@safe void covariant_override.I.f(void delegate() @system dg)`? -fail_compilation/covariant_override.d(34): Error: function `@safe void covariant_override.CA.f(void delegate() @safe dg)` does not override any function, did you mean to override `@safe void covariant_override.A.f(void delegate() @system dg)`? -fail_compilation/covariant_override.d(20): Error: class `covariant_override.CI` interface function `void f(void delegate() @system dg) @safe` is not implemented +fail_compilation/covariant_override.d(29): Error: function `@safe void covariant_override.CI.f(void delegate() @safe dg)` does not override any function, did you mean to override `@safe void covariant_override.I.f(void delegate() @system dg)`? + override void f(void delegate() @safe dg) @safe { } + ^ +fail_compilation/covariant_override.d(40): Error: function `@safe void covariant_override.CA.f(void delegate() @safe dg)` does not override any function, did you mean to override `@safe void covariant_override.A.f(void delegate() @system dg)`? + override void f(void delegate() @safe dg) @safe { } + ^ +fail_compilation/covariant_override.d(26): Error: class `covariant_override.CI` interface function `void f(void delegate() @system dg) @safe` is not implemented +class CI : I +^ --- ++/ diff --git a/compiler/test/fail_compilation/cpp_cast.d b/compiler/test/fail_compilation/cpp_cast.d index 3802ebd5e92f..f387a3399623 100644 --- a/compiler/test/fail_compilation/cpp_cast.d +++ b/compiler/test/fail_compilation/cpp_cast.d @@ -3,10 +3,14 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/cpp_cast.d(19): Error: cast from `cpp_cast.I` to `cpp_cast.C` not allowed in safe code -fail_compilation/cpp_cast.d(19): No dynamic type information for extern(C++) classes -fail_compilation/cpp_cast.d(21): Deprecation: cast from `cpp_cast.C` to `cpp_cast.D` not allowed in safe code -fail_compilation/cpp_cast.d(21): No dynamic type information for extern(C++) classes +fail_compilation/cpp_cast.d(23): Error: cast from `cpp_cast.I` to `cpp_cast.C` not allowed in safe code + C c = cast(C) i; // unsafe + ^ +fail_compilation/cpp_cast.d(23): No dynamic type information for extern(C++) classes +fail_compilation/cpp_cast.d(25): Deprecation: cast from `cpp_cast.C` to `cpp_cast.D` not allowed in safe code + c = cast(D) c; // reinterpret cast + ^ +fail_compilation/cpp_cast.d(25): No dynamic type information for extern(C++) classes --- */ extern(C++) interface I { void f(); } diff --git a/compiler/test/fail_compilation/cppeh1.d b/compiler/test/fail_compilation/cppeh1.d index 9ef0ab3c79b6..bb2f0da21ab7 100644 --- a/compiler/test/fail_compilation/cppeh1.d +++ b/compiler/test/fail_compilation/cppeh1.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/cppeh1.d(26): Error: cannot catch C++ class objects in `@safe` code +fail_compilation/cppeh1.d(28): Error: cannot catch C++ class objects in `@safe` code + catch (std.exception e) + ^ --- */ diff --git a/compiler/test/fail_compilation/cppeh2.d b/compiler/test/fail_compilation/cppeh2.d index 1d3ddc67e7f9..8ed8f6f37de0 100644 --- a/compiler/test/fail_compilation/cppeh2.d +++ b/compiler/test/fail_compilation/cppeh2.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/cppeh2.d(21): Error: cannot mix catching D and C++ exceptions in the same try-catch +fail_compilation/cppeh2.d(23): Error: cannot mix catching D and C++ exceptions in the same try-catch + try + ^ --- */ diff --git a/compiler/test/fail_compilation/cppmangle.d b/compiler/test/fail_compilation/cppmangle.d index b3c89b46d2ac..d0870b74fd44 100644 --- a/compiler/test/fail_compilation/cppmangle.d +++ b/compiler/test/fail_compilation/cppmangle.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/cppmangle.d(11): Error: expected valid identifier for C++ namespace but got `` -fail_compilation/cppmangle.d(15): Error: expected valid identifier for C++ namespace but got `0num` -fail_compilation/cppmangle.d(19): Error: compile time string constant (or sequence) expected, not `2` -fail_compilation/cppmangle.d(23): Error: expected valid identifier for C++ namespace but got `invalid@namespace` +fail_compilation/cppmangle.d(19): Error: expected valid identifier for C++ namespace but got `` +extern(C++, "") + ^ +fail_compilation/cppmangle.d(23): Error: expected valid identifier for C++ namespace but got `0num` +extern(C++, "0num") + ^ +fail_compilation/cppmangle.d(27): Error: compile time string constant (or sequence) expected, not `2` +extern(C++, 1+1) + ^ +fail_compilation/cppmangle.d(31): Error: expected valid identifier for C++ namespace but got `invalid@namespace` +extern(C++, "invalid@namespace") + ^ --- */ diff --git a/compiler/test/fail_compilation/cppmangle2.d b/compiler/test/fail_compilation/cppmangle2.d index 67f0647c8a8b..8052b4762597 100644 --- a/compiler/test/fail_compilation/cppmangle2.d +++ b/compiler/test/fail_compilation/cppmangle2.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/cppmangle2.d(9): Error: namespace `cppmangle2.ns` conflicts with variable `cppmangle2.ns` at fail_compilation/cppmangle2.d(8) +fail_compilation/cppmangle2.d(11): Error: namespace `cppmangle2.ns` conflicts with variable `cppmangle2.ns` at fail_compilation/cppmangle2.d(10) +extern(C++, ns) +^ --- */ diff --git a/compiler/test/fail_compilation/cppvar.d b/compiler/test/fail_compilation/cppvar.d index 885a55547c9b..7d2237c874e2 100644 --- a/compiler/test/fail_compilation/cppvar.d +++ b/compiler/test/fail_compilation/cppvar.d @@ -1,22 +1,32 @@ /* TEST_OUTPUT: --- -fail_compilation/cppvar.d(10): Error: variable `cppvar.funcLiteral` cannot have `extern(C++)` linkage because it is `static` -fail_compilation/cppvar.d(10): perhaps declare it as `__gshared` instead -fail_compilation/cppvar.d(20): Error: variable `cppvar.threadLocalVar` cannot have `extern(C++)` linkage because it is `static` -fail_compilation/cppvar.d(20): perhaps declare it as `__gshared` instead -fail_compilation/cppvar.d(21): Error: variable `cppvar.staticVar` cannot have `extern(C++)` linkage because it is `static` -fail_compilation/cppvar.d(21): perhaps declare it as `__gshared` instead -fail_compilation/cppvar.d(22): Error: variable `cppvar.sharedVar` cannot have `extern(C++)` linkage because it is `shared` -fail_compilation/cppvar.d(22): perhaps declare it as `__gshared` instead -fail_compilation/cppvar.d(30): Error: delegate `cppvar.__lambda7` cannot return type `bool[3]` because its linkage is `extern(C++)` +fail_compilation/cppvar.d(26): Error: variable `cppvar.funcLiteral` cannot have `extern(C++)` linkage because it is `static` +extern(C++) bool[3] funcLiteral = () { bool[3] a; return a; }; + ^ +fail_compilation/cppvar.d(26): perhaps declare it as `__gshared` instead +fail_compilation/cppvar.d(28): Error: variable `cppvar.threadLocalVar` cannot have `extern(C++)` linkage because it is `static` +extern(C++) int threadLocalVar; + ^ +fail_compilation/cppvar.d(28): perhaps declare it as `__gshared` instead +fail_compilation/cppvar.d(29): Error: variable `cppvar.staticVar` cannot have `extern(C++)` linkage because it is `static` +extern(C++) static int staticVar; + ^ +fail_compilation/cppvar.d(29): perhaps declare it as `__gshared` instead +fail_compilation/cppvar.d(30): Error: variable `cppvar.sharedVar` cannot have `extern(C++)` linkage because it is `shared` +extern(C++) shared int sharedVar; + ^ +fail_compilation/cppvar.d(30): perhaps declare it as `__gshared` instead +fail_compilation/cppvar.d(32): Error: delegate `cppvar.__lambda7` cannot return type `bool[3]` because its linkage is `extern(C++)` +extern(C++) __gshared bool[3] gfuncLiteral = () { bool[3] a; return a; }; + ^ --- */ -#line 10 +// Line 10 starts here extern(C++) bool[3] funcLiteral = () { bool[3] a; return a; }; -#line 20 +// Line 20 starts here extern(C++) int threadLocalVar; extern(C++) static int staticVar; extern(C++) shared int sharedVar; -#line 30 +// Line 30 starts here extern(C++) __gshared bool[3] gfuncLiteral = () { bool[3] a; return a; }; diff --git a/compiler/test/fail_compilation/ctfe10995.d b/compiler/test/fail_compilation/ctfe10995.d index 829fb5328dbf..056d90031a64 100644 --- a/compiler/test/fail_compilation/ctfe10995.d +++ b/compiler/test/fail_compilation/ctfe10995.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ctfe10995.d(19): Error: cannot read uninitialized variable `a` in CTFE -fail_compilation/ctfe10995.d(25): Error: cannot read uninitialized variable `a` in CTFE +fail_compilation/ctfe10995.d(23): Error: cannot read uninitialized variable `a` in CTFE +enum i = foo().a; + ^ +fail_compilation/ctfe10995.d(29): Error: cannot read uninitialized variable `a` in CTFE +enum i2 = T2.init.a; + ^ --- */ struct T diff --git a/compiler/test/fail_compilation/ctfe13612.d b/compiler/test/fail_compilation/ctfe13612.d index 150f2ac5d913..4f9740e92bba 100644 --- a/compiler/test/fail_compilation/ctfe13612.d +++ b/compiler/test/fail_compilation/ctfe13612.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/ctfe13612.d(15): Error: function `ctfe13612.S.recurse` CTFE recursion limit exceeded -fail_compilation/ctfe13612.d(20): called from here: `s.recurse()` -fail_compilation/ctfe13612.d(15): 1000 recursive calls to function `recurse` -fail_compilation/ctfe13612.d(23): called from here: `(new S).recurse()` -fail_compilation/ctfe13612.d(23): while evaluating: `static assert((new S).recurse())` +fail_compilation/ctfe13612.d(25): Error: function `ctfe13612.S.recurse` CTFE recursion limit exceeded + int recurse() + ^ +fail_compilation/ctfe13612.d(30): called from here: `s.recurse()` + return s.recurse(); + ^ +fail_compilation/ctfe13612.d(25): 1000 recursive calls to function `recurse` + int recurse() + ^ +fail_compilation/ctfe13612.d(33): called from here: `(new S).recurse()` +static assert(new S().recurse()); + ^ +fail_compilation/ctfe13612.d(33): while evaluating: `static assert((new S).recurse())` +static assert(new S().recurse()); +^ --- */ diff --git a/compiler/test/fail_compilation/ctfe14207.d b/compiler/test/fail_compilation/ctfe14207.d index becc068b0c67..cb9f1d15c0b4 100644 --- a/compiler/test/fail_compilation/ctfe14207.d +++ b/compiler/test/fail_compilation/ctfe14207.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ctfe14207.d(13): Error: cannot convert `&immutable(ulong)` to `ubyte[8]*` at compile time -fail_compilation/ctfe14207.d(18): called from here: `nativeToBigEndian()` -fail_compilation/ctfe14207.d(22): called from here: `digest()` +fail_compilation/ctfe14207.d(19): Error: cannot convert `&immutable(ulong)` to `ubyte[8]*` at compile time + return *cast(ubyte[8]*) &res; + ^ +fail_compilation/ctfe14207.d(24): called from here: `nativeToBigEndian()` + ubyte[8] bits = nativeToBigEndian(); + ^ +fail_compilation/ctfe14207.d(28): called from here: `digest()` +enum h = digest(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ctfe14465.d b/compiler/test/fail_compilation/ctfe14465.d index c0d564b492d0..8df0c79f31b6 100644 --- a/compiler/test/fail_compilation/ctfe14465.d +++ b/compiler/test/fail_compilation/ctfe14465.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ctfe14465.d(19): Error: uncaught CTFE exception `ctfe14465.E("message")` -fail_compilation/ctfe14465.d(22): called from here: `foo()` -fail_compilation/ctfe14465.d(22): while evaluating: `static assert(foo())` +fail_compilation/ctfe14465.d(25): Error: uncaught CTFE exception `ctfe14465.E("message")` + throw new E("message"); + ^ +fail_compilation/ctfe14465.d(28): called from here: `foo()` +static assert(foo()); + ^ +fail_compilation/ctfe14465.d(28): while evaluating: `static assert(foo())` +static assert(foo()); +^ --- */ class E : Exception diff --git a/compiler/test/fail_compilation/ctfe14731.d b/compiler/test/fail_compilation/ctfe14731.d index 0f12d99f8cde..90227620888d 100644 --- a/compiler/test/fail_compilation/ctfe14731.d +++ b/compiler/test/fail_compilation/ctfe14731.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ctfe14731.d(16): Error: cannot implicitly convert expression `split("a b")` of type `string[]` to `string` -fail_compilation/ctfe14731.d(17): Error: cannot implicitly convert expression `split("a b")` of type `string[]` to `string` +fail_compilation/ctfe14731.d(20): Error: cannot implicitly convert expression `split("a b")` of type `string[]` to `string` + enum string list1 = "a b".split(); + ^ +fail_compilation/ctfe14731.d(21): Error: cannot implicitly convert expression `split("a b")` of type `string[]` to `string` + string list2 = "a b".split(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ctor_attr.d b/compiler/test/fail_compilation/ctor_attr.d index 337ded09fd20..0513f449d385 100644 --- a/compiler/test/fail_compilation/ctor_attr.d +++ b/compiler/test/fail_compilation/ctor_attr.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/ctor_attr.d(26): Error: none of the overloads of `this` can construct a mutable object with argument types `(int)` -fail_compilation/ctor_attr.d(16): Candidates are: `ctor_attr.S.this(int x) const` -fail_compilation/ctor_attr.d(18): `ctor_attr.S.this(string x)` -fail_compilation/ctor_attr.d(17): `this()(int x) shared` -fail_compilation/ctor_attr.d(28): Error: none of the overloads of `foo` are callable using a mutable object with argument types `(int)` -fail_compilation/ctor_attr.d(20): Candidates are: `ctor_attr.S.foo(int x) immutable` -fail_compilation/ctor_attr.d(21): `ctor_attr.S.foo(string x)` +fail_compilation/ctor_attr.d(40): Error: none of the overloads of `this` can construct a mutable object with argument types `(int)` + auto s = S(1); + ^ +fail_compilation/ctor_attr.d(30): Candidates are: `ctor_attr.S.this(int x) const` + this(int x) const {} + ^ +fail_compilation/ctor_attr.d(32): `ctor_attr.S.this(string x)` + this(string x) {} + ^ +fail_compilation/ctor_attr.d(31): `this()(int x) shared` + this()(int x) shared {} + ^ +fail_compilation/ctor_attr.d(42): Error: none of the overloads of `foo` are callable using a mutable object with argument types `(int)` + t.foo(1); + ^ +fail_compilation/ctor_attr.d(34): Candidates are: `ctor_attr.S.foo(int x) immutable` + void foo(int x) immutable {} + ^ +fail_compilation/ctor_attr.d(35): `ctor_attr.S.foo(string x)` + void foo(string x) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ctypes.d b/compiler/test/fail_compilation/ctypes.d index 9f5ff18f7515..7e031aac47f8 100644 --- a/compiler/test/fail_compilation/ctypes.d +++ b/compiler/test/fail_compilation/ctypes.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ctypes.d(11): Error: use `real` instead of `long double` -fail_compilation/ctypes.d(12): Error: use `long` for a 64 bit integer instead of `long long` +fail_compilation/ctypes.d(15): Error: use `real` instead of `long double` + long double r; + ^ +fail_compilation/ctypes.d(16): Error: use `long` for a 64 bit integer instead of `long long` + long long ll; + ^ --- */ diff --git a/compiler/test/fail_compilation/cwords.d b/compiler/test/fail_compilation/cwords.d index bd2f944080a4..7f425f2a1810 100644 --- a/compiler/test/fail_compilation/cwords.d +++ b/compiler/test/fail_compilation/cwords.d @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/cwords.d(13): Error: undefined identifier `FALSE`, did you mean `false`? -fail_compilation/cwords.d(14): Error: undefined identifier `TRUE`, did you mean `true`? -fail_compilation/cwords.d(15): Error: undefined identifier `NULL`, did you mean `null`? -fail_compilation/cwords.d(16): Error: undefined identifier `unsigned`, did you mean `uint`? +fail_compilation/cwords.d(21): Error: undefined identifier `FALSE`, did you mean `false`? + bool a = FALSE; + ^ +fail_compilation/cwords.d(22): Error: undefined identifier `TRUE`, did you mean `true`? + bool b = TRUE; + ^ +fail_compilation/cwords.d(23): Error: undefined identifier `NULL`, did you mean `null`? + int* p = NULL; + ^ +fail_compilation/cwords.d(24): Error: undefined identifier `unsigned`, did you mean `uint`? + unsigned u; + ^ --- */ diff --git a/compiler/test/fail_compilation/ddoc_18083.d b/compiler/test/fail_compilation/ddoc_18083.d index 234c280e4248..b558f8f9f30f 100644 --- a/compiler/test/fail_compilation/ddoc_18083.d +++ b/compiler/test/fail_compilation/ddoc_18083.d @@ -1,8 +1,12 @@ // REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/fail_compilation -o- -w -c /* TEST_OUTPUT: --- -fail_compilation/ddoc_18083.d(14): Warning: Ddoc: function declaration has no parameter 'this' -fail_compilation/ddoc_18083.d(14): Warning: Ddoc: parameter count mismatch, expected 0, got 1 +fail_compilation/ddoc_18083.d(18): Warning: Ddoc: function declaration has no parameter 'this' +int foo() + ^ +fail_compilation/ddoc_18083.d(18): Warning: Ddoc: parameter count mismatch, expected 0, got 1 +int foo() + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/debugCaseDeclaration.d b/compiler/test/fail_compilation/debugCaseDeclaration.d index 0a06bca93a0b..0b2ee3a08e79 100644 --- a/compiler/test/fail_compilation/debugCaseDeclaration.d +++ b/compiler/test/fail_compilation/debugCaseDeclaration.d @@ -4,8 +4,12 @@ https://issues.dlang.org/show_bug.cgi?id=21739 REQUIRED_ARGS: -debug TEST_OUTPUT: --- -fail_compilation/debugCaseDeclaration.d(22): Error: undefined identifier `x` -fail_compilation/debugCaseDeclaration.d(33): Error: undefined identifier `y` +fail_compilation/debugCaseDeclaration.d(26): Error: undefined identifier `x` + x = 1; + ^ +fail_compilation/debugCaseDeclaration.d(37): Error: undefined identifier `y` + y = 1; // Invalid but accepted + ^ --- */ diff --git a/compiler/test/fail_compilation/dep_d1_ops.d b/compiler/test/fail_compilation/dep_d1_ops.d index 19c64752aaf1..b846927a10b2 100644 --- a/compiler/test/fail_compilation/dep_d1_ops.d +++ b/compiler/test/fail_compilation/dep_d1_ops.d @@ -2,51 +2,133 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/dep_d1_ops.d(105): Error: `opAdd` is obsolete. Use `opBinary(string op)(...) if (op == "+")` instead. -fail_compilation/dep_d1_ops.d(106): Error: `opAdd_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "+")` instead. -fail_compilation/dep_d1_ops.d(107): Error: `opSub` is obsolete. Use `opBinary(string op)(...) if (op == "-")` instead. -fail_compilation/dep_d1_ops.d(108): Error: `opSub_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "-")` instead. -fail_compilation/dep_d1_ops.d(109): Error: `opMul` is obsolete. Use `opBinary(string op)(...) if (op == "*")` instead. -fail_compilation/dep_d1_ops.d(110): Error: `opMul_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "*")` instead. -fail_compilation/dep_d1_ops.d(111): Error: `opDiv` is obsolete. Use `opBinary(string op)(...) if (op == "/")` instead. -fail_compilation/dep_d1_ops.d(112): Error: `opDiv_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "/")` instead. -fail_compilation/dep_d1_ops.d(113): Error: `opMod` is obsolete. Use `opBinary(string op)(...) if (op == "%")` instead. -fail_compilation/dep_d1_ops.d(114): Error: `opMod_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "%")` instead. -fail_compilation/dep_d1_ops.d(116): Error: `opAnd` is obsolete. Use `opBinary(string op)(...) if (op == "&")` instead. -fail_compilation/dep_d1_ops.d(117): Error: `opOr` is obsolete. Use `opBinary(string op)(...) if (op == "|")` instead. -fail_compilation/dep_d1_ops.d(118): Error: `opXor` is obsolete. Use `opBinary(string op)(...) if (op == "^")` instead. -fail_compilation/dep_d1_ops.d(120): Error: `opShl` is obsolete. Use `opBinary(string op)(...) if (op == "<<")` instead. -fail_compilation/dep_d1_ops.d(121): Error: `opShl_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "<<")` instead. -fail_compilation/dep_d1_ops.d(122): Error: `opShr` is obsolete. Use `opBinary(string op)(...) if (op == ">>")` instead. -fail_compilation/dep_d1_ops.d(123): Error: `opShr_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == ">>")` instead. -fail_compilation/dep_d1_ops.d(124): Error: `opUShr` is obsolete. Use `opBinary(string op)(...) if (op == ">>>")` instead. -fail_compilation/dep_d1_ops.d(125): Error: `opUShr_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == ">>>")` instead. -fail_compilation/dep_d1_ops.d(127): Error: `opCat` is obsolete. Use `opBinary(string op)(...) if (op == "~")` instead. -fail_compilation/dep_d1_ops.d(128): Error: `opCat_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "~")` instead. -fail_compilation/dep_d1_ops.d(130): Error: `opNeg` is obsolete. Use `opUnary(string op)() if (op == "-")` instead. -fail_compilation/dep_d1_ops.d(131): Error: `opCom` is obsolete. Use `opUnary(string op)() if (op == "~")` instead. -fail_compilation/dep_d1_ops.d(132): Error: `opPostInc` is obsolete. Use `opUnary(string op)() if (op == "++")` instead. -fail_compilation/dep_d1_ops.d(133): Error: `opPostDec` is obsolete. Use `opUnary(string op)() if (op == "--")` instead. -fail_compilation/dep_d1_ops.d(134): Error: `opStar` is obsolete. Use `opUnary(string op)() if (op == "*")` instead. -fail_compilation/dep_d1_ops.d(136): Error: `opIn` is obsolete. Use `opBinary(string op)(...) if (op == "in")` instead. -fail_compilation/dep_d1_ops.d(137): Error: `opIn_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "in")` instead. -fail_compilation/dep_d1_ops.d(139): Error: `opAddAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "+")` instead. -fail_compilation/dep_d1_ops.d(140): Error: `opSubAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "-")` instead. -fail_compilation/dep_d1_ops.d(141): Error: `opMulAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "*")` instead. -fail_compilation/dep_d1_ops.d(142): Error: `opDivAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "/")` instead. -fail_compilation/dep_d1_ops.d(143): Error: `opModAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "%")` instead. -fail_compilation/dep_d1_ops.d(144): Error: `opAndAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "&")` instead. -fail_compilation/dep_d1_ops.d(145): Error: `opOrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "|")` instead. -fail_compilation/dep_d1_ops.d(146): Error: `opXorAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "^")` instead. -fail_compilation/dep_d1_ops.d(147): Error: `opShlAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "<<")` instead. -fail_compilation/dep_d1_ops.d(148): Error: `opShrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == ">>")` instead. -fail_compilation/dep_d1_ops.d(149): Error: `opUShrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == ">>>")` instead. -fail_compilation/dep_d1_ops.d(150): Error: `opCatAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "~")` instead. -fail_compilation/dep_d1_ops.d(158): Error: `opCom` is obsolete. Use `opUnary(string op)() if (op == "~")` instead. +fail_compilation/dep_d1_ops.d(187): Error: `opAdd` is obsolete. Use `opBinary(string op)(...) if (op == "+")` instead. + i = s + 1; + ^ +fail_compilation/dep_d1_ops.d(188): Error: `opAdd_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "+")` instead. + i = 1 + s; + ^ +fail_compilation/dep_d1_ops.d(189): Error: `opSub` is obsolete. Use `opBinary(string op)(...) if (op == "-")` instead. + i = s - 1; + ^ +fail_compilation/dep_d1_ops.d(190): Error: `opSub_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "-")` instead. + i = 1 - s; + ^ +fail_compilation/dep_d1_ops.d(191): Error: `opMul` is obsolete. Use `opBinary(string op)(...) if (op == "*")` instead. + i = s * 1; + ^ +fail_compilation/dep_d1_ops.d(192): Error: `opMul_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "*")` instead. + i = 1 * s; + ^ +fail_compilation/dep_d1_ops.d(193): Error: `opDiv` is obsolete. Use `opBinary(string op)(...) if (op == "/")` instead. + i = s / 1; + ^ +fail_compilation/dep_d1_ops.d(194): Error: `opDiv_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "/")` instead. + i = 1 / s; + ^ +fail_compilation/dep_d1_ops.d(195): Error: `opMod` is obsolete. Use `opBinary(string op)(...) if (op == "%")` instead. + i = s % 1; + ^ +fail_compilation/dep_d1_ops.d(196): Error: `opMod_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "%")` instead. + i = 1 % s; + ^ +fail_compilation/dep_d1_ops.d(198): Error: `opAnd` is obsolete. Use `opBinary(string op)(...) if (op == "&")` instead. + i = s & 1; + ^ +fail_compilation/dep_d1_ops.d(199): Error: `opOr` is obsolete. Use `opBinary(string op)(...) if (op == "|")` instead. + i = s | 1; + ^ +fail_compilation/dep_d1_ops.d(200): Error: `opXor` is obsolete. Use `opBinary(string op)(...) if (op == "^")` instead. + i = s ^ 1; + ^ +fail_compilation/dep_d1_ops.d(202): Error: `opShl` is obsolete. Use `opBinary(string op)(...) if (op == "<<")` instead. + i = s << 1; + ^ +fail_compilation/dep_d1_ops.d(203): Error: `opShl_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "<<")` instead. + i = 1 << s; + ^ +fail_compilation/dep_d1_ops.d(204): Error: `opShr` is obsolete. Use `opBinary(string op)(...) if (op == ">>")` instead. + i = s >> 1; + ^ +fail_compilation/dep_d1_ops.d(205): Error: `opShr_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == ">>")` instead. + i = 1 >> s; + ^ +fail_compilation/dep_d1_ops.d(206): Error: `opUShr` is obsolete. Use `opBinary(string op)(...) if (op == ">>>")` instead. + i = s >>> 1; + ^ +fail_compilation/dep_d1_ops.d(207): Error: `opUShr_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == ">>>")` instead. + i = 1 >>> s; + ^ +fail_compilation/dep_d1_ops.d(209): Error: `opCat` is obsolete. Use `opBinary(string op)(...) if (op == "~")` instead. + i = s ~ 1; + ^ +fail_compilation/dep_d1_ops.d(210): Error: `opCat_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "~")` instead. + i = 1 ~ s; + ^ +fail_compilation/dep_d1_ops.d(212): Error: `opNeg` is obsolete. Use `opUnary(string op)() if (op == "-")` instead. + i = -s; + ^ +fail_compilation/dep_d1_ops.d(213): Error: `opCom` is obsolete. Use `opUnary(string op)() if (op == "~")` instead. + i = ~s; + ^ +fail_compilation/dep_d1_ops.d(214): Error: `opPostInc` is obsolete. Use `opUnary(string op)() if (op == "++")` instead. + s++; + ^ +fail_compilation/dep_d1_ops.d(215): Error: `opPostDec` is obsolete. Use `opUnary(string op)() if (op == "--")` instead. + s--; + ^ +fail_compilation/dep_d1_ops.d(216): Error: `opStar` is obsolete. Use `opUnary(string op)() if (op == "*")` instead. + i = *s; + ^ +fail_compilation/dep_d1_ops.d(218): Error: `opIn` is obsolete. Use `opBinary(string op)(...) if (op == "in")` instead. + i = s in 1; + ^ +fail_compilation/dep_d1_ops.d(219): Error: `opIn_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "in")` instead. + i = 1 in s; + ^ +fail_compilation/dep_d1_ops.d(221): Error: `opAddAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "+")` instead. + s += 1; + ^ +fail_compilation/dep_d1_ops.d(222): Error: `opSubAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "-")` instead. + s -= 1; + ^ +fail_compilation/dep_d1_ops.d(223): Error: `opMulAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "*")` instead. + s *= 1; + ^ +fail_compilation/dep_d1_ops.d(224): Error: `opDivAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "/")` instead. + s /= 1; + ^ +fail_compilation/dep_d1_ops.d(225): Error: `opModAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "%")` instead. + s %= 1; + ^ +fail_compilation/dep_d1_ops.d(226): Error: `opAndAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "&")` instead. + s &= 1; + ^ +fail_compilation/dep_d1_ops.d(227): Error: `opOrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "|")` instead. + s |= 1; + ^ +fail_compilation/dep_d1_ops.d(228): Error: `opXorAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "^")` instead. + s ^= 1; + ^ +fail_compilation/dep_d1_ops.d(229): Error: `opShlAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "<<")` instead. + s <<= 1; + ^ +fail_compilation/dep_d1_ops.d(230): Error: `opShrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == ">>")` instead. + s >>= 1; + ^ +fail_compilation/dep_d1_ops.d(231): Error: `opUShrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == ">>>")` instead. + s >>>= 1; + ^ +fail_compilation/dep_d1_ops.d(232): Error: `opCatAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "~")` instead. + s ~= 1; + ^ +fail_compilation/dep_d1_ops.d(240): Error: `opCom` is obsolete. Use `opUnary(string op)() if (op == "~")` instead. + ~nd; + ^ --- */ -#line 50 +// Line 50 starts here struct S { int opAdd(int i) { return 0; } diff --git a/compiler/test/fail_compilation/depmsg15814.d b/compiler/test/fail_compilation/depmsg15814.d index 613576c256f2..87a67dcd3d5b 100644 --- a/compiler/test/fail_compilation/depmsg15814.d +++ b/compiler/test/fail_compilation/depmsg15814.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/depmsg15814.d(9): Deprecation: function `depmsg15814.get15814` is deprecated - bug15814 +fail_compilation/depmsg15814.d(11): Deprecation: function `depmsg15814.get15814` is deprecated - bug15814 +enum val15814 = get15814(); + ^ --- */ deprecated("bug15814") int get15814() { return 0; } diff --git a/compiler/test/fail_compilation/depmsg15815.d b/compiler/test/fail_compilation/depmsg15815.d index 0b19687ad524..d461cda80878 100644 --- a/compiler/test/fail_compilation/depmsg15815.d +++ b/compiler/test/fail_compilation/depmsg15815.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/depmsg15815.d(23): Deprecation: template `depmsg15815.Alias(T)` is deprecated - message +fail_compilation/depmsg15815.d(25): Deprecation: template `depmsg15815.Alias(T)` is deprecated - message +pragma(msg, Alias!(const(Foo))); + ^ Foo --- */ diff --git a/compiler/test/fail_compilation/deprecate12979a.d b/compiler/test/fail_compilation/deprecate12979a.d index deb14dcc1fcd..ca4deaff5114 100644 --- a/compiler/test/fail_compilation/deprecate12979a.d +++ b/compiler/test/fail_compilation/deprecate12979a.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/deprecate12979a.d(12): Error: `asm` statement is assumed to throw - mark it with `nothrow` if it does not +fail_compilation/deprecate12979a.d(14): Error: `asm` statement is assumed to throw - mark it with `nothrow` if it does not + asm + ^ --- */ diff --git a/compiler/test/fail_compilation/deprecate12979b.d b/compiler/test/fail_compilation/deprecate12979b.d index ce6e178d0815..363799096a8b 100644 --- a/compiler/test/fail_compilation/deprecate12979b.d +++ b/compiler/test/fail_compilation/deprecate12979b.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/deprecate12979b.d(12): Error: `asm` statement is assumed to be impure - mark it with `pure` if it is not +fail_compilation/deprecate12979b.d(14): Error: `asm` statement is assumed to be impure - mark it with `pure` if it is not + asm + ^ --- */ diff --git a/compiler/test/fail_compilation/deprecate12979c.d b/compiler/test/fail_compilation/deprecate12979c.d index 512aec15f4a3..a13dd774b501 100644 --- a/compiler/test/fail_compilation/deprecate12979c.d +++ b/compiler/test/fail_compilation/deprecate12979c.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/deprecate12979c.d(12): Error: `asm` statement is assumed to use the GC - mark it with `@nogc` if it does not +fail_compilation/deprecate12979c.d(14): Error: `asm` statement is assumed to use the GC - mark it with `@nogc` if it does not + asm + ^ --- */ diff --git a/compiler/test/fail_compilation/deprecate12979d.d b/compiler/test/fail_compilation/deprecate12979d.d index fcfaf7324c28..95d09732432a 100644 --- a/compiler/test/fail_compilation/deprecate12979d.d +++ b/compiler/test/fail_compilation/deprecate12979d.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/deprecate12979d.d(11): Error: `asm` statement is assumed to be `@system` - mark it with `@trusted` if it is not +fail_compilation/deprecate12979d.d(13): Error: `asm` statement is assumed to be `@system` - mark it with `@trusted` if it is not + asm + ^ --- */ diff --git a/compiler/test/fail_compilation/deprecate1553.d b/compiler/test/fail_compilation/deprecate1553.d index 867616ccac13..30672704e171 100644 --- a/compiler/test/fail_compilation/deprecate1553.d +++ b/compiler/test/fail_compilation/deprecate1553.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/deprecate1553.d(16): Error: cannot use `foreach_reverse` with a delegate +fail_compilation/deprecate1553.d(18): Error: cannot use `foreach_reverse` with a delegate + foreach_reverse(a; &s.dg) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/deprecate_getVirtualFunctions.d b/compiler/test/fail_compilation/deprecate_getVirtualFunctions.d index 137482f98ac2..0fccd9a548d0 100644 --- a/compiler/test/fail_compilation/deprecate_getVirtualFunctions.d +++ b/compiler/test/fail_compilation/deprecate_getVirtualFunctions.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/deprecate_getVirtualFunctions.d(18): Deprecation: `traits(isVirtualFunction)` is deprecated. Use `traits(isVirtualMethod)` instead -fail_compilation/deprecate_getVirtualFunctions.d(19): Deprecation: `traits(getVirtualFunctions)` is deprecated. Use `traits(getVirtualMethods)` instead +fail_compilation/deprecate_getVirtualFunctions.d(22): Deprecation: `traits(isVirtualFunction)` is deprecated. Use `traits(isVirtualMethod)` instead + auto a = __traits(isVirtualFunction, A.fun); + ^ +fail_compilation/deprecate_getVirtualFunctions.d(23): Deprecation: `traits(getVirtualFunctions)` is deprecated. Use `traits(getVirtualMethods)` instead + foreach(f; __traits(getVirtualFunctions, A, "fun")) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/deprecated6760.d b/compiler/test/fail_compilation/deprecated6760.d index 7b219cb48bb2..da6cdc315476 100644 --- a/compiler/test/fail_compilation/deprecated6760.d +++ b/compiler/test/fail_compilation/deprecated6760.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/deprecated6760.d(13): Deprecation: `deprecated6760.Foo.opEquals` cannot be annotated with `@disable` because it is overriding a function in the base class -fail_compilation/deprecated6760.d(18): Deprecation: `deprecated6760.Bar.opEquals` cannot be marked as `deprecated` because it is overriding a function in the base class +fail_compilation/deprecated6760.d(17): Deprecation: `deprecated6760.Foo.opEquals` cannot be annotated with `@disable` because it is overriding a function in the base class + @disable override bool opEquals(Object); + ^ +fail_compilation/deprecated6760.d(22): Deprecation: `deprecated6760.Bar.opEquals` cannot be marked as `deprecated` because it is overriding a function in the base class + deprecated override bool opEquals(Object); + ^ --- */ diff --git a/compiler/test/fail_compilation/deprecatedImports.d b/compiler/test/fail_compilation/deprecatedImports.d index bd68a9d4e3cd..4e1f9d35f216 100644 --- a/compiler/test/fail_compilation/deprecatedImports.d +++ b/compiler/test/fail_compilation/deprecatedImports.d @@ -4,13 +4,27 @@ EXTRA_FILES: imports/deprecatedImporta.d imports/deprecatedImportb.d TEST_OUTPUT: ---- -fail_compilation/deprecatedImports.d(19): Deprecation: alias `deprecatedImporta.foo` is deprecated - Please import deprecatedImportb directly! -fail_compilation/deprecatedImports.d(21): Deprecation: alias `deprecatedImporta.bar` is deprecated - Please import deprecatedImportb directly! -fail_compilation/deprecatedImports.d(23): Deprecation: alias `deprecatedImporta.AliasSeq` is deprecated - Please import deprecatedImportb directly! -fail_compilation/deprecatedImports.d(27): Deprecation: alias `deprecatedImporta.S` is deprecated - Please import deprecatedImportb directly! -fail_compilation/deprecatedImports.d(29): Deprecation: alias `deprecatedImporta.C` is deprecated - Please import deprecatedImportb directly! -fail_compilation/deprecatedImports.d(31): Deprecation: alias `deprecatedImporta.I` is deprecated - Please import deprecatedImportb directly! -fail_compilation/deprecatedImports.d(25): Deprecation: alias `deprecatedImporta.E` is deprecated - Please import deprecatedImportb directly! +fail_compilation/deprecatedImports.d(33): Deprecation: alias `deprecatedImporta.foo` is deprecated - Please import deprecatedImportb directly! +alias f = foo; + ^ +fail_compilation/deprecatedImports.d(35): Deprecation: alias `deprecatedImporta.bar` is deprecated - Please import deprecatedImportb directly! +alias b = bar!(int); + ^ +fail_compilation/deprecatedImports.d(37): Deprecation: alias `deprecatedImporta.AliasSeq` is deprecated - Please import deprecatedImportb directly! +alias Types = AliasSeq!(int); + ^ +fail_compilation/deprecatedImports.d(41): Deprecation: alias `deprecatedImporta.S` is deprecated - Please import deprecatedImportb directly! +S s; + ^ +fail_compilation/deprecatedImports.d(43): Deprecation: alias `deprecatedImporta.C` is deprecated - Please import deprecatedImportb directly! +C c; + ^ +fail_compilation/deprecatedImports.d(45): Deprecation: alias `deprecatedImporta.I` is deprecated - Please import deprecatedImportb directly! +I i; + ^ +fail_compilation/deprecatedImports.d(39): Deprecation: alias `deprecatedImporta.E` is deprecated - Please import deprecatedImportb directly! +int x = E; + ^ ---- */ diff --git a/compiler/test/fail_compilation/deprecateopdot.d b/compiler/test/fail_compilation/deprecateopdot.d index 46c949376e35..5cb8744e3aa2 100644 --- a/compiler/test/fail_compilation/deprecateopdot.d +++ b/compiler/test/fail_compilation/deprecateopdot.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/deprecateopdot.d(27): Error: `opDot` is obsolete. Use `alias this` -fail_compilation/deprecateopdot.d(28): Error: `opDot` is obsolete. Use `alias this` -fail_compilation/deprecateopdot.d(29): Error: `opDot` is obsolete. Use `alias this` +fail_compilation/deprecateopdot.d(33): Error: `opDot` is obsolete. Use `alias this` + t.a = 4; + ^ +fail_compilation/deprecateopdot.d(34): Error: `opDot` is obsolete. Use `alias this` + assert(t.a == 4); + ^ +fail_compilation/deprecateopdot.d(35): Error: `opDot` is obsolete. Use `alias this` + t.b = 5; + ^ --- */ struct S6 diff --git a/compiler/test/fail_compilation/deprecations.d b/compiler/test/fail_compilation/deprecations.d index 19adab7e3acc..1946f4248b8f 100644 --- a/compiler/test/fail_compilation/deprecations.d +++ b/compiler/test/fail_compilation/deprecations.d @@ -2,12 +2,24 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/deprecations.d(43): Deprecation: struct `deprecations.S` is deprecated -fail_compilation/deprecations.d(64): instantiated from here: `otherPar!()` fail_compilation/deprecations.d(55): Deprecation: struct `deprecations.S` is deprecated -fail_compilation/deprecations.d(65): instantiated from here: `otherVar!()` -fail_compilation/deprecations.d(55): Deprecation: struct `deprecations.S` is deprecated -fail_compilation/deprecations.d(65): instantiated from here: `otherVar!()` + void par(S par) {} + ^ +fail_compilation/deprecations.d(76): instantiated from here: `otherPar!()` + otherPar(S.init); + ^ +fail_compilation/deprecations.d(67): Deprecation: struct `deprecations.S` is deprecated + S var; + ^ +fail_compilation/deprecations.d(77): instantiated from here: `otherVar!()` + otherVar(S.init); + ^ +fail_compilation/deprecations.d(67): Deprecation: struct `deprecations.S` is deprecated + S var; + ^ +fail_compilation/deprecations.d(77): instantiated from here: `otherVar!()` + otherVar(S.init); + ^ --- https://issues.dlang.org/show_bug.cgi?id=20474 diff --git a/compiler/test/fail_compilation/diag10089.d b/compiler/test/fail_compilation/diag10089.d index d79a49e427a4..de355bc552ca 100644 --- a/compiler/test/fail_compilation/diag10089.d +++ b/compiler/test/fail_compilation/diag10089.d @@ -2,8 +2,12 @@ EXTRA_FILES: imports/diag10089a.d imports/diag10089b.d TEST_OUTPUT: --- -fail_compilation/diag10089.d(16): Error: undefined identifier `chunks` in package `imports` -fail_compilation/diag10089.d(18): Error: template `Foo()` does not have property `chunks` +fail_compilation/diag10089.d(20): Error: undefined identifier `chunks` in package `imports` + imports.chunks("abcdef", 2); + ^ +fail_compilation/diag10089.d(22): Error: template `Foo()` does not have property `chunks` + Foo.chunks("abcdef", 2); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10099.d b/compiler/test/fail_compilation/diag10099.d index 46109247fb6a..eb632136defa 100644 --- a/compiler/test/fail_compilation/diag10099.d +++ b/compiler/test/fail_compilation/diag10099.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10099.d(15): Error: variable `diag10099.main.s` - default construction is disabled for type `S` +fail_compilation/diag10099.d(17): Error: variable `diag10099.main.s` - default construction is disabled for type `S` + S s; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10141.d b/compiler/test/fail_compilation/diag10141.d index a2ea07327025..549a3a7baff8 100644 --- a/compiler/test/fail_compilation/diag10141.d +++ b/compiler/test/fail_compilation/diag10141.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/diag10141a.d imports/diag10141b.d TEST_OUTPUT: --- -fail_compilation/diag10141.d(10): Error: module `imports.diag10141a` import `unexisting_symbol` not found +fail_compilation/diag10141.d(12): Error: module `imports.diag10141a` import `unexisting_symbol` not found +import imports.diag10141a : unexisting_symbol; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10169.d b/compiler/test/fail_compilation/diag10169.d index e21a334548d0..a970fd05c588 100644 --- a/compiler/test/fail_compilation/diag10169.d +++ b/compiler/test/fail_compilation/diag10169.d @@ -2,8 +2,12 @@ EXTRA_FILES: imports/a10169.d TEST_OUTPUT: --- -fail_compilation/diag10169.d(13): Error: no property `x` for `B(0)` of type `imports.a10169.B` +fail_compilation/diag10169.d(17): Error: no property `x` for `B(0)` of type `imports.a10169.B` + auto a = B.init.x; + ^ fail_compilation/imports/a10169.d(3): struct `B` defined here +struct B +^ --- */ import imports.a10169; diff --git a/compiler/test/fail_compilation/diag10221.d b/compiler/test/fail_compilation/diag10221.d index 14338ec4a468..ac0941abe13b 100644 --- a/compiler/test/fail_compilation/diag10221.d +++ b/compiler/test/fail_compilation/diag10221.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10221.d(10): Error: cannot implicitly convert expression `256` of type `int` to `ubyte` +fail_compilation/diag10221.d(12): Error: cannot implicitly convert expression `256` of type `int` to `ubyte` + foreach(ref ubyte i; 0..256) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10221a.d b/compiler/test/fail_compilation/diag10221a.d index 32b1f07d9025..e27cfdb12951 100644 --- a/compiler/test/fail_compilation/diag10221a.d +++ b/compiler/test/fail_compilation/diag10221a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10221a.d(10): Error: cannot implicitly convert expression `257` of type `int` to `ubyte` +fail_compilation/diag10221a.d(12): Error: cannot implicitly convert expression `257` of type `int` to `ubyte` + foreach(ubyte i; 0..257) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10319.d b/compiler/test/fail_compilation/diag10319.d index efc818f30be5..65872cdcd7cd 100644 --- a/compiler/test/fail_compilation/diag10319.d +++ b/compiler/test/fail_compilation/diag10319.d @@ -1,21 +1,45 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10319.d(33): Error: `pure` function `D main` cannot call impure function `diag10319.foo` -fail_compilation/diag10319.d(33): Error: `@safe` function `D main` cannot call `@system` function `diag10319.foo` -fail_compilation/diag10319.d(22): `diag10319.foo` is declared here -fail_compilation/diag10319.d(34): Error: `pure` function `D main` cannot call impure function `diag10319.bar!int.bar` -fail_compilation/diag10319.d(26): which wasn't inferred `pure` because of: -fail_compilation/diag10319.d(26): `pure` function `diag10319.bar!int.bar` cannot access mutable static data `g` -fail_compilation/diag10319.d(34): Error: `@safe` function `D main` cannot call `@system` function `diag10319.bar!int.bar` -fail_compilation/diag10319.d(27): which wasn't inferred `@safe` because of: -fail_compilation/diag10319.d(27): cannot take address of local `x` in `@safe` function `bar` -fail_compilation/diag10319.d(24): `diag10319.bar!int.bar` is declared here -fail_compilation/diag10319.d(33): Error: function `diag10319.foo` is not `nothrow` -fail_compilation/diag10319.d(34): Error: function `diag10319.bar!int.bar` is not `nothrow` -fail_compilation/diag10319.d(28): which wasn't inferred `nothrow` because of: -fail_compilation/diag10319.d(28): `object.Exception` is thrown but not caught -fail_compilation/diag10319.d(31): Error: function `D main` may throw but is marked as `nothrow` +fail_compilation/diag10319.d(57): Error: `pure` function `D main` cannot call impure function `diag10319.foo` + foo(); // L25 + ^ +fail_compilation/diag10319.d(57): Error: `@safe` function `D main` cannot call `@system` function `diag10319.foo` + foo(); // L25 + ^ +fail_compilation/diag10319.d(46): `diag10319.foo` is declared here +void foo() {} + ^ +fail_compilation/diag10319.d(58): Error: `pure` function `D main` cannot call impure function `diag10319.bar!int.bar` + bar!int(); // L26 + ^ +fail_compilation/diag10319.d(50): which wasn't inferred `pure` because of: + static int g; g = 10; // impure + ^ +fail_compilation/diag10319.d(50): `pure` function `diag10319.bar!int.bar` cannot access mutable static data `g` +fail_compilation/diag10319.d(58): Error: `@safe` function `D main` cannot call `@system` function `diag10319.bar!int.bar` + bar!int(); // L26 + ^ +fail_compilation/diag10319.d(51): which wasn't inferred `@safe` because of: + int x; auto p = &x; // system + ^ +fail_compilation/diag10319.d(51): cannot take address of local `x` in `@safe` function `bar` +fail_compilation/diag10319.d(48): `diag10319.bar!int.bar` is declared here +void bar(T)() + ^ +fail_compilation/diag10319.d(57): Error: function `diag10319.foo` is not `nothrow` + foo(); // L25 + ^ +fail_compilation/diag10319.d(58): Error: function `diag10319.bar!int.bar` is not `nothrow` + bar!int(); // L26 + ^ +fail_compilation/diag10319.d(52): which wasn't inferred `nothrow` because of: + throw new Exception(""); // may throw + ^ +fail_compilation/diag10319.d(52): `object.Exception` is thrown but not caught +fail_compilation/diag10319.d(55): Error: function `D main` may throw but is marked as `nothrow` +@safe pure nothrow void main() // L23 + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10359.d b/compiler/test/fail_compilation/diag10359.d index 142cec98e0c7..f18a1ebab9bb 100644 --- a/compiler/test/fail_compilation/diag10359.d +++ b/compiler/test/fail_compilation/diag10359.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10359.d(10): Error: pointer slicing not allowed in safe functions +fail_compilation/diag10359.d(12): Error: pointer slicing not allowed in safe functions + auto a = p[0 .. 10]; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10405.d b/compiler/test/fail_compilation/diag10405.d index 28da8af93ad1..01a444129327 100644 --- a/compiler/test/fail_compilation/diag10405.d +++ b/compiler/test/fail_compilation/diag10405.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10405.d(10): Error: cannot return non-void from `void` function +fail_compilation/diag10405.d(12): Error: cannot return non-void from `void` function + return 10; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10415.d b/compiler/test/fail_compilation/diag10415.d index 74444327ecbc..e03357af8556 100644 --- a/compiler/test/fail_compilation/diag10415.d +++ b/compiler/test/fail_compilation/diag10415.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10415.d(36): Error: none of the overloads of `x` are callable using argument types `(int) const` -fail_compilation/diag10415.d(13): Candidates are: `diag10415.C.x() const` -fail_compilation/diag10415.d(18): `diag10415.C.x(int __param_0)` -fail_compilation/diag10415.d(39): Error: d.x is not an lvalue +fail_compilation/diag10415.d(44): Error: none of the overloads of `x` are callable using argument types `(int) const` + c.x = 1; + ^ +fail_compilation/diag10415.d(21): Candidates are: `diag10415.C.x() const` + @property int x() const + ^ +fail_compilation/diag10415.d(26): `diag10415.C.x(int __param_0)` + @property void x(int) + ^ +fail_compilation/diag10415.d(47): Error: d.x is not an lvalue + d.x = 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10688.d b/compiler/test/fail_compilation/diag10688.d index f7d7479b4df2..545b97fa4ddb 100644 --- a/compiler/test/fail_compilation/diag10688.d +++ b/compiler/test/fail_compilation/diag10688.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10688.d(12): Error: function `diag10688.Bar.foo` `private` method is not virtual and cannot override -fail_compilation/diag10688.d(14): Error: function `diag10688.Bar.bar` `package` method is not virtual and cannot override +fail_compilation/diag10688.d(16): Error: function `diag10688.Bar.foo` `private` method is not virtual and cannot override + override void foo() { } + ^ +fail_compilation/diag10688.d(18): Error: function `diag10688.Bar.bar` `package` method is not virtual and cannot override + override void bar() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10768.d b/compiler/test/fail_compilation/diag10768.d index bea52eae5bad..fe5cbb4366b0 100644 --- a/compiler/test/fail_compilation/diag10768.d +++ b/compiler/test/fail_compilation/diag10768.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10768.d(35): Error: cannot implicitly override base class method `diag10768.Frop.frop` with `diag10768.Foo.frop`; add `override` attribute +fail_compilation/diag10768.d(37): Error: cannot implicitly override base class method `diag10768.Frop.frop` with `diag10768.Foo.frop`; add `override` attribute + public int frop() { return 1; } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10783.d b/compiler/test/fail_compilation/diag10783.d index e69eddbec036..dc849812c6fd 100644 --- a/compiler/test/fail_compilation/diag10783.d +++ b/compiler/test/fail_compilation/diag10783.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10783.d(15): Error: no property `type` for `event` of type `diag10783.Event` -fail_compilation/diag10783.d(10): struct `Event` defined here -fail_compilation/diag10783.d(15): Error: undefined identifier `En` +fail_compilation/diag10783.d(21): Error: no property `type` for `event` of type `diag10783.Event` + switch (event.type) with (En) + ^ +fail_compilation/diag10783.d(16): struct `Event` defined here +struct Event { } +^ +fail_compilation/diag10783.d(21): Error: undefined identifier `En` + switch (event.type) with (En) + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10805.d b/compiler/test/fail_compilation/diag10805.d index 932aa5c5769d..c77240901a66 100644 --- a/compiler/test/fail_compilation/diag10805.d +++ b/compiler/test/fail_compilation/diag10805.d @@ -1,11 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10805.d(12): Error: delimited string must end in `FOO"` -fail_compilation/diag10805.d(14): Error: unterminated string constant starting at fail_compilation/diag10805.d(14) -fail_compilation/diag10805.d(14): Error: implicit string concatenation is error-prone and disallowed in D -fail_compilation/diag10805.d(14): Use the explicit syntax instead (concatenating literals is `@nogc`): "" ~ "" -fail_compilation/diag10805.d(15): Error: semicolon expected following auto declaration, not `End of File` +fail_compilation/diag10805.d(18): Error: delimited string must end in `FOO"` +enum s = q"FOO + ^ +fail_compilation/diag10805.d(20): Error: unterminated string constant starting at fail_compilation/diag10805.d(20) +"; +^ +fail_compilation/diag10805.d(20): Error: implicit string concatenation is error-prone and disallowed in D +"; +^ +fail_compilation/diag10805.d(20): Use the explicit syntax instead (concatenating literals is `@nogc`): "" ~ "" +fail_compilation/diag10805.d(21): Error: semicolon expected following auto declaration, not `End of File` --- */ diff --git a/compiler/test/fail_compilation/diag10862.d b/compiler/test/fail_compilation/diag10862.d index 2c9384159ffe..f4a28d8599e7 100644 --- a/compiler/test/fail_compilation/diag10862.d +++ b/compiler/test/fail_compilation/diag10862.d @@ -1,36 +1,82 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10862.d(40): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(41): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(42): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(43): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(44): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(46): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(47): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(48): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(49): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(51): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(52): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(53): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(54): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(56): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(57): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(58): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(59): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(61): Error: undefined identifier `semanticError` -fail_compilation/diag10862.d(71): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d(74): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d-mixin-77(77): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d-mixin-78(78): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d-mixin-79(79): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d-mixin-80(80): Error: using the result of a comma expression is not allowed -fail_compilation/diag10862.d-mixin-80(80): Error: assignment cannot be used as a condition, perhaps `==` was meant? -fail_compilation/diag10862.d-mixin-83(83): Error: cannot modify expression `a + b` because it is not an lvalue -fail_compilation/diag10862.d-mixin-84(84): Error: undefined identifier `c` -fail_compilation/diag10862.d(86): Error: undefined identifier `semanticError` -fail_compilation/diag10862.d(93): Error: cannot modify lazy variable `bar` -fail_compilation/diag10862.d(95): Error: template instance `diag10862.test3.foo!int` error instantiating +fail_compilation/diag10862.d(86): Error: assignment cannot be used as a condition, perhaps `==` was meant? + if (a = b) {} + ^ +fail_compilation/diag10862.d(87): Error: assignment cannot be used as a condition, perhaps `==` was meant? + if ((a = b) = 0) {} + ^ +fail_compilation/diag10862.d(88): Error: assignment cannot be used as a condition, perhaps `==` was meant? + if ((a = b) = (a = b)) {} + ^ +fail_compilation/diag10862.d(89): Error: assignment cannot be used as a condition, perhaps `==` was meant? + if (a = 0, b = 0) {} // https://issues.dlang.org/show_bug.cgi?id=15384 + ^ +fail_compilation/diag10862.d(90): Error: assignment cannot be used as a condition, perhaps `==` was meant? + if (auto x = a = b) {} // this is error, today + ^ +fail_compilation/diag10862.d(92): Error: assignment cannot be used as a condition, perhaps `==` was meant? + while (a = b) {} + ^ +fail_compilation/diag10862.d(93): Error: assignment cannot be used as a condition, perhaps `==` was meant? + while ((a = b) = 0) {} + ^ +fail_compilation/diag10862.d(94): Error: assignment cannot be used as a condition, perhaps `==` was meant? + while ((a = b) = (a = b)) {} + ^ +fail_compilation/diag10862.d(95): Error: assignment cannot be used as a condition, perhaps `==` was meant? + while (a = 0, b = 0) {} // https://issues.dlang.org/show_bug.cgi?id=15384 + ^ +fail_compilation/diag10862.d(97): Error: assignment cannot be used as a condition, perhaps `==` was meant? + do {} while (a = b); + ^ +fail_compilation/diag10862.d(98): Error: assignment cannot be used as a condition, perhaps `==` was meant? + do {} while ((a = b) = 0); + ^ +fail_compilation/diag10862.d(99): Error: assignment cannot be used as a condition, perhaps `==` was meant? + do {} while ((a = b) = (a = b)); + ^ +fail_compilation/diag10862.d(100): Error: assignment cannot be used as a condition, perhaps `==` was meant? + do {} while (a = 0, b = 0); // https://issues.dlang.org/show_bug.cgi?id=15384 + ^ +fail_compilation/diag10862.d(102): Error: assignment cannot be used as a condition, perhaps `==` was meant? + for (; a = b; ) {} + ^ +fail_compilation/diag10862.d(103): Error: assignment cannot be used as a condition, perhaps `==` was meant? + for (; (a = b) = 0; ) {} + ^ +fail_compilation/diag10862.d(104): Error: assignment cannot be used as a condition, perhaps `==` was meant? + for (; (a = b) = (a = b); ) {} + ^ +fail_compilation/diag10862.d(105): Error: assignment cannot be used as a condition, perhaps `==` was meant? + for (; a = 0, b = 0; ) {} // https://issues.dlang.org/show_bug.cgi?id=15384 + ^ +fail_compilation/diag10862.d(107): Error: undefined identifier `semanticError` + semanticError; + ^ +fail_compilation/diag10862.d(117): Error: assignment cannot be used as a condition, perhaps `==` was meant? + if (a + b = a * b) {} + ^ +fail_compilation/diag10862.d(120): Error: assignment cannot be used as a condition, perhaps `==` was meant? + if (a = undefinedIdentifier) {} + ^ +fail_compilation/diag10862.d-mixin-123(123): Error: assignment cannot be used as a condition, perhaps `==` was meant? +fail_compilation/diag10862.d-mixin-124(124): Error: assignment cannot be used as a condition, perhaps `==` was meant? +fail_compilation/diag10862.d-mixin-125(125): Error: assignment cannot be used as a condition, perhaps `==` was meant? +fail_compilation/diag10862.d-mixin-126(126): Error: using the result of a comma expression is not allowed +fail_compilation/diag10862.d-mixin-126(126): Error: assignment cannot be used as a condition, perhaps `==` was meant? +fail_compilation/diag10862.d-mixin-129(129): Error: cannot modify expression `a + b` because it is not an lvalue +fail_compilation/diag10862.d-mixin-130(130): Error: undefined identifier `c` +fail_compilation/diag10862.d(132): Error: undefined identifier `semanticError` + semanticError; + ^ +fail_compilation/diag10862.d(139): Error: cannot modify lazy variable `bar` + bar = 2; + ^ +fail_compilation/diag10862.d(141): Error: template instance `diag10862.test3.foo!int` error instantiating + foo(1 + 1); + ^ --- */ void test1() diff --git a/compiler/test/fail_compilation/diag10926.d b/compiler/test/fail_compilation/diag10926.d index 9bad6336d186..898db0e06bfb 100644 --- a/compiler/test/fail_compilation/diag10926.d +++ b/compiler/test/fail_compilation/diag10926.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10926.d(11): Error: cannot modify expression `cast(const(int)[])c` because it is not an lvalue +fail_compilation/diag10926.d(13): Error: cannot modify expression `cast(const(int)[])c` because it is not an lvalue + (true ? a : c) ~= 20; // line 6, Error: a is not an lvalue + ^ --- */ diff --git a/compiler/test/fail_compilation/diag10984.d b/compiler/test/fail_compilation/diag10984.d index c3d835c04338..97f8fd9f23d9 100644 --- a/compiler/test/fail_compilation/diag10984.d +++ b/compiler/test/fail_compilation/diag10984.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag10984.d(12): Error: `static` function `diag10984.f.n` cannot access variable `x` in frame of function `diag10984.f` -fail_compilation/diag10984.d(11): `x` declared here +fail_compilation/diag10984.d(16): Error: `static` function `diag10984.f.n` cannot access variable `x` in frame of function `diag10984.f` + static void n() { x++; } + ^ +fail_compilation/diag10984.d(15): `x` declared here + int x; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11078.d b/compiler/test/fail_compilation/diag11078.d index 334ce16651fb..de081d63eaf3 100644 --- a/compiler/test/fail_compilation/diag11078.d +++ b/compiler/test/fail_compilation/diag11078.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11078.d(19): Error: none of the overloads of `value` are callable using argument types `(double)` -fail_compilation/diag11078.d(12): Candidates are: `diag11078.S1.value()` -fail_compilation/diag11078.d(13): `diag11078.S1.value(int n)` +fail_compilation/diag11078.d(25): Error: none of the overloads of `value` are callable using argument types `(double)` + s1.value = 1.0; + ^ +fail_compilation/diag11078.d(18): Candidates are: `diag11078.S1.value()` + @property int value() { return 1; } + ^ +fail_compilation/diag11078.d(19): `diag11078.S1.value(int n)` + @property void value(int n) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11132.d b/compiler/test/fail_compilation/diag11132.d index 0bdfe50ca748..96cf81f1738e 100644 --- a/compiler/test/fail_compilation/diag11132.d +++ b/compiler/test/fail_compilation/diag11132.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11132.d(23): Error: overlapping initialization for field `a` and `b` -fail_compilation/diag11132.d(23): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized +fail_compilation/diag11132.d(25): Error: overlapping initialization for field `a` and `b` + S s = { 1, 2, 3 }; + ^ +fail_compilation/diag11132.d(25): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized --- */ diff --git a/compiler/test/fail_compilation/diag11198.d b/compiler/test/fail_compilation/diag11198.d index 1be0f1e85a2c..cf8a26d52dae 100644 --- a/compiler/test/fail_compilation/diag11198.d +++ b/compiler/test/fail_compilation/diag11198.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11198.d(17): Error: version `blah` declaration must be at module level -fail_compilation/diag11198.d(18): Error: debug `blah` declaration must be at module level -fail_compilation/diag11198.d(19): Deprecation: `version = ` is deprecated, use version identifiers instead -fail_compilation/diag11198.d(19): Error: version `1` level declaration must be at module level -fail_compilation/diag11198.d(20): Deprecation: `debug = ` is deprecated, use debug identifiers instead -fail_compilation/diag11198.d(20): Error: debug `2` level declaration must be at module level -fail_compilation/diag11198.d(21): Error: identifier or integer expected, not `""` -fail_compilation/diag11198.d(22): Error: identifier or integer expected, not `""` +fail_compilation/diag11198.d(33): Error: version `blah` declaration must be at module level + version = blah; + ^ +fail_compilation/diag11198.d(34): Error: debug `blah` declaration must be at module level + debug = blah; + ^ +fail_compilation/diag11198.d(35): Deprecation: `version = ` is deprecated, use version identifiers instead + version = 1; + ^ +fail_compilation/diag11198.d(35): Error: version `1` level declaration must be at module level + version = 1; + ^ +fail_compilation/diag11198.d(36): Deprecation: `debug = ` is deprecated, use debug identifiers instead + debug = 2; + ^ +fail_compilation/diag11198.d(36): Error: debug `2` level declaration must be at module level + debug = 2; + ^ +fail_compilation/diag11198.d(37): Error: identifier or integer expected, not `""` + version = ""; + ^ +fail_compilation/diag11198.d(38): Error: identifier or integer expected, not `""` + debug = ""; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11423.d b/compiler/test/fail_compilation/diag11423.d index b13588ee0c9b..61fd323be26f 100644 --- a/compiler/test/fail_compilation/diag11423.d +++ b/compiler/test/fail_compilation/diag11423.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11423.d(9): Error: undefined identifier `Foo` +fail_compilation/diag11423.d(11): Error: undefined identifier `Foo` + auto foo = new shared Foo(); + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/diag11425.d b/compiler/test/fail_compilation/diag11425.d index dfcddaa5f67a..a0d4a39c555b 100644 --- a/compiler/test/fail_compilation/diag11425.d +++ b/compiler/test/fail_compilation/diag11425.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11425.d(14): Error: variable `x` is shadowing variable `diag11425.main.x` -fail_compilation/diag11425.d(11): declared here +fail_compilation/diag11425.d(18): Error: variable `x` is shadowing variable `diag11425.main.x` + int x = 1; + ^ +fail_compilation/diag11425.d(15): declared here + int x; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11756.d b/compiler/test/fail_compilation/diag11756.d index 3a0724792c65..4c190c671b9f 100644 --- a/compiler/test/fail_compilation/diag11756.d +++ b/compiler/test/fail_compilation/diag11756.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11756.d(15): Error: cannot read uninitialized variable `cnt` in CTFE -fail_compilation/diag11756.d(34): called from here: `foo.ptr2.opAssign(Ptr(& n))` -fail_compilation/diag11756.d(39): called from here: `test()` -fail_compilation/diag11756.d(39): while evaluating: `static assert(test())` +fail_compilation/diag11756.d(23): Error: cannot read uninitialized variable `cnt` in CTFE + (*cnt)--; // error + ^ +fail_compilation/diag11756.d(42): called from here: `foo.ptr2.opAssign(Ptr(& n))` + foo.ptr2 = Ptr(&n); + ^ +fail_compilation/diag11756.d(47): called from here: `test()` +static assert(test()); + ^ +fail_compilation/diag11756.d(47): while evaluating: `static assert(test())` +static assert(test()); +^ --- */ diff --git a/compiler/test/fail_compilation/diag11759.d b/compiler/test/fail_compilation/diag11759.d index e0b7b864c13b..4816638adebb 100644 --- a/compiler/test/fail_compilation/diag11759.d +++ b/compiler/test/fail_compilation/diag11759.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11759.d(8): Error: lower case integer suffix 'l' is not allowed. Please use 'L' instead +fail_compilation/diag11759.d(10): Error: lower case integer suffix 'l' is not allowed. Please use 'L' instead +ulong x = 123ul; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11769.d b/compiler/test/fail_compilation/diag11769.d index 75047f537858..64e774461adc 100644 --- a/compiler/test/fail_compilation/diag11769.d +++ b/compiler/test/fail_compilation/diag11769.d @@ -1,10 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11769.d(18): Error: `diag11769.foo!string.bar` called with argument types `(string)` matches both: -fail_compilation/diag11769.d(13): `diag11769.foo!string.bar(wstring __param_0)` +fail_compilation/diag11769.d(20): Error: `diag11769.foo!string.bar` called with argument types `(string)` matches both: +fail_compilation/diag11769.d(15): `diag11769.foo!string.bar(wstring __param_0)` and: -fail_compilation/diag11769.d(14): `diag11769.foo!string.bar(dstring __param_0)` +fail_compilation/diag11769.d(16): `diag11769.foo!string.bar(dstring __param_0)` + foo!string.bar("abc"); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11819a.d b/compiler/test/fail_compilation/diag11819a.d index 3cad44d72b59..0d91a5611e30 100644 --- a/compiler/test/fail_compilation/diag11819a.d +++ b/compiler/test/fail_compilation/diag11819a.d @@ -1,27 +1,69 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11819a.d(30): Error: unrecognized trait `DoesNotExist` -fail_compilation/diag11819a.d(31): Error: unrecognized trait `IsAbstractClass`, did you mean `isAbstractClass`? -fail_compilation/diag11819a.d(32): Error: unrecognized trait `IsArithmetic`, did you mean `isArithmetic`? -fail_compilation/diag11819a.d(33): Error: unrecognized trait `IsAssociativeArray`, did you mean `isAssociativeArray`? -fail_compilation/diag11819a.d(34): Error: unrecognized trait `IsFinalClass`, did you mean `isFinalClass`? -fail_compilation/diag11819a.d(35): Error: unrecognized trait `IsPOD`, did you mean `isPOD`? -fail_compilation/diag11819a.d(36): Error: unrecognized trait `IsNested`, did you mean `isNested`? -fail_compilation/diag11819a.d(37): Error: unrecognized trait `IsFloating`, did you mean `isFloating`? -fail_compilation/diag11819a.d(38): Error: unrecognized trait `IsIntegral`, did you mean `isIntegral`? -fail_compilation/diag11819a.d(39): Error: unrecognized trait `IsScalar`, did you mean `isScalar`? -fail_compilation/diag11819a.d(40): Error: unrecognized trait `IsStaticArray`, did you mean `isStaticArray`? -fail_compilation/diag11819a.d(41): Error: unrecognized trait `IsUnsigned`, did you mean `isUnsigned`? -fail_compilation/diag11819a.d(42): Error: unrecognized trait `IsVirtualFunction`, did you mean `isVirtualFunction`? -fail_compilation/diag11819a.d(43): Error: unrecognized trait `IsVirtualMethod`, did you mean `isVirtualMethod`? -fail_compilation/diag11819a.d(44): Error: unrecognized trait `IsAbstractFunction`, did you mean `isAbstractFunction`? -fail_compilation/diag11819a.d(45): Error: unrecognized trait `IsFinalFunction`, did you mean `isFinalFunction`? -fail_compilation/diag11819a.d(46): Error: unrecognized trait `IsOverrideFunction`, did you mean `isOverrideFunction`? -fail_compilation/diag11819a.d(47): Error: unrecognized trait `IsStaticFunction`, did you mean `isStaticFunction`? -fail_compilation/diag11819a.d(48): Error: unrecognized trait `IsRef`, did you mean `isRef`? -fail_compilation/diag11819a.d(49): Error: unrecognized trait `IsOut`, did you mean `isOut`? -fail_compilation/diag11819a.d(50): Error: unrecognized trait `IsLazy`, did you mean `isLazy`? +fail_compilation/diag11819a.d(72): Error: unrecognized trait `DoesNotExist` + if (__traits(DoesNotExist)) { } + ^ +fail_compilation/diag11819a.d(73): Error: unrecognized trait `IsAbstractClass`, did you mean `isAbstractClass`? + if (__traits(IsAbstractClass)) { } + ^ +fail_compilation/diag11819a.d(74): Error: unrecognized trait `IsArithmetic`, did you mean `isArithmetic`? + if (__traits(IsArithmetic)) { } + ^ +fail_compilation/diag11819a.d(75): Error: unrecognized trait `IsAssociativeArray`, did you mean `isAssociativeArray`? + if (__traits(IsAssociativeArray)) { } + ^ +fail_compilation/diag11819a.d(76): Error: unrecognized trait `IsFinalClass`, did you mean `isFinalClass`? + if (__traits(IsFinalClass)) { } + ^ +fail_compilation/diag11819a.d(77): Error: unrecognized trait `IsPOD`, did you mean `isPOD`? + if (__traits(IsPOD)) { } + ^ +fail_compilation/diag11819a.d(78): Error: unrecognized trait `IsNested`, did you mean `isNested`? + if (__traits(IsNested)) { } + ^ +fail_compilation/diag11819a.d(79): Error: unrecognized trait `IsFloating`, did you mean `isFloating`? + if (__traits(IsFloating)) { } + ^ +fail_compilation/diag11819a.d(80): Error: unrecognized trait `IsIntegral`, did you mean `isIntegral`? + if (__traits(IsIntegral)) { } + ^ +fail_compilation/diag11819a.d(81): Error: unrecognized trait `IsScalar`, did you mean `isScalar`? + if (__traits(IsScalar)) { } + ^ +fail_compilation/diag11819a.d(82): Error: unrecognized trait `IsStaticArray`, did you mean `isStaticArray`? + if (__traits(IsStaticArray)) { } + ^ +fail_compilation/diag11819a.d(83): Error: unrecognized trait `IsUnsigned`, did you mean `isUnsigned`? + if (__traits(IsUnsigned)) { } + ^ +fail_compilation/diag11819a.d(84): Error: unrecognized trait `IsVirtualFunction`, did you mean `isVirtualFunction`? + if (__traits(IsVirtualFunction)) { } + ^ +fail_compilation/diag11819a.d(85): Error: unrecognized trait `IsVirtualMethod`, did you mean `isVirtualMethod`? + if (__traits(IsVirtualMethod)) { } + ^ +fail_compilation/diag11819a.d(86): Error: unrecognized trait `IsAbstractFunction`, did you mean `isAbstractFunction`? + if (__traits(IsAbstractFunction)) { } + ^ +fail_compilation/diag11819a.d(87): Error: unrecognized trait `IsFinalFunction`, did you mean `isFinalFunction`? + if (__traits(IsFinalFunction)) { } + ^ +fail_compilation/diag11819a.d(88): Error: unrecognized trait `IsOverrideFunction`, did you mean `isOverrideFunction`? + if (__traits(IsOverrideFunction)) { } + ^ +fail_compilation/diag11819a.d(89): Error: unrecognized trait `IsStaticFunction`, did you mean `isStaticFunction`? + if (__traits(IsStaticFunction)) { } + ^ +fail_compilation/diag11819a.d(90): Error: unrecognized trait `IsRef`, did you mean `isRef`? + if (__traits(IsRef)) { } + ^ +fail_compilation/diag11819a.d(91): Error: unrecognized trait `IsOut`, did you mean `isOut`? + if (__traits(IsOut)) { } + ^ +fail_compilation/diag11819a.d(92): Error: unrecognized trait `IsLazy`, did you mean `isLazy`? + if (__traits(IsLazy)) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11819b.d b/compiler/test/fail_compilation/diag11819b.d index aa4372710101..9c169a6ba874 100644 --- a/compiler/test/fail_compilation/diag11819b.d +++ b/compiler/test/fail_compilation/diag11819b.d @@ -1,24 +1,60 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11819b.d(27): Error: unrecognized trait `HasMember`, did you mean `hasMember`? -fail_compilation/diag11819b.d(28): Error: unrecognized trait `Identifier`, did you mean `identifier`? -fail_compilation/diag11819b.d(29): Error: unrecognized trait `GetProtection`, did you mean `getProtection`? -fail_compilation/diag11819b.d(30): Error: unrecognized trait `Parent`, did you mean `parent`? -fail_compilation/diag11819b.d(31): Error: unrecognized trait `GetMember`, did you mean `getMember`? -fail_compilation/diag11819b.d(32): Error: unrecognized trait `GetOverloads`, did you mean `getOverloads`? -fail_compilation/diag11819b.d(33): Error: unrecognized trait `GetVirtualFunctions`, did you mean `getVirtualFunctions`? -fail_compilation/diag11819b.d(34): Error: unrecognized trait `GetVirtualMethods`, did you mean `getVirtualMethods`? -fail_compilation/diag11819b.d(35): Error: unrecognized trait `ClassInstanceSize`, did you mean `classInstanceSize`? -fail_compilation/diag11819b.d(36): Error: unrecognized trait `AllMembers`, did you mean `allMembers`? -fail_compilation/diag11819b.d(37): Error: unrecognized trait `DerivedMembers`, did you mean `derivedMembers`? -fail_compilation/diag11819b.d(38): Error: unrecognized trait `IsSame`, did you mean `isSame`? -fail_compilation/diag11819b.d(39): Error: unrecognized trait `Compiles`, did you mean `compiles`? -fail_compilation/diag11819b.d(40): Error: unrecognized trait `GetAliasThis`, did you mean `getAliasThis`? -fail_compilation/diag11819b.d(41): Error: unrecognized trait `GetAttributes`, did you mean `getAttributes`? -fail_compilation/diag11819b.d(42): Error: unrecognized trait `GetFunctionAttributes`, did you mean `getFunctionAttributes`? -fail_compilation/diag11819b.d(43): Error: unrecognized trait `GetUnitTests`, did you mean `getUnitTests`? -fail_compilation/diag11819b.d(44): Error: unrecognized trait `GetVirtualIndex`, did you mean `getVirtualIndex`? +fail_compilation/diag11819b.d(63): Error: unrecognized trait `HasMember`, did you mean `hasMember`? + if (__traits(HasMember)) { } + ^ +fail_compilation/diag11819b.d(64): Error: unrecognized trait `Identifier`, did you mean `identifier`? + if (__traits(Identifier)) { } + ^ +fail_compilation/diag11819b.d(65): Error: unrecognized trait `GetProtection`, did you mean `getProtection`? + if (__traits(GetProtection)) { } + ^ +fail_compilation/diag11819b.d(66): Error: unrecognized trait `Parent`, did you mean `parent`? + if (__traits(Parent)) { } + ^ +fail_compilation/diag11819b.d(67): Error: unrecognized trait `GetMember`, did you mean `getMember`? + if (__traits(GetMember)) { } + ^ +fail_compilation/diag11819b.d(68): Error: unrecognized trait `GetOverloads`, did you mean `getOverloads`? + if (__traits(GetOverloads)) { } + ^ +fail_compilation/diag11819b.d(69): Error: unrecognized trait `GetVirtualFunctions`, did you mean `getVirtualFunctions`? + if (__traits(GetVirtualFunctions)) { } + ^ +fail_compilation/diag11819b.d(70): Error: unrecognized trait `GetVirtualMethods`, did you mean `getVirtualMethods`? + if (__traits(GetVirtualMethods)) { } + ^ +fail_compilation/diag11819b.d(71): Error: unrecognized trait `ClassInstanceSize`, did you mean `classInstanceSize`? + if (__traits(ClassInstanceSize)) { } + ^ +fail_compilation/diag11819b.d(72): Error: unrecognized trait `AllMembers`, did you mean `allMembers`? + if (__traits(AllMembers)) { } + ^ +fail_compilation/diag11819b.d(73): Error: unrecognized trait `DerivedMembers`, did you mean `derivedMembers`? + if (__traits(DerivedMembers)) { } + ^ +fail_compilation/diag11819b.d(74): Error: unrecognized trait `IsSame`, did you mean `isSame`? + if (__traits(IsSame)) { } + ^ +fail_compilation/diag11819b.d(75): Error: unrecognized trait `Compiles`, did you mean `compiles`? + if (__traits(Compiles)) { } + ^ +fail_compilation/diag11819b.d(76): Error: unrecognized trait `GetAliasThis`, did you mean `getAliasThis`? + if (__traits(GetAliasThis)) { } + ^ +fail_compilation/diag11819b.d(77): Error: unrecognized trait `GetAttributes`, did you mean `getAttributes`? + if (__traits(GetAttributes)) { } + ^ +fail_compilation/diag11819b.d(78): Error: unrecognized trait `GetFunctionAttributes`, did you mean `getFunctionAttributes`? + if (__traits(GetFunctionAttributes)) { } + ^ +fail_compilation/diag11819b.d(79): Error: unrecognized trait `GetUnitTests`, did you mean `getUnitTests`? + if (__traits(GetUnitTests)) { } + ^ +fail_compilation/diag11819b.d(80): Error: unrecognized trait `GetVirtualIndex`, did you mean `getVirtualIndex`? + if (__traits(GetVirtualIndex)) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag11840.d b/compiler/test/fail_compilation/diag11840.d index 4bd9a41de3df..62a29bf7b863 100644 --- a/compiler/test/fail_compilation/diag11840.d +++ b/compiler/test/fail_compilation/diag11840.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag11840.d(12): Error: undefined identifier `i` -fail_compilation/diag11840.d(12): Error: undefined identifier `j` +fail_compilation/diag11840.d(16): Error: undefined identifier `i` + data[i .. j] = 0; + ^ +fail_compilation/diag11840.d(16): Error: undefined identifier `j` + data[i .. j] = 0; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12063.d b/compiler/test/fail_compilation/diag12063.d index 3e9535ab4210..466ac7e6b441 100644 --- a/compiler/test/fail_compilation/diag12063.d +++ b/compiler/test/fail_compilation/diag12063.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12063.d(19): Error: cannot check `diag12063.Bar.b` value for overflow -fail_compilation/diag12063.d(16): Error: no property `max` for type `Foo`, perhaps `import std.algorithm;` is needed? -fail_compilation/diag12063.d(19): Error: cannot generate value for `diag12063.Bar.b` -fail_compilation/diag12063.d(19): Error: incompatible types for `(Foo()) + (1)`: `Bar` and `int` -fail_compilation/diag12063.d(29): Error: cannot check `diag12063.b` value for overflow -fail_compilation/diag12063.d(29): Error: incompatible types for `(S()) == (1)`: `S` and `int` -fail_compilation/diag12063.d(38): Error: enum member `diag12063.d` initialization with `__anonymous.c+1` causes overflow for type `Q` +fail_compilation/diag12063.d(33): Error: cannot check `diag12063.Bar.b` value for overflow + b // no max, can't +1 + ^ +fail_compilation/diag12063.d(30): Error: no property `max` for type `Foo`, perhaps `import std.algorithm;` is needed? +enum Bar : Foo +^ +fail_compilation/diag12063.d(33): Error: cannot generate value for `diag12063.Bar.b` + b // no max, can't +1 + ^ +fail_compilation/diag12063.d(33): Error: incompatible types for `(Foo()) + (1)`: `Bar` and `int` + b // no max, can't +1 + ^ +fail_compilation/diag12063.d(43): Error: cannot check `diag12063.b` value for overflow + b // can't do S() == 1 + ^ +fail_compilation/diag12063.d(43): Error: incompatible types for `(S()) == (1)`: `S` and `int` + b // can't do S() == 1 + ^ +fail_compilation/diag12063.d(52): Error: enum member `diag12063.d` initialization with `__anonymous.c+1` causes overflow for type `Q` + d // overflow detected + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12124.d b/compiler/test/fail_compilation/diag12124.d index f9f165f06b00..a3bf9202a56d 100644 --- a/compiler/test/fail_compilation/diag12124.d +++ b/compiler/test/fail_compilation/diag12124.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12124.d(14): Error: struct `diag12124.S1` `static opCall` is hidden by constructors and can never be called -fail_compilation/diag12124.d(14): Please use a factory method instead, or replace all constructors with `static opCall`. -fail_compilation/diag12124.d(20): Error: struct `diag12124.S2` `static opCall` is hidden by constructors and can never be called -fail_compilation/diag12124.d(20): Please use a factory method instead, or replace all constructors with `static opCall`. +fail_compilation/diag12124.d(18): Error: struct `diag12124.S1` `static opCall` is hidden by constructors and can never be called + static S1 opCall() { assert(0); } + ^ +fail_compilation/diag12124.d(18): Please use a factory method instead, or replace all constructors with `static opCall`. +fail_compilation/diag12124.d(24): Error: struct `diag12124.S2` `static opCall` is hidden by constructors and can never be called + static S2 opCall()() { assert(0); } + ^ +fail_compilation/diag12124.d(24): Please use a factory method instead, or replace all constructors with `static opCall`. --- */ diff --git a/compiler/test/fail_compilation/diag12280.d b/compiler/test/fail_compilation/diag12280.d index 8fba6151bbed..48f0d36d8036 100644 --- a/compiler/test/fail_compilation/diag12280.d +++ b/compiler/test/fail_compilation/diag12280.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12280.d(15): Error: undefined identifier `nonexistent` -fail_compilation/diag12280.d(13): Error: template instance `diag12280.f!10` error instantiating -fail_compilation/diag12280.d(18): 11 recursive instantiations from here: `f!0` +fail_compilation/diag12280.d(21): Error: undefined identifier `nonexistent` + nonexistent(); + ^ +fail_compilation/diag12280.d(19): Error: template instance `diag12280.f!10` error instantiating + f!(i + 1); + ^ +fail_compilation/diag12280.d(24): 11 recursive instantiations from here: `f!0` +alias f0 = f!0; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12312.d b/compiler/test/fail_compilation/diag12312.d index 307c6be1d09c..bb7f378edf6a 100644 --- a/compiler/test/fail_compilation/diag12312.d +++ b/compiler/test/fail_compilation/diag12312.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12312.d(10): Error: variable `diag12312.main.arr` of type `void[16]` does not have a default initializer -fail_compilation/diag12312.d(15): Error: variable `diag12312.bug1176.v` of type `void[1]` does not have a default initializer +fail_compilation/diag12312.d(14): Error: variable `diag12312.main.arr` of type `void[16]` does not have a default initializer + void[16] arr; + ^ +fail_compilation/diag12312.d(19): Error: variable `diag12312.bug1176.v` of type `void[1]` does not have a default initializer + void[1] v; + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/diag12380.d b/compiler/test/fail_compilation/diag12380.d index 7f59f275e228..04886fc5e837 100644 --- a/compiler/test/fail_compilation/diag12380.d +++ b/compiler/test/fail_compilation/diag12380.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12380.d(12): Error: cannot implicitly convert expression `E.a` of type `E` to `void*` +fail_compilation/diag12380.d(14): Error: cannot implicitly convert expression `E.a` of type `E` to `void*` + void* a = E.init; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12432.d b/compiler/test/fail_compilation/diag12432.d index 10755d84a037..04820b08a9b1 100644 --- a/compiler/test/fail_compilation/diag12432.d +++ b/compiler/test/fail_compilation/diag12432.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12432.d(55): Error: cannot infer argument types, expected 1 argument, not 2 -fail_compilation/diag12432.d(56): Error: cannot infer argument types, expected 2 arguments, not 3 -fail_compilation/diag12432.d(57): Error: cannot infer argument types, expected 1 argument, not 2 -fail_compilation/diag12432.d(58): Error: cannot infer argument types, expected 1 argument, not 2 -fail_compilation/diag12432.d(59): Error: cannot infer argument types, expected 2 arguments, not 3 -fail_compilation/diag12432.d(60): Error: cannot infer argument types, expected 2 arguments, not 3 +fail_compilation/diag12432.d(67): Error: cannot infer argument types, expected 1 argument, not 2 + foreach (a, b; R1()) { } + ^ +fail_compilation/diag12432.d(68): Error: cannot infer argument types, expected 2 arguments, not 3 + foreach (a, b, c; R2()) { } + ^ +fail_compilation/diag12432.d(69): Error: cannot infer argument types, expected 1 argument, not 2 + foreach (a, b; OpApply1Func()) { } + ^ +fail_compilation/diag12432.d(70): Error: cannot infer argument types, expected 1 argument, not 2 + foreach (a, b; OpApply1Deleg()) { } + ^ +fail_compilation/diag12432.d(71): Error: cannot infer argument types, expected 2 arguments, not 3 + foreach (a, b, c; OpApply2Func()) { } + ^ +fail_compilation/diag12432.d(72): Error: cannot infer argument types, expected 2 arguments, not 3 + foreach (a, b, c; OpApply2Deleg()) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12480.d b/compiler/test/fail_compilation/diag12480.d index 01c2e4e46501..5561f8ec098f 100644 --- a/compiler/test/fail_compilation/diag12480.d +++ b/compiler/test/fail_compilation/diag12480.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12480.d(12): Error: static assert: `2u == 3u` is false +fail_compilation/diag12480.d(14): Error: static assert: `2u == 3u` is false +static assert(arr.length == 3); +^ --- */ diff --git a/compiler/test/fail_compilation/diag12487.d b/compiler/test/fail_compilation/diag12487.d index 8ea103eef41e..4b92c75ceb54 100644 --- a/compiler/test/fail_compilation/diag12487.d +++ b/compiler/test/fail_compilation/diag12487.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12487.d(15): Error: recursive expansion of template instance `diag12487.recTemplate!int` -fail_compilation/diag12487.d(25): Error: template instance `diag12487.recTemplate!int` error instantiating -fail_compilation/diag12487.d(18): Error: function `diag12487.recFunction` CTFE recursion limit exceeded -fail_compilation/diag12487.d(20): called from here: `recFunction(i)` -fail_compilation/diag12487.d(18): 1000 recursive calls to function `recFunction` -fail_compilation/diag12487.d(27): called from here: `recFunction(0)` +fail_compilation/diag12487.d(27): Error: recursive expansion of template instance `diag12487.recTemplate!int` + enum bool recTemplate = recTemplate!T; + ^ +fail_compilation/diag12487.d(37): Error: template instance `diag12487.recTemplate!int` error instantiating + enum bool value1 = recTemplate!int; + ^ +fail_compilation/diag12487.d(30): Error: function `diag12487.recFunction` CTFE recursion limit exceeded +bool recFunction(int i) + ^ +fail_compilation/diag12487.d(32): called from here: `recFunction(i)` + return recFunction(i); + ^ +fail_compilation/diag12487.d(30): 1000 recursive calls to function `recFunction` +bool recFunction(int i) + ^ +fail_compilation/diag12487.d(39): called from here: `recFunction(0)` + enum bool value2 = recFunction(0); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12640.d b/compiler/test/fail_compilation/diag12640.d index 526e185b6ac1..ba805abd9ce0 100644 --- a/compiler/test/fail_compilation/diag12640.d +++ b/compiler/test/fail_compilation/diag12640.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12640.d(14): Error: undefined identifier `asdf` -fail_compilation/diag12640.d(23): Error: undefined identifier `asdf` +fail_compilation/diag12640.d(18): Error: undefined identifier `asdf` + asdf; + ^ +fail_compilation/diag12640.d(27): Error: undefined identifier `asdf` + asdf; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12678.d b/compiler/test/fail_compilation/diag12678.d index 8b17968fdbdd..aadfcb964721 100644 --- a/compiler/test/fail_compilation/diag12678.d +++ b/compiler/test/fail_compilation/diag12678.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12678.d(21): Error: const field `cf1` initialized multiple times -fail_compilation/diag12678.d(20): Previous initialization is here. -fail_compilation/diag12678.d(24): Error: immutable field `if1` initialized multiple times -fail_compilation/diag12678.d(23): Previous initialization is here. -fail_compilation/diag12678.d(27): Error: const field `cf2` initialization is not allowed in loops or after labels +fail_compilation/diag12678.d(31): Error: const field `cf1` initialized multiple times + cf1 = x; + ^ +fail_compilation/diag12678.d(30): Previous initialization is here. + cf1 = x; + ^ +fail_compilation/diag12678.d(34): Error: immutable field `if1` initialized multiple times + if1 = x; + ^ +fail_compilation/diag12678.d(33): Previous initialization is here. + if1 = x; + ^ +fail_compilation/diag12678.d(37): Error: const field `cf2` initialization is not allowed in loops or after labels + cf2 = x; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12777.d b/compiler/test/fail_compilation/diag12777.d index dd4321bb3ffe..df62fcc6eee7 100644 --- a/compiler/test/fail_compilation/diag12777.d +++ b/compiler/test/fail_compilation/diag12777.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12777.d(14): Error: cannot modify `this.v` in `const` function -fail_compilation/diag12777.d(15): Error: cannot modify `this.v` in `immutable` function -fail_compilation/diag12777.d(21): Error: cannot modify `this.v` in `const` function -fail_compilation/diag12777.d(22): Error: cannot modify `this.v` in `immutable` function +fail_compilation/diag12777.d(22): Error: cannot modify `this.v` in `const` function + void fun() const { v++; } + ^ +fail_compilation/diag12777.d(23): Error: cannot modify `this.v` in `immutable` function + void gun() immutable { v++; } + ^ +fail_compilation/diag12777.d(29): Error: cannot modify `this.v` in `const` function + void fun() const { v++; } + ^ +fail_compilation/diag12777.d(30): Error: cannot modify `this.v` in `immutable` function + void gun() immutable { v++; } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag12829.d b/compiler/test/fail_compilation/diag12829.d index aaedd0f72175..50602ed0b403 100644 --- a/compiler/test/fail_compilation/diag12829.d +++ b/compiler/test/fail_compilation/diag12829.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/diag12829.d(15): Error: function `diag12829.test1` is `@nogc` yet allocates closure for `test1()` with the GC -fail_compilation/diag12829.d(18): delegate `diag12829.test1.__lambda2` closes over variable `x` -fail_compilation/diag12829.d(17): `x` declared here -fail_compilation/diag12829.d(22): function `diag12829.test1.bar` closes over variable `x` -fail_compilation/diag12829.d(17): `x` declared here -fail_compilation/diag12829.d(29): Error: function `diag12829.test2` is `@nogc` yet allocates closure for `test2()` with the GC -fail_compilation/diag12829.d(34): function `diag12829.test2.S.foo` closes over variable `x` -fail_compilation/diag12829.d(31): `x` declared here +fail_compilation/diag12829.d(31): Error: function `diag12829.test1` is `@nogc` yet allocates closure for `test1()` with the GC +auto test1() @nogc + ^ +fail_compilation/diag12829.d(34): delegate `diag12829.test1.__lambda2` closes over variable `x` + void delegate() @nogc foo = () { + ^ +fail_compilation/diag12829.d(33): `x` declared here + int x; + ^ +fail_compilation/diag12829.d(38): function `diag12829.test1.bar` closes over variable `x` + void bar() + ^ +fail_compilation/diag12829.d(33): `x` declared here + int x; + ^ +fail_compilation/diag12829.d(45): Error: function `diag12829.test2` is `@nogc` yet allocates closure for `test2()` with the GC +auto test2() @nogc + ^ +fail_compilation/diag12829.d(50): function `diag12829.test2.S.foo` closes over variable `x` + void foo() + ^ +fail_compilation/diag12829.d(47): `x` declared here + int x; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13028.d b/compiler/test/fail_compilation/diag13028.d index 6ef11aa12687..059e9b5fd950 100644 --- a/compiler/test/fail_compilation/diag13028.d +++ b/compiler/test/fail_compilation/diag13028.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13028.d(15): Error: variable `dg` cannot be read at compile time -fail_compilation/diag13028.d(22): Error: variable `a` cannot be read at compile time -fail_compilation/diag13028.d(28): Error: CTFE failed because of previous errors in `foo` -fail_compilation/diag13028.d(28): while evaluating: `static assert(foo(() pure nothrow @nogc @safe => 1) == 1)` -fail_compilation/diag13028.d(29): Error: CTFE failed because of previous errors in `bar` -fail_compilation/diag13028.d(29): while evaluating: `static assert(bar(delegate int() pure nothrow @nogc @safe => 1) == 1)` +fail_compilation/diag13028.d(27): Error: variable `dg` cannot be read at compile time + enum b = dg(); + ^ +fail_compilation/diag13028.d(34): Error: variable `a` cannot be read at compile time + enum b = a; + ^ +fail_compilation/diag13028.d(40): Error: CTFE failed because of previous errors in `foo` + static assert(foo(() => 1) == 1); + ^ +fail_compilation/diag13028.d(40): while evaluating: `static assert(foo(() pure nothrow @nogc @safe => 1) == 1)` + static assert(foo(() => 1) == 1); + ^ +fail_compilation/diag13028.d(41): Error: CTFE failed because of previous errors in `bar` + static assert(bar(1) == 1); + ^ +fail_compilation/diag13028.d(41): while evaluating: `static assert(bar(delegate int() pure nothrow @nogc @safe => 1) == 1)` + static assert(bar(1) == 1); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13082.d b/compiler/test/fail_compilation/diag13082.d index 7360a3df62f2..4471ad304fd1 100644 --- a/compiler/test/fail_compilation/diag13082.d +++ b/compiler/test/fail_compilation/diag13082.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13082.d(24): Error: constructor `diag13082.C.this(int a)` is not callable using argument types `(string)` -fail_compilation/diag13082.d(24): cannot pass argument `b` of type `string` to parameter `int a` -fail_compilation/diag13082.d(25): Error: constructor `diag13082.S.this(int a)` is not callable using argument types `(string)` -fail_compilation/diag13082.d(25): cannot pass argument `b` of type `string` to parameter `int a` +fail_compilation/diag13082.d(28): Error: constructor `diag13082.C.this(int a)` is not callable using argument types `(string)` + auto c = new C(b); + ^ +fail_compilation/diag13082.d(28): cannot pass argument `b` of type `string` to parameter `int a` +fail_compilation/diag13082.d(29): Error: constructor `diag13082.S.this(int a)` is not callable using argument types `(string)` + auto s = new S(b); + ^ +fail_compilation/diag13082.d(29): cannot pass argument `b` of type `string` to parameter `int a` --- */ diff --git a/compiler/test/fail_compilation/diag13142.d b/compiler/test/fail_compilation/diag13142.d index bbdffb089504..4c85ba2ba5db 100644 --- a/compiler/test/fail_compilation/diag13142.d +++ b/compiler/test/fail_compilation/diag13142.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13142.d(25): Error: cannot implicitly convert expression `3` of type `int` to `TYPE` +fail_compilation/diag13142.d(27): Error: cannot implicitly convert expression `3` of type `int` to `TYPE` + DELIMETER = Button.TYPE.max + 1 + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13215.d b/compiler/test/fail_compilation/diag13215.d index 3ae50c9ae1c2..3f6b259ae56a 100644 --- a/compiler/test/fail_compilation/diag13215.d +++ b/compiler/test/fail_compilation/diag13215.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13215.d(11): Error: cannot implicitly convert expression `[1, 2, 3]` of type `int[]` to `immutable(uint[2])[]` +fail_compilation/diag13215.d(13): Error: cannot implicitly convert expression `[1, 2, 3]` of type `int[]` to `immutable(uint[2])[]` + arr2 = [1, 2, 3]; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13281.d b/compiler/test/fail_compilation/diag13281.d index fc0d9f54dffb..c5aeda29cf08 100644 --- a/compiler/test/fail_compilation/diag13281.d +++ b/compiler/test/fail_compilation/diag13281.d @@ -1,19 +1,45 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13281.d(20): Error: cannot implicitly convert expression `123` of type `int` to `string` -fail_compilation/diag13281.d(21): Error: cannot implicitly convert expression `123u` of type `uint` to `string` -fail_compilation/diag13281.d(22): Error: cannot implicitly convert expression `123L` of type `long` to `string` -fail_compilation/diag13281.d(23): Error: cannot implicitly convert expression `123LU` of type `ulong` to `string` -fail_compilation/diag13281.d(24): Error: cannot implicitly convert expression `123.4` of type `double` to `int` -fail_compilation/diag13281.d(25): Error: cannot implicitly convert expression `123.4F` of type `float` to `int` -fail_compilation/diag13281.d(26): Error: cannot implicitly convert expression `123.4L` of type `real` to `int` -fail_compilation/diag13281.d(27): Error: cannot implicitly convert expression `123.4i` of type `idouble` to `int` -fail_compilation/diag13281.d(28): Error: cannot implicitly convert expression `123.4Fi` of type `ifloat` to `int` -fail_compilation/diag13281.d(29): Error: cannot implicitly convert expression `123.4Li` of type `ireal` to `int` -fail_compilation/diag13281.d(30): Error: cannot implicitly convert expression `123.4 + 5.6i` of type `cdouble` to `int` -fail_compilation/diag13281.d(31): Error: cannot implicitly convert expression `123.4F + 5.6Fi` of type `cfloat` to `int` -fail_compilation/diag13281.d(32): Error: cannot implicitly convert expression `123.4L + 5.6Li` of type `creal` to `int` +fail_compilation/diag13281.d(46): Error: cannot implicitly convert expression `123` of type `int` to `string` +string x1 = 123; + ^ +fail_compilation/diag13281.d(47): Error: cannot implicitly convert expression `123u` of type `uint` to `string` +string x2 = 123u; + ^ +fail_compilation/diag13281.d(48): Error: cannot implicitly convert expression `123L` of type `long` to `string` +string x3 = 123L; + ^ +fail_compilation/diag13281.d(49): Error: cannot implicitly convert expression `123LU` of type `ulong` to `string` +string x4 = 123uL; + ^ +fail_compilation/diag13281.d(50): Error: cannot implicitly convert expression `123.4` of type `double` to `int` +int y1 = 123.4; + ^ +fail_compilation/diag13281.d(51): Error: cannot implicitly convert expression `123.4F` of type `float` to `int` +int y2 = 123.4f; + ^ +fail_compilation/diag13281.d(52): Error: cannot implicitly convert expression `123.4L` of type `real` to `int` +int y3 = 123.4L; + ^ +fail_compilation/diag13281.d(53): Error: cannot implicitly convert expression `123.4i` of type `idouble` to `int` +int y4 = 123.4i; + ^ +fail_compilation/diag13281.d(54): Error: cannot implicitly convert expression `123.4Fi` of type `ifloat` to `int` +int y5 = 123.4fi; + ^ +fail_compilation/diag13281.d(55): Error: cannot implicitly convert expression `123.4Li` of type `ireal` to `int` +int y6 = 123.4Li; + ^ +fail_compilation/diag13281.d(56): Error: cannot implicitly convert expression `123.4 + 5.6i` of type `cdouble` to `int` +int y7 = 123.4 +5.6i; + ^ +fail_compilation/diag13281.d(57): Error: cannot implicitly convert expression `123.4F + 5.6Fi` of type `cfloat` to `int` +int y8 = 123.4f+5.6fi; + ^ +fail_compilation/diag13281.d(58): Error: cannot implicitly convert expression `123.4L + 5.6Li` of type `creal` to `int` +int y9 = 123.4L+5.6Li; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13320.d b/compiler/test/fail_compilation/diag13320.d index 2808606bdcae..9b8be72e2561 100644 --- a/compiler/test/fail_compilation/diag13320.d +++ b/compiler/test/fail_compilation/diag13320.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13320.d(13): Error: `f` is not a scalar, it is a `Foo` +fail_compilation/diag13320.d(15): Error: `f` is not a scalar, it is a `Foo` + ++f; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13333.d b/compiler/test/fail_compilation/diag13333.d index 88e8a9d06225..0b523995db0e 100644 --- a/compiler/test/fail_compilation/diag13333.d +++ b/compiler/test/fail_compilation/diag13333.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13333.d(29): Error: template instance `VariantN!(maxSize!(S), T)` recursive template expansion -fail_compilation/diag13333.d(29): Error: template instance `diag13333.maxSize!(S)` error instantiating -fail_compilation/diag13333.d(34): instantiated from here: `Algebraic!(S)` +fail_compilation/diag13333.d(35): Error: template instance `VariantN!(maxSize!(S), T)` recursive template expansion + alias Algebraic = VariantN!(maxSize!T, T); + ^ +fail_compilation/diag13333.d(35): Error: template instance `diag13333.maxSize!(S)` error instantiating + alias Algebraic = VariantN!(maxSize!T, T); + ^ +fail_compilation/diag13333.d(40): instantiated from here: `Algebraic!(S)` + alias A = Algebraic!S; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13528.d b/compiler/test/fail_compilation/diag13528.d index 9b5761f7a575..1564a16e287c 100644 --- a/compiler/test/fail_compilation/diag13528.d +++ b/compiler/test/fail_compilation/diag13528.d @@ -3,6 +3,8 @@ TEST_OUTPUT: --- fail_compilation/diag13528.d(6): Error: value of `this` is not known at compile time fail_compilation/diag13528.d(6): while evaluating `pragma(msg, __traits(getMember, A, "foo"))` + ^ + ^ fail_compilation/diag13528.d(12): parent scope from here: `mixin MyTemplate!()` --- */ diff --git a/compiler/test/fail_compilation/diag13609a.d b/compiler/test/fail_compilation/diag13609a.d index 7d0e259e41b6..b290679eccce 100644 --- a/compiler/test/fail_compilation/diag13609a.d +++ b/compiler/test/fail_compilation/diag13609a.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13609a.d(16): Error: `}` expected following members in `struct` declaration -fail_compilation/diag13609a.d(15): struct starts here -fail_compilation/diag13609a.d(16): Error: `}` expected following members in `class` declaration -fail_compilation/diag13609a.d(11): class `C` starts here +fail_compilation/diag13609a.d(20): Error: `}` expected following members in `struct` declaration +fail_compilation/diag13609a.d(19): struct starts here + struct { + ^ +fail_compilation/diag13609a.d(20): Error: `}` expected following members in `class` declaration +fail_compilation/diag13609a.d(15): class `C` starts here +class C +^ --- */ diff --git a/compiler/test/fail_compilation/diag13787.d b/compiler/test/fail_compilation/diag13787.d index 3a3a2c965b86..897eb0d71c2e 100644 --- a/compiler/test/fail_compilation/diag13787.d +++ b/compiler/test/fail_compilation/diag13787.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13787.d(12): Error: cannot slice function pointer `& main` -fail_compilation/diag13787.d(13): Error: cannot index function pointer `& main` +fail_compilation/diag13787.d(16): Error: cannot slice function pointer `& main` + auto a = (&main)[0..1]; + ^ +fail_compilation/diag13787.d(17): Error: cannot index function pointer `& main` + auto x = (&main)[0]; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13884.d b/compiler/test/fail_compilation/diag13884.d index 14af2c884a9c..4c3c24c9bd92 100644 --- a/compiler/test/fail_compilation/diag13884.d +++ b/compiler/test/fail_compilation/diag13884.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13884.d(14): Error: functions cannot return a sequence (use `std.typecons.Tuple`) -fail_compilation/diag13884.d(21): instantiated from here: `MapResult!((t) => t.tupleof, Foo[])` -fail_compilation/diag13884.d(14): instantiated from here: `map!(Foo[])` +fail_compilation/diag13884.d(20): Error: functions cannot return a sequence (use `std.typecons.Tuple`) + [Foo(1)].map!(t => t.tupleof); + ^ +fail_compilation/diag13884.d(27): instantiated from here: `MapResult!((t) => t.tupleof, Foo[])` + return MapResult!(fun, Range)(r); + ^ +fail_compilation/diag13884.d(20): instantiated from here: `map!(Foo[])` + [Foo(1)].map!(t => t.tupleof); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag13942.d b/compiler/test/fail_compilation/diag13942.d index 9248e094c15b..c1f298a12efd 100644 --- a/compiler/test/fail_compilation/diag13942.d +++ b/compiler/test/fail_compilation/diag13942.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/diag13942.d(18): Error: template instance `isRawStaticArray!()` does not match template declaration `isRawStaticArray(T, A...)` -fail_compilation/diag13942.d(26): Error: template `to` is not callable using argument types `!()()` -fail_compilation/diag13942.d(17): Candidate is: `to(A...)(A args)` +fail_compilation/diag13942.d(24): Error: template instance `isRawStaticArray!()` does not match template declaration `isRawStaticArray(T, A...)` + if (!isRawStaticArray!A) + ^ +fail_compilation/diag13942.d(32): Error: template `to` is not callable using argument types `!()()` + auto t = to!double(); + ^ +fail_compilation/diag13942.d(23): Candidate is: `to(A...)(A args)` + T to(A...)(A args) + ^ --- */ diff --git a/compiler/test/fail_compilation/diag14102.d b/compiler/test/fail_compilation/diag14102.d index b88dd7803cfe..ba45a130fa19 100644 --- a/compiler/test/fail_compilation/diag14102.d +++ b/compiler/test/fail_compilation/diag14102.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag14102.d(14): Error: cannot modify expression `-x` because it is not an lvalue -fail_compilation/diag14102.d(15): Error: cannot modify expression `-(x -= 1)` because it is not an lvalue -fail_compilation/diag14102.d(16): Error: cannot modify expression `-(x -= 1 -= 1)` because it is not an lvalue -fail_compilation/diag14102.d(17): Error: cannot modify expression `-(x -= 1 -= 1 -= 1)` because it is not an lvalue +fail_compilation/diag14102.d(22): Error: cannot modify expression `-x` because it is not an lvalue + return -- -x; // error: -x is not an lvalue + ^ +fail_compilation/diag14102.d(23): Error: cannot modify expression `-(x -= 1)` because it is not an lvalue + return -- - --x; // error: -(x -= 1) is not an lvalue + ^ +fail_compilation/diag14102.d(24): Error: cannot modify expression `-(x -= 1 -= 1)` because it is not an lvalue + return -- - -- --x; // error: -((x -= 1 , x) -= 1) is not an lvalue + ^ +fail_compilation/diag14102.d(25): Error: cannot modify expression `-(x -= 1 -= 1 -= 1)` because it is not an lvalue + return -- - -- -- --x; // error: -((ref int __assignop1 = x -= 1 , __assignop1 = x; , __assignop1 -= 1 , __assignop1) -= 1) is not an lvalue + ^ --- */ diff --git a/compiler/test/fail_compilation/diag14145.d b/compiler/test/fail_compilation/diag14145.d index fee73078e301..6bc3d86f2955 100644 --- a/compiler/test/fail_compilation/diag14145.d +++ b/compiler/test/fail_compilation/diag14145.d @@ -1,11 +1,19 @@ /* TEST_OUTPUT: --- -fail_compilation/diag14145.d(16): Error: no property `i` for `_` of type `diag14145.main.Capture!(i)` -fail_compilation/diag14145.d(16): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message -fail_compilation/diag14145.d(26): struct `Capture` defined here -fail_compilation/diag14145.d(35): Error: expression `*this.ptr` of type `shared(int)` is not implicitly convertible to return type `ref int` -fail_compilation/diag14145.d(17): Error: template instance `diag14145.main.Capture!(i).Capture.opDispatch!"i"` error instantiating +fail_compilation/diag14145.d(24): Error: no property `i` for `_` of type `diag14145.main.Capture!(i)` + _.i; + ^ +fail_compilation/diag14145.d(24): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message +fail_compilation/diag14145.d(34): struct `Capture` defined here +struct Capture(alias c) +^ +fail_compilation/diag14145.d(43): Error: expression `*this.ptr` of type `shared(int)` is not implicitly convertible to return type `ref int` + return *ptr; + ^ +fail_compilation/diag14145.d(25): Error: template instance `diag14145.main.Capture!(i).Capture.opDispatch!"i"` error instantiating + _.opDispatch!"i"; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag14163.d b/compiler/test/fail_compilation/diag14163.d index eaafc075680d..76b6960dd5b7 100644 --- a/compiler/test/fail_compilation/diag14163.d +++ b/compiler/test/fail_compilation/diag14163.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag14163.d(16): Error: constructor `diag14163.Bar.this` cannot call `super()` implicitly because it is annotated with `@disable` +fail_compilation/diag14163.d(18): Error: constructor `diag14163.Bar.this` cannot call `super()` implicitly because it is annotated with `@disable` + this(int i) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/diag14235.d b/compiler/test/fail_compilation/diag14235.d index 8c563ba44c9f..298765002b5d 100644 --- a/compiler/test/fail_compilation/diag14235.d +++ b/compiler/test/fail_compilation/diag14235.d @@ -2,9 +2,15 @@ EXTRA_FILES: imports/a14235.d TEST_OUTPUT: --- -fail_compilation/diag14235.d(12): Error: undefined identifier `Undefined` in module `imports.a14235` -fail_compilation/diag14235.d(13): Error: undefined identifier `Something` in module `imports.a14235`, did you mean struct `SomeThing(T...)`? -fail_compilation/diag14235.d(14): Error: `SomeClass` isn't a template +fail_compilation/diag14235.d(18): Error: undefined identifier `Undefined` in module `imports.a14235` +imports.a14235.Undefined!Object a; + ^ +fail_compilation/diag14235.d(19): Error: undefined identifier `Something` in module `imports.a14235`, did you mean struct `SomeThing(T...)`? +imports.a14235.Something!Object b; + ^ +fail_compilation/diag14235.d(20): Error: `SomeClass` isn't a template +imports.a14235.SomeClass!Object c; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag14818.d b/compiler/test/fail_compilation/diag14818.d index 6147f32d0db1..6c8c5a337798 100644 --- a/compiler/test/fail_compilation/diag14818.d +++ b/compiler/test/fail_compilation/diag14818.d @@ -1,17 +1,35 @@ /* TEST_OUTPUT: --- -fail_compilation/diag14818.d(40): Error: none of the overloads of `func` are callable using argument types `(string)` -fail_compilation/diag14818.d(18): Candidates are: `diag14818.foo(int __param_0)` -fail_compilation/diag14818.d(19): `diag14818.bar(double __param_0)` -fail_compilation/diag14818.d(41): Error: template instance `diag14818.X!string` does not match any template declaration -fail_compilation/diag14818.d(41): Candidates are: -fail_compilation/diag14818.d(24): Foo(T) if (is(T == int)) -fail_compilation/diag14818.d(25): Bar(T) if (is(T == double)) -fail_compilation/diag14818.d(42): Error: template instance `diag14818.Y!string` does not match any template declaration -fail_compilation/diag14818.d(42): Candidates are: -fail_compilation/diag14818.d(25): Bar(T) if (is(T == double)) -fail_compilation/diag14818.d(24): Foo(T) if (is(T == int)) +fail_compilation/diag14818.d(58): Error: none of the overloads of `func` are callable using argument types `(string)` + func("abc"); + ^ +fail_compilation/diag14818.d(36): Candidates are: `diag14818.foo(int __param_0)` +void foo(int) {} + ^ +fail_compilation/diag14818.d(37): `diag14818.bar(double __param_0)` +void bar(double) {} + ^ +fail_compilation/diag14818.d(59): Error: template instance `diag14818.X!string` does not match any template declaration + alias x = X!string; + ^ +fail_compilation/diag14818.d(59): Candidates are: +fail_compilation/diag14818.d(42): Foo(T) if (is(T == int)) +template Foo(T) if (is(T == int)) {} +^ +fail_compilation/diag14818.d(43): Bar(T) if (is(T == double)) +template Bar(T) if (is(T == double)) {} +^ +fail_compilation/diag14818.d(60): Error: template instance `diag14818.Y!string` does not match any template declaration + alias y = Y!string; + ^ +fail_compilation/diag14818.d(60): Candidates are: +fail_compilation/diag14818.d(43): Bar(T) if (is(T == double)) +template Bar(T) if (is(T == double)) {} +^ +fail_compilation/diag14818.d(42): Foo(T) if (is(T == int)) +template Foo(T) if (is(T == int)) {} +^ --- */ diff --git a/compiler/test/fail_compilation/diag14876.d b/compiler/test/fail_compilation/diag14876.d index 4beea9590014..977352cf27ab 100644 --- a/compiler/test/fail_compilation/diag14876.d +++ b/compiler/test/fail_compilation/diag14876.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/diag14876.d(17): Deprecation: class `diag14876.Dep` is deprecated -fail_compilation/diag14876.d(18): Deprecation: class `diag14876.Dep` is deprecated -fail_compilation/diag14876.d(19): Deprecation: class `diag14876.Dep` is deprecated -fail_compilation/diag14876.d(20): Deprecation: class `diag14876.Dep` is deprecated -fail_compilation/diag14876.d(21): Deprecation: class `diag14876.Dep` is deprecated -fail_compilation/diag14876.d(22): Deprecation: class `diag14876.Dep` is deprecated -fail_compilation/diag14876.d(23): Deprecation: class `diag14876.Dep` is deprecated -fail_compilation/diag14876.d(23): Error: can only slice type sequences, not `diag14876.Dep` +fail_compilation/diag14876.d(33): Deprecation: class `diag14876.Dep` is deprecated +alias X1 = Foo!(Dep[]); + ^ +fail_compilation/diag14876.d(34): Deprecation: class `diag14876.Dep` is deprecated +alias X2 = Foo!(Dep[1]); + ^ +fail_compilation/diag14876.d(35): Deprecation: class `diag14876.Dep` is deprecated +alias X3 = Foo!(Dep[int]); + ^ +fail_compilation/diag14876.d(36): Deprecation: class `diag14876.Dep` is deprecated +alias X4 = Foo!(int[Dep]); + ^ +fail_compilation/diag14876.d(37): Deprecation: class `diag14876.Dep` is deprecated +alias X5 = Foo!(Dep*); + ^ +fail_compilation/diag14876.d(38): Deprecation: class `diag14876.Dep` is deprecated +alias X6 = Foo!(Dep.Mem); + ^ +fail_compilation/diag14876.d(39): Deprecation: class `diag14876.Dep` is deprecated +alias X7 = Foo!(Dep[3..4]); + ^ +fail_compilation/diag14876.d(39): Error: can only slice type sequences, not `diag14876.Dep` +alias X7 = Foo!(Dep[3..4]); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15001.d b/compiler/test/fail_compilation/diag15001.d index 3763d7957357..b37bf001495b 100644 --- a/compiler/test/fail_compilation/diag15001.d +++ b/compiler/test/fail_compilation/diag15001.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15001.d(11): Error: undefined identifier `X` +fail_compilation/diag15001.d(13): Error: undefined identifier `X` + if (X x = 1) + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15186.d b/compiler/test/fail_compilation/diag15186.d index 70177f4169d1..2ac4d034f9d1 100644 --- a/compiler/test/fail_compilation/diag15186.d +++ b/compiler/test/fail_compilation/diag15186.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15186.d(14): Error: use `.` for member lookup, not `::` -fail_compilation/diag15186.d(15): Error: use `.` for member lookup, not `->` +fail_compilation/diag15186.d(18): Error: use `.` for member lookup, not `::` + S::x = 1; + ^ +fail_compilation/diag15186.d(19): Error: use `.` for member lookup, not `->` + s->y = 2; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15209.d b/compiler/test/fail_compilation/diag15209.d index bd6d723437e8..d4e17968ddf7 100644 --- a/compiler/test/fail_compilation/diag15209.d +++ b/compiler/test/fail_compilation/diag15209.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15209.d(18): Error: accessing non-static variable `x` requires an instance of `C1` -fail_compilation/diag15209.d(21): Error: accessing non-static variable `x` requires an instance of `S2` +fail_compilation/diag15209.d(22): Error: accessing non-static variable `x` requires an instance of `C1` + s1.y = 10; // invalid field variable access + ^ +fail_compilation/diag15209.d(25): Error: accessing non-static variable `x` requires an instance of `S2` + c2.y = 10; // invalid field variable access + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15235.d b/compiler/test/fail_compilation/diag15235.d index 7d9f00480458..c173b14cfdaa 100644 --- a/compiler/test/fail_compilation/diag15235.d +++ b/compiler/test/fail_compilation/diag15235.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15235.d(11): Error: cannot have two symbols in addressing mode +fail_compilation/diag15235.d(13): Error: cannot have two symbols in addressing mode + mov [EBX+EBX+EBX], EAX; // prints the same error message 20 times + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15340.d b/compiler/test/fail_compilation/diag15340.d index 89017043884d..4902ee092bda 100644 --- a/compiler/test/fail_compilation/diag15340.d +++ b/compiler/test/fail_compilation/diag15340.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15340.d(11): Error: undefined identifier `undef1` -fail_compilation/diag15340.d(12): Error: undefined identifier `undef2` +fail_compilation/diag15340.d(15): Error: undefined identifier `undef1` + auto a = undef1; + ^ +fail_compilation/diag15340.d(16): Error: undefined identifier `undef2` + auto b = undef2; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15411.d b/compiler/test/fail_compilation/diag15411.d index 8b18c19d0276..750baa1521fc 100644 --- a/compiler/test/fail_compilation/diag15411.d +++ b/compiler/test/fail_compilation/diag15411.d @@ -2,12 +2,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15411.d(17): Error: function `diag15411.test15411.__funcliteral2` cannot access variable `i` in frame of function `diag15411.test15411` -fail_compilation/diag15411.d(16): `i` declared here -fail_compilation/diag15411.d(18): Error: function `diag15411.test15411.__funcliteral4` cannot access variable `i` in frame of function `diag15411.test15411` -fail_compilation/diag15411.d(16): `i` declared here -fail_compilation/diag15411.d(26): Error: `static` function `diag15411.testNestedFunction.myFunc2` cannot access function `myFunc1` in frame of function `diag15411.testNestedFunction` -fail_compilation/diag15411.d(25): `myFunc1` declared here +fail_compilation/diag15411.d(29): Error: function `diag15411.test15411.__funcliteral2` cannot access variable `i` in frame of function `diag15411.test15411` + auto j = (function() { return i; })(); + ^ +fail_compilation/diag15411.d(28): `i` declared here + auto i = 0; + ^ +fail_compilation/diag15411.d(30): Error: function `diag15411.test15411.__funcliteral4` cannot access variable `i` in frame of function `diag15411.test15411` + auto f = function() { return i; }; + ^ +fail_compilation/diag15411.d(28): `i` declared here + auto i = 0; + ^ +fail_compilation/diag15411.d(38): Error: `static` function `diag15411.testNestedFunction.myFunc2` cannot access function `myFunc1` in frame of function `diag15411.testNestedFunction` + static void myFunc2 () { myFunc1(); } + ^ +fail_compilation/diag15411.d(37): `myFunc1` declared here + void myFunc1() { assert(i == 42); } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag1566.d b/compiler/test/fail_compilation/diag1566.d index 28ffc8d48d5b..2ee155726d4d 100644 --- a/compiler/test/fail_compilation/diag1566.d +++ b/compiler/test/fail_compilation/diag1566.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag1566.d(23): Error: multiple ! arguments are not allowed -fail_compilation/diag1566.d(24): Error: multiple ! arguments are not allowed -fail_compilation/diag1566.d(25): Error: multiple ! arguments are not allowed -fail_compilation/diag1566.d(26): Error: multiple ! arguments are not allowed -fail_compilation/diag1566.d(28): Error: multiple ! arguments are not allowed -fail_compilation/diag1566.d(29): Error: multiple ! arguments are not allowed +fail_compilation/diag1566.d(35): Error: multiple ! arguments are not allowed + static assert(is(long == T!(3)!('b'))); + ^ +fail_compilation/diag1566.d(36): Error: multiple ! arguments are not allowed + static assert(is(long == T! 3 ! 'b' )); + ^ +fail_compilation/diag1566.d(37): Error: multiple ! arguments are not allowed + static assert(is(long == T!(3)! 'b' )); + ^ +fail_compilation/diag1566.d(38): Error: multiple ! arguments are not allowed + static assert(is(long == T! 3 !('b'))); + ^ +fail_compilation/diag1566.d(40): Error: multiple ! arguments are not allowed + static assert(is(long == T!(3)! 'b' !"s")); + ^ +fail_compilation/diag1566.d(41): Error: multiple ! arguments are not allowed + static assert(is(long == T! 3 !('b')!"s")); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15669.d b/compiler/test/fail_compilation/diag15669.d index 682768528d28..f8f5bf4dc116 100644 --- a/compiler/test/fail_compilation/diag15669.d +++ b/compiler/test/fail_compilation/diag15669.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15669.d(14): Error: variable `__b_field_0` cannot be read at compile time +fail_compilation/diag15669.d(16): Error: variable `__b_field_0` cannot be read at compile time + a[b]; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15713.d b/compiler/test/fail_compilation/diag15713.d index 00713449a5fb..c694dceb5f37 100644 --- a/compiler/test/fail_compilation/diag15713.d +++ b/compiler/test/fail_compilation/diag15713.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15713.d(20): Error: no property `widthSign` for `this` of type `diag15713.WrData.Data` -fail_compilation/diag15713.d(16): struct `Data` defined here -fail_compilation/diag15713.d(40): Error: template instance `diag15713.conwritefImpl!("parse-int", "width", "\n", Data(null))` error instantiating -fail_compilation/diag15713.d(45): instantiated from here: `conwritefImpl!("main", "\n", Data(null))` -fail_compilation/diag15713.d(50): instantiated from here: `fdwritef!()` +fail_compilation/diag15713.d(30): Error: no property `widthSign` for `this` of type `diag15713.WrData.Data` + __traits(getMember, this, name ~ "Sign"); + ^ +fail_compilation/diag15713.d(26): struct `Data` defined here + struct Data + ^ +fail_compilation/diag15713.d(50): Error: template instance `diag15713.conwritefImpl!("parse-int", "width", "\n", Data(null))` error instantiating + enum conwritefImpl = conwritefImpl!("parse-int", "width", fmt, data); + ^ +fail_compilation/diag15713.d(55): instantiated from here: `conwritefImpl!("main", "\n", Data(null))` + conwritefImpl!("main", "\n", WrData(0, 0)); + ^ +fail_compilation/diag15713.d(60): instantiated from here: `fdwritef!()` + fdwritef(); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag15974.d b/compiler/test/fail_compilation/diag15974.d index 03f63f4c21a5..e594b1e79400 100644 --- a/compiler/test/fail_compilation/diag15974.d +++ b/compiler/test/fail_compilation/diag15974.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag15974.d(21): Error: variable `f` cannot be read at compile time -fail_compilation/diag15974.d(21): called from here: `format("%s", f)` -fail_compilation/diag15974.d(26): Error: variable `f` cannot be read at compile time -fail_compilation/diag15974.d(26): called from here: `format("%s", f)` +fail_compilation/diag15974.d(29): Error: variable `f` cannot be read at compile time + mixin(format("%s", f)); + ^ +fail_compilation/diag15974.d(29): called from here: `format("%s", f)` + mixin(format("%s", f)); + ^ +fail_compilation/diag15974.d(34): Error: variable `f` cannot be read at compile time + mixin(format("%s", f)); + ^ +fail_compilation/diag15974.d(34): called from here: `format("%s", f)` + mixin(format("%s", f)); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag16271.d b/compiler/test/fail_compilation/diag16271.d index 1677fafa0d39..1834eda2f257 100644 --- a/compiler/test/fail_compilation/diag16271.d +++ b/compiler/test/fail_compilation/diag16271.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag16271.d(10): Error: found `x` when expecting function literal following `ref` +fail_compilation/diag16271.d(12): Error: found `x` when expecting function literal following `ref` + auto fun = ref x; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag16499.d b/compiler/test/fail_compilation/diag16499.d index 63b4b3c52795..abde929d0de9 100644 --- a/compiler/test/fail_compilation/diag16499.d +++ b/compiler/test/fail_compilation/diag16499.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag16499.d(22): Error: incompatible types for `(2) in (foo)`: `int` and `A` -fail_compilation/diag16499.d(24): Error: incompatible types for `(1.0) in (bar)`: `double` and `B` +fail_compilation/diag16499.d(26): Error: incompatible types for `(2) in (foo)`: `int` and `A` + 2 in foo; + ^ +fail_compilation/diag16499.d(28): Error: incompatible types for `(1.0) in (bar)`: `double` and `B` + 1.0 in bar; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag16976.d b/compiler/test/fail_compilation/diag16976.d index 1dbacfd3e54a..d17c3821545d 100644 --- a/compiler/test/fail_compilation/diag16976.d +++ b/compiler/test/fail_compilation/diag16976.d @@ -1,37 +1,101 @@ /* TEST_OUTPUT: --- -fail_compilation/diag16976.d(44): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(45): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(46): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(47): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(48): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(49): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(50): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(51): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(52): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(53): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(54): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(55): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(56): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(57): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(58): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(59): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(65): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(66): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(67): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(68): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(69): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(70): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(71): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(72): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(73): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(74): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(75): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(76): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(77): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(78): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(79): Error: foreach: key cannot be of non-integral type `float` -fail_compilation/diag16976.d(80): Error: foreach: key cannot be of non-integral type `float` +fail_compilation/diag16976.d(108): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, i; dyn) {} + ^ +fail_compilation/diag16976.d(109): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, i; sta) {} + ^ +fail_compilation/diag16976.d(110): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, i; str) {} + ^ +fail_compilation/diag16976.d(111): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, i; chr) {} + ^ +fail_compilation/diag16976.d(112): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, dchar i; dyn) {} + ^ +fail_compilation/diag16976.d(113): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, dchar i; sta) {} + ^ +fail_compilation/diag16976.d(114): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, dchar i; str) {} + ^ +fail_compilation/diag16976.d(115): Error: foreach: key cannot be of non-integral type `float` + foreach(float f, dchar i; chr) {} + ^ +fail_compilation/diag16976.d(116): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, i; dyn) {} + ^ +fail_compilation/diag16976.d(117): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, i; sta) {} + ^ +fail_compilation/diag16976.d(118): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, i; str) {} + ^ +fail_compilation/diag16976.d(119): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, i; chr) {} + ^ +fail_compilation/diag16976.d(120): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, dchar i; dyn) {} + ^ +fail_compilation/diag16976.d(121): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, dchar i; sta) {} + ^ +fail_compilation/diag16976.d(122): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, dchar i; str) {} + ^ +fail_compilation/diag16976.d(123): Error: foreach: key cannot be of non-integral type `float` + foreach_reverse(float f, dchar i; chr) {} + ^ +fail_compilation/diag16976.d(129): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, i; idyn) {} + ^ +fail_compilation/diag16976.d(130): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, i; ista) {} + ^ +fail_compilation/diag16976.d(131): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, i; istr) {} + ^ +fail_compilation/diag16976.d(132): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, i; ichr) {} + ^ +fail_compilation/diag16976.d(133): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, dchar i; idyn) {} + ^ +fail_compilation/diag16976.d(134): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, dchar i; ista) {} + ^ +fail_compilation/diag16976.d(135): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, dchar i; istr) {} + ^ +fail_compilation/diag16976.d(136): Error: foreach: key cannot be of non-integral type `float` + static foreach(float f, dchar i; ichr) {} + ^ +fail_compilation/diag16976.d(137): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, i; idyn) {} + ^ +fail_compilation/diag16976.d(138): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, i; ista) {} + ^ +fail_compilation/diag16976.d(139): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, i; istr) {} + ^ +fail_compilation/diag16976.d(140): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, i; ichr) {} + ^ +fail_compilation/diag16976.d(141): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, dchar i; idyn) {} + ^ +fail_compilation/diag16976.d(142): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, dchar i; ista) {} + ^ +fail_compilation/diag16976.d(143): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, dchar i; istr) {} + ^ +fail_compilation/diag16976.d(144): Error: foreach: key cannot be of non-integral type `float` + static foreach_reverse(float f, dchar i; ichr) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/diag16977.d b/compiler/test/fail_compilation/diag16977.d index 7e2efd2bfa22..edd8cf16ed6e 100644 --- a/compiler/test/fail_compilation/diag16977.d +++ b/compiler/test/fail_compilation/diag16977.d @@ -1,15 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/diag16977.d(25): Error: undefined identifier `undefined`, did you mean function `undefinedId`? -fail_compilation/diag16977.d(26): Error: cannot implicitly convert expression `"\x01string"` of type `string` to `int` -fail_compilation/diag16977.d(27): Error: template `templ` is not callable using argument types `!()(int)` -fail_compilation/diag16977.d(20): Candidate is: `templ(S)(S s)` +fail_compilation/diag16977.d(37): Error: undefined identifier `undefined`, did you mean function `undefinedId`? + void undefinedId(int x, int y = undefined) {} + ^ +fail_compilation/diag16977.d(38): Error: cannot implicitly convert expression `"\x01string"` of type `string` to `int` + void badOp(int x, int y = 1 ~ "string") {} + ^ +fail_compilation/diag16977.d(39): Error: template `templ` is not callable using argument types `!()(int)` + void lazyTemplate(int x, lazy int y = 4.templ) {} + ^ +fail_compilation/diag16977.d(32): Candidate is: `templ(S)(S s)` with `S = int` must satisfy the following constraint: ` false` -fail_compilation/diag16977.d(28): Error: cannot implicitly convert expression `5` of type `int` to `string` -fail_compilation/diag16977.d(30): Error: template instance `diag16977.test.funcTemplate!string` error instantiating +string templ(S)(S s) if(false) { return null; } + ^ +fail_compilation/diag16977.d(40): Error: cannot implicitly convert expression `5` of type `int` to `string` + void funcTemplate(T)(T y = 5) {} + ^ +fail_compilation/diag16977.d(42): Error: template instance `diag16977.test.funcTemplate!string` error instantiating + funcTemplate!string(); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag1730.d b/compiler/test/fail_compilation/diag1730.d index 0ab51422ba1c..3965eceb5d16 100644 --- a/compiler/test/fail_compilation/diag1730.d +++ b/compiler/test/fail_compilation/diag1730.d @@ -1,41 +1,111 @@ /* TEST_OUTPUT: --- -fail_compilation/diag1730.d(51): Error: mutable method `diag1730.S.func` is not callable using a `inout` object -fail_compilation/diag1730.d(43): Consider adding `const` or `inout` here -fail_compilation/diag1730.d(53): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `inout` object -fail_compilation/diag1730.d(54): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a non-shared `inout` object -fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here -fail_compilation/diag1730.d(55): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared `inout` object -fail_compilation/diag1730.d(70): Error: `immutable` method `diag1730.S.iFunc` is not callable using a mutable object -fail_compilation/diag1730.d(71): Error: `shared` method `diag1730.S.sFunc` is not callable using a non-shared object -fail_compilation/diag1730.d(72): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared mutable object -fail_compilation/diag1730.d(75): Error: mutable method `diag1730.S.func` is not callable using a `const` object -fail_compilation/diag1730.d(43): Consider adding `const` or `inout` here -fail_compilation/diag1730.d(77): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `const` object -fail_compilation/diag1730.d(78): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a non-shared `const` object -fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here -fail_compilation/diag1730.d(79): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared `const` object -fail_compilation/diag1730.d(82): Error: mutable method `diag1730.S.func` is not callable using a `immutable` object -fail_compilation/diag1730.d(43): Consider adding `const` or `inout` here -fail_compilation/diag1730.d(85): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a `immutable` object -fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here -fail_compilation/diag1730.d(89): Error: non-shared method `diag1730.S.func` is not callable using a `shared` object -fail_compilation/diag1730.d(43): Consider adding `shared` here -fail_compilation/diag1730.d(90): Error: non-shared `const` method `diag1730.S.cFunc` is not callable using a `shared` mutable object -fail_compilation/diag1730.d(44): Consider adding `shared` here -fail_compilation/diag1730.d(91): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `shared` mutable object -fail_compilation/diag1730.d(94): Error: non-shared `inout` method `diag1730.S.wFunc` is not callable using a `shared` mutable object -fail_compilation/diag1730.d(48): Consider adding `shared` here -fail_compilation/diag1730.d(96): Error: non-shared mutable method `diag1730.S.func` is not callable using a `shared` `const` object -fail_compilation/diag1730.d(43): Consider adding `shared` here -fail_compilation/diag1730.d(97): Error: non-shared `const` method `diag1730.S.cFunc` is not callable using a `shared` `const` object -fail_compilation/diag1730.d(44): Consider adding `shared` here -fail_compilation/diag1730.d(98): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `shared` `const` object -fail_compilation/diag1730.d(99): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a `shared` `const` object -fail_compilation/diag1730.d(46): Consider adding `const` or `inout` here -fail_compilation/diag1730.d(101): Error: non-shared `inout` method `diag1730.S.wFunc` is not callable using a `shared` `const` object -fail_compilation/diag1730.d(48): Consider adding `shared` here +fail_compilation/diag1730.d(121): Error: mutable method `diag1730.S.func` is not callable using a `inout` object + s.func(); // ng + ^ +fail_compilation/diag1730.d(113): Consider adding `const` or `inout` here + void func() { } + ^ +fail_compilation/diag1730.d(123): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `inout` object + s.iFunc(); // ng + ^ +fail_compilation/diag1730.d(124): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a non-shared `inout` object + s.sFunc(); // ng + ^ +fail_compilation/diag1730.d(116): Consider adding `const` or `inout` here + void sFunc() shared { } + ^ +fail_compilation/diag1730.d(125): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared `inout` object + s.scFunc(); // ng + ^ +fail_compilation/diag1730.d(140): Error: `immutable` method `diag1730.S.iFunc` is not callable using a mutable object + obj.iFunc(); // ng + ^ +fail_compilation/diag1730.d(141): Error: `shared` method `diag1730.S.sFunc` is not callable using a non-shared object + obj.sFunc(); // ng + ^ +fail_compilation/diag1730.d(142): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared mutable object + obj.scFunc(); // ng + ^ +fail_compilation/diag1730.d(145): Error: mutable method `diag1730.S.func` is not callable using a `const` object + cObj.func(); // ng + ^ +fail_compilation/diag1730.d(113): Consider adding `const` or `inout` here + void func() { } + ^ +fail_compilation/diag1730.d(147): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `const` object + cObj.iFunc(); // ng + ^ +fail_compilation/diag1730.d(148): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a non-shared `const` object + cObj.sFunc(); // ng + ^ +fail_compilation/diag1730.d(116): Consider adding `const` or `inout` here + void sFunc() shared { } + ^ +fail_compilation/diag1730.d(149): Error: `shared` `const` method `diag1730.S.scFunc` is not callable using a non-shared `const` object + cObj.scFunc(); // ng + ^ +fail_compilation/diag1730.d(152): Error: mutable method `diag1730.S.func` is not callable using a `immutable` object + iObj.func(); // ng + ^ +fail_compilation/diag1730.d(113): Consider adding `const` or `inout` here + void func() { } + ^ +fail_compilation/diag1730.d(155): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a `immutable` object + iObj.sFunc(); // ng + ^ +fail_compilation/diag1730.d(116): Consider adding `const` or `inout` here + void sFunc() shared { } + ^ +fail_compilation/diag1730.d(159): Error: non-shared method `diag1730.S.func` is not callable using a `shared` object + sObj.func(); // ng + ^ +fail_compilation/diag1730.d(113): Consider adding `shared` here + void func() { } + ^ +fail_compilation/diag1730.d(160): Error: non-shared `const` method `diag1730.S.cFunc` is not callable using a `shared` mutable object + sObj.cFunc(); // ng + ^ +fail_compilation/diag1730.d(114): Consider adding `shared` here + void cFunc() const { } + ^ +fail_compilation/diag1730.d(161): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `shared` mutable object + sObj.iFunc(); // ng + ^ +fail_compilation/diag1730.d(164): Error: non-shared `inout` method `diag1730.S.wFunc` is not callable using a `shared` mutable object + sObj.wFunc(); // ng + ^ +fail_compilation/diag1730.d(118): Consider adding `shared` here + void wFunc() inout { } + ^ +fail_compilation/diag1730.d(166): Error: non-shared mutable method `diag1730.S.func` is not callable using a `shared` `const` object + scObj.func(); // ng + ^ +fail_compilation/diag1730.d(113): Consider adding `shared` here + void func() { } + ^ +fail_compilation/diag1730.d(167): Error: non-shared `const` method `diag1730.S.cFunc` is not callable using a `shared` `const` object + scObj.cFunc(); // ng + ^ +fail_compilation/diag1730.d(114): Consider adding `shared` here + void cFunc() const { } + ^ +fail_compilation/diag1730.d(168): Error: `immutable` method `diag1730.S.iFunc` is not callable using a `shared` `const` object + scObj.iFunc(); // ng + ^ +fail_compilation/diag1730.d(169): Error: `shared` mutable method `diag1730.S.sFunc` is not callable using a `shared` `const` object + scObj.sFunc(); // ng + ^ +fail_compilation/diag1730.d(116): Consider adding `const` or `inout` here + void sFunc() shared { } + ^ +fail_compilation/diag1730.d(171): Error: non-shared `inout` method `diag1730.S.wFunc` is not callable using a `shared` `const` object + scObj.wFunc(); // ng + ^ +fail_compilation/diag1730.d(118): Consider adding `shared` here + void wFunc() inout { } + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/diag18460.d b/compiler/test/fail_compilation/diag18460.d index 148b64be468f..ac0b962edac3 100644 --- a/compiler/test/fail_compilation/diag18460.d +++ b/compiler/test/fail_compilation/diag18460.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag18460.d(12): Error: no property `opCall` for type `diag18460.Foo`, did you mean `new Foo`? +fail_compilation/diag18460.d(14): Error: no property `opCall` for type `diag18460.Foo`, did you mean `new Foo`? + auto f = Foo(); + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=18460 diff --git a/compiler/test/fail_compilation/diag18574.d b/compiler/test/fail_compilation/diag18574.d index f051d075da24..c2a9bb032a22 100644 --- a/compiler/test/fail_compilation/diag18574.d +++ b/compiler/test/fail_compilation/diag18574.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/diag18574.d(16): Error: `diag18574.Test`: multiple class inheritance is not supported. Use multiple interface inheritance and/or composition. -fail_compilation/diag18574.d(16): `diag18574.Bar` has no fields, consider making it an `interface` -fail_compilation/diag18574.d(16): `diag18574.Baz` has fields, consider making it a member of `diag18574.Test` -fail_compilation/diag18574.d(16): Error: `diag18574.Test`: base type must be `interface`, not `int` +fail_compilation/diag18574.d(20): Error: `diag18574.Test`: multiple class inheritance is not supported. Use multiple interface inheritance and/or composition. +class Test : Foo, Bar, Baz, int {} +^ +fail_compilation/diag18574.d(20): `diag18574.Bar` has no fields, consider making it an `interface` +fail_compilation/diag18574.d(20): `diag18574.Baz` has fields, consider making it a member of `diag18574.Test` +fail_compilation/diag18574.d(20): Error: `diag18574.Test`: base type must be `interface`, not `int` +class Test : Foo, Bar, Baz, int {} +^ --- */ // https://issues.dlang.org/show_bug.cgi?id=18574 diff --git a/compiler/test/fail_compilation/diag19022.d b/compiler/test/fail_compilation/diag19022.d index 0aa26f537947..9c8ea6053504 100644 --- a/compiler/test/fail_compilation/diag19022.d +++ b/compiler/test/fail_compilation/diag19022.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag19022.d(16): Error: immutable field `b` initialized multiple times -fail_compilation/diag19022.d(15): Previous initialization is here. +fail_compilation/diag19022.d(20): Error: immutable field `b` initialized multiple times + b = 2; + ^ +fail_compilation/diag19022.d(19): Previous initialization is here. + b = 2; + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=19022 diff --git a/compiler/test/fail_compilation/diag19196.d b/compiler/test/fail_compilation/diag19196.d index 857f9a4b5325..9a0158c11aa2 100644 --- a/compiler/test/fail_compilation/diag19196.d +++ b/compiler/test/fail_compilation/diag19196.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag19196.d(11): Error: unable to determine fields of `B` because of forward references -fail_compilation/diag19196.d(15): Error: template instance `diag19196.Foo!(B)` error instantiating +fail_compilation/diag19196.d(15): Error: unable to determine fields of `B` because of forward references + alias F = typeof(T.tupleof); + ^ +fail_compilation/diag19196.d(19): Error: template instance `diag19196.Foo!(B)` error instantiating + Foo!B b; + ^ --- */ module diag19196; diff --git a/compiler/test/fail_compilation/diag19225.d b/compiler/test/fail_compilation/diag19225.d index a43a7e10e07a..30449f55ccec 100644 --- a/compiler/test/fail_compilation/diag19225.d +++ b/compiler/test/fail_compilation/diag19225.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/diag19225.d(14): Error: basic type expected, not `else` -fail_compilation/diag19225.d(14): There's no `static else`, use `else` instead. -fail_compilation/diag19225.d(14): Error: found `else` without a corresponding `if`, `version` or `debug` statement -fail_compilation/diag19225.d(15): Error: unmatched closing brace +fail_compilation/diag19225.d(18): Error: basic type expected, not `else` + static else {} + ^ +fail_compilation/diag19225.d(18): There's no `static else`, use `else` instead. +fail_compilation/diag19225.d(18): Error: found `else` without a corresponding `if`, `version` or `debug` statement + static else {} + ^ +fail_compilation/diag19225.d(19): Error: unmatched closing brace --- */ diff --git a/compiler/test/fail_compilation/diag20059.d b/compiler/test/fail_compilation/diag20059.d index 2c8063a24301..3157ce38ec82 100644 --- a/compiler/test/fail_compilation/diag20059.d +++ b/compiler/test/fail_compilation/diag20059.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag20059.d(15): Error: expected return type of `string`, not `string[]`: -fail_compilation/diag20059.d(13): Return type of `string` inferred here. +fail_compilation/diag20059.d(19): Error: expected return type of `string`, not `string[]`: + return [ret]; + ^ +fail_compilation/diag20059.d(17): Return type of `string` inferred here. + return ret; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag20268.d b/compiler/test/fail_compilation/diag20268.d index 065349026700..f6ff8d2544d5 100644 --- a/compiler/test/fail_compilation/diag20268.d +++ b/compiler/test/fail_compilation/diag20268.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag20268.d(12): Error: template `__lambda4` is not callable using argument types `!()(int)` -fail_compilation/diag20268.d(11): Candidate is: `__lambda4(__T1, __T2)(x, y)` +fail_compilation/diag20268.d(16): Error: template `__lambda4` is not callable using argument types `!()(int)` +auto x = f(1); + ^ +fail_compilation/diag20268.d(15): Candidate is: `__lambda4(__T1, __T2)(x, y)` +alias f = (x,y) => true; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag20518.d b/compiler/test/fail_compilation/diag20518.d index eb0a9328ad6d..3a65952b0ce6 100644 --- a/compiler/test/fail_compilation/diag20518.d +++ b/compiler/test/fail_compilation/diag20518.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag20518.d(11): Error: module `diag20518a` from file fail_compilation/imports/diag20518a.d conflicts with package `imports.diag20518a` +fail_compilation/diag20518.d(13): Error: module `diag20518a` from file fail_compilation/imports/diag20518a.d conflicts with package `imports.diag20518a` +import imports.diag20518a; // if 'imports/diag20518a.d' exists it will conflict with it. + ^ --- */ diff --git a/compiler/test/fail_compilation/diag21883.d b/compiler/test/fail_compilation/diag21883.d index 4823167ee584..703a8a3cb51c 100644 --- a/compiler/test/fail_compilation/diag21883.d +++ b/compiler/test/fail_compilation/diag21883.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag21883.d(15): Error: `diag21883.ClassB`: base class must be specified first, before any interfaces. +fail_compilation/diag21883.d(17): Error: `diag21883.ClassB`: base class must be specified first, before any interfaces. +class ClassB: InterfaceA, ClassA { +^ --- */ // https://issues.dlang.org/show_bug.cgi?id=21883 diff --git a/compiler/test/fail_compilation/diag23295.d b/compiler/test/fail_compilation/diag23295.d index a0bfe883966f..da925d48c8f1 100644 --- a/compiler/test/fail_compilation/diag23295.d +++ b/compiler/test/fail_compilation/diag23295.d @@ -2,11 +2,21 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/diag23295.d(21): Error: scope variable `x` assigned to non-scope parameter `y` calling `foo` -fail_compilation/diag23295.d(32): which is assigned to non-scope parameter `z` -fail_compilation/diag23295.d(34): which is not `scope` because of `f = & z` -fail_compilation/diag23295.d(24): Error: scope variable `ex` assigned to non-scope parameter `e` calling `thro` -fail_compilation/diag23295.d(39): which is not `scope` because of `throw e` +fail_compilation/diag23295.d(31): Error: scope variable `x` assigned to non-scope parameter `y` calling `foo` + foo(x, null); + ^ +fail_compilation/diag23295.d(42): which is assigned to non-scope parameter `z` +auto fooImpl(int* z, int** w) + ^ +fail_compilation/diag23295.d(44): which is not `scope` because of `f = & z` + auto f = &z; + ^ +fail_compilation/diag23295.d(34): Error: scope variable `ex` assigned to non-scope parameter `e` calling `thro` + thro(ex); + ^ +fail_compilation/diag23295.d(49): which is not `scope` because of `throw e` + throw e; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag23355.d b/compiler/test/fail_compilation/diag23355.d index c21226fa85ef..da9d08d908f1 100644 --- a/compiler/test/fail_compilation/diag23355.d +++ b/compiler/test/fail_compilation/diag23355.d @@ -3,10 +3,18 @@ TEST_OUTPUT: --- fail_compilation/diag23355.d(1): Error: undefined identifier `n` fail_compilation/diag23355.d(4): Error: template `ffi1` is not callable using argument types `!()(int[4])` +fail_compilation/diag23355.d(1): Error: undefined identifier `n` + ^ fail_compilation/diag23355.d(1): Candidate is: `ffi1(T)(T[n] s)` fail_compilation/diag23355.d(2): Error: undefined identifier `n` +TEST_OUTPUT: + ^ fail_compilation/diag23355.d(4): Error: template `ffi2` is not callable using argument types `!()(int[4])` +fail_compilation/diag23355.d(1): Error: undefined identifier `n` + ^ fail_compilation/diag23355.d(2): Candidate is: `ffi2()(T[n] s)` +TEST_OUTPUT: + ^ --- */ #line 1 diff --git a/compiler/test/fail_compilation/diag23384.d b/compiler/test/fail_compilation/diag23384.d index 1fa4da5ffb9e..3cc69d5cf787 100644 --- a/compiler/test/fail_compilation/diag23384.d +++ b/compiler/test/fail_compilation/diag23384.d @@ -3,9 +3,11 @@ /* TEST_OUTPUT: --- -fail_compilation/diag23384.d(28): Error: function `diag23384.Derived.fun(B b)` is not callable using argument types `(A)` -fail_compilation/diag23384.d(28): function `diag23384.Derived.fun` hides base class function `diag23384.Base.fun` -fail_compilation/diag23384.d(28): add `alias fun = diag23384.Base.fun` to `diag23384.Derived`'s body to merge the overload sets +fail_compilation/diag23384.d(30): Error: function `diag23384.Derived.fun(B b)` is not callable using argument types `(A)` + d.fun(A()); + ^ +fail_compilation/diag23384.d(30): function `diag23384.Derived.fun` hides base class function `diag23384.Base.fun` +fail_compilation/diag23384.d(30): add `alias fun = diag23384.Base.fun` to `diag23384.Derived`'s body to merge the overload sets --- */ diff --git a/compiler/test/fail_compilation/diag2452.d b/compiler/test/fail_compilation/diag2452.d index e68e21746c63..ad79d3ee18fa 100644 --- a/compiler/test/fail_compilation/diag2452.d +++ b/compiler/test/fail_compilation/diag2452.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag2452.d(14): Error: class `diag2452.C` interface function `void f(float p)` is not implemented +fail_compilation/diag2452.d(16): Error: class `diag2452.C` interface function `void f(float p)` is not implemented +class C : I +^ --- */ diff --git a/compiler/test/fail_compilation/diag24812.d b/compiler/test/fail_compilation/diag24812.d index 626f47ebf010..fbd8fcbf0f54 100644 --- a/compiler/test/fail_compilation/diag24812.d +++ b/compiler/test/fail_compilation/diag24812.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag24812.d(7): Error: enum `diag24812.Foo` enum `Foo` must have at least one member +fail_compilation/diag24812.d(9): Error: enum `diag24812.Foo` enum `Foo` must have at least one member +enum Foo {} +^ --- */ enum Foo {} diff --git a/compiler/test/fail_compilation/diag3013.d b/compiler/test/fail_compilation/diag3013.d index 41c98b0c5198..9be4fe45b645 100644 --- a/compiler/test/fail_compilation/diag3013.d +++ b/compiler/test/fail_compilation/diag3013.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag3013.d(11): Error: cannot pass type `string` as a function argument +fail_compilation/diag3013.d(13): Error: cannot pass type `string` as a function argument + int s = string.format("abc", "def"); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag3438.d b/compiler/test/fail_compilation/diag3438.d index 0e4fb8b076f7..0c2c0a0607ca 100644 --- a/compiler/test/fail_compilation/diag3438.d +++ b/compiler/test/fail_compilation/diag3438.d @@ -1,13 +1,23 @@ /* TEST_OUTPUT: --- -fail_compilation/diag3438.d(16): Error: constructor `diag3438.F1.this` all parameters have default arguments, but structs cannot have default constructors. -fail_compilation/diag3438.d(17): Error: constructor `diag3438.F2.this` all parameters have default arguments, but structs cannot have default constructors. -fail_compilation/diag3438.d(20): Error: constructor `diag3438.F5.this` is marked `@disable`, so it cannot have default arguments for all parameters. -fail_compilation/diag3438.d(20): Use `@disable this();` if you want to disable default initialization. -fail_compilation/diag3438.d(21): Error: constructor `diag3438.F6.this` is marked `@disable`, so it cannot have default arguments for all parameters. -fail_compilation/diag3438.d(21): Use `@disable this();` if you want to disable default initialization. -fail_compilation/diag3438.d(22): Error: constructor `diag3438.F7.this` all parameters have default arguments, but structs cannot have default constructors. +fail_compilation/diag3438.d(26): Error: constructor `diag3438.F1.this` all parameters have default arguments, but structs cannot have default constructors. +struct F1 { this(int x = 1) { } } + ^ +fail_compilation/diag3438.d(27): Error: constructor `diag3438.F2.this` all parameters have default arguments, but structs cannot have default constructors. +struct F2 { this(int x = 1, ...) { } } + ^ +fail_compilation/diag3438.d(30): Error: constructor `diag3438.F5.this` is marked `@disable`, so it cannot have default arguments for all parameters. +struct F5 { @disable this(int x = 1); } + ^ +fail_compilation/diag3438.d(30): Use `@disable this();` if you want to disable default initialization. +fail_compilation/diag3438.d(31): Error: constructor `diag3438.F6.this` is marked `@disable`, so it cannot have default arguments for all parameters. +struct F6 { @disable this(int x = 1) { } } + ^ +fail_compilation/diag3438.d(31): Use `@disable this();` if you want to disable default initialization. +fail_compilation/diag3438.d(32): Error: constructor `diag3438.F7.this` all parameters have default arguments, but structs cannot have default constructors. +struct F7 { this(int x = 1, int y = 2) { } } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag3672.d b/compiler/test/fail_compilation/diag3672.d index 41b1415f27ee..406aa47a9ab3 100644 --- a/compiler/test/fail_compilation/diag3672.d +++ b/compiler/test/fail_compilation/diag3672.d @@ -4,45 +4,81 @@ TEST_OUTPUT: --- fail_compilation/diag3672.d(8): Error: read-modify-write operations are not allowed for `shared` variables fail_compilation/diag3672.d(8): Use `core.atomic.atomicOp!"+="(x, 1)` instead + ^ +fail_compilation/diag3672.d(8): Use `core.atomic.atomicOp!"+="(x, 1)` instead +fail_compilation/diag3672.d(9): Error: read-modify-write operations are not allowed for `shared` variables fail_compilation/diag3672.d(9): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(9): Use `core.atomic.atomicOp!"+="(x, 1)` instead fail_compilation/diag3672.d(10): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(9): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(10): Use `core.atomic.atomicOp!"-="(x, 1)` instead fail_compilation/diag3672.d(11): Error: read-modify-write operations are not allowed for `shared` variables fail_compilation/diag3672.d(11): Use `core.atomic.atomicOp!"-="(x, 1)` instead fail_compilation/diag3672.d(12): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(9): Use `core.atomic.atomicOp!"+="(x, 1)` instead + ^ fail_compilation/diag3672.d(12): Use `core.atomic.atomicOp!"+="(x, 1)` instead fail_compilation/diag3672.d(13): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(10): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(13): Use `core.atomic.atomicOp!"+="(x, 2)` instead fail_compilation/diag3672.d(14): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(9): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(14): Use `core.atomic.atomicOp!"-="(x, 3)` instead fail_compilation/diag3672.d(15): Error: read-modify-write operations are not allowed for `shared` variables + ^ + ^ fail_compilation/diag3672.d(15): Use `core.atomic.atomicOp!"|="(x, y)` instead fail_compilation/diag3672.d(16): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(10): Use `core.atomic.atomicOp!"-="(x, 1)` instead + ^ fail_compilation/diag3672.d(16): Use `core.atomic.atomicOp!"*="(x, y)` instead fail_compilation/diag3672.d(17): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(11): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(17): Use `core.atomic.atomicOp!"/="(x, y)` instead fail_compilation/diag3672.d(18): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(11): Use `core.atomic.atomicOp!"-="(x, 1)` instead + ^ fail_compilation/diag3672.d(18): Use `core.atomic.atomicOp!"%="(x, y)` instead fail_compilation/diag3672.d(19): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(12): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(19): Use `core.atomic.atomicOp!"&="(x, y)` instead fail_compilation/diag3672.d(20): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(9): Use `core.atomic.atomicOp!"+="(x, 1)` instead + ^ fail_compilation/diag3672.d(20): Use `core.atomic.atomicOp!"^="(x, y)` instead fail_compilation/diag3672.d(21): Error: read-modify-write operations are not allowed for `shared` variables fail_compilation/diag3672.d(21): Use `core.atomic.atomicOp!"<<="(x, y)` instead fail_compilation/diag3672.d(22): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(12): Use `core.atomic.atomicOp!"+="(x, 1)` instead + ^ fail_compilation/diag3672.d(22): Use `core.atomic.atomicOp!">>="(x, y)` instead fail_compilation/diag3672.d(23): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(13): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(23): Use `core.atomic.atomicOp!">>>="(x, y)` instead fail_compilation/diag3672.d(24): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(10): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(24): Use `core.atomic.atomicOp!"^^="(x, y)` instead fail_compilation/diag3672.d(25): Error: read-modify-write operations are not allowed for `shared` variables fail_compilation/diag3672.d(25): Use `core.atomic.atomicOp!"+="(ptr, 1)` instead fail_compilation/diag3672.d(26): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(13): Use `core.atomic.atomicOp!"+="(x, 2)` instead + ^ fail_compilation/diag3672.d(26): Use `core.atomic.atomicOp!"+="(ptr, 1)` instead fail_compilation/diag3672.d(27): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(14): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(27): Use `core.atomic.atomicOp!"-="(ptr, 1)` instead fail_compilation/diag3672.d(28): Error: read-modify-write operations are not allowed for `shared` variables +fail_compilation/diag3672.d(9): Error: read-modify-write operations are not allowed for `shared` variables + ^ fail_compilation/diag3672.d(28): Use `core.atomic.atomicOp!"-="(ptr, 1)` instead --- */ diff --git a/compiler/test/fail_compilation/diag3673.d b/compiler/test/fail_compilation/diag3673.d index a2e30912333f..f3eed4906f20 100644 --- a/compiler/test/fail_compilation/diag3673.d +++ b/compiler/test/fail_compilation/diag3673.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag3673.d(9): Error: template constraints appear both before and after BaseClassList, put them before +fail_compilation/diag3673.d(11): Error: template constraints appear both before and after BaseClassList, put them before +class B(T) if(false) : A if (true) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag3869.d b/compiler/test/fail_compilation/diag3869.d index 6cb92c44c38f..aff653bfda07 100644 --- a/compiler/test/fail_compilation/diag3869.d +++ b/compiler/test/fail_compilation/diag3869.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag3869.d(10): Error: template instance `diag3869.sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!int))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))` recursive expansion +fail_compilation/diag3869.d(12): Error: template instance `diag3869.sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!(sum!int))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))` recursive expansion + auto blah(int a) { return .sum!(sum)(); } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag3913.d b/compiler/test/fail_compilation/diag3913.d index 41c08b0a76ee..da1c3ab095e2 100644 --- a/compiler/test/fail_compilation/diag3913.d +++ b/compiler/test/fail_compilation/diag3913.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag3913.d(14): Error: no property `foobardoo` for type `Foo` -fail_compilation/diag3913.d(13): enum `Foo` defined here -fail_compilation/diag3913.d(15): Error: no property `secon` for type `Foo`. Did you mean `Foo.second` ? -fail_compilation/diag3913.d(13): enum `Foo` defined here +fail_compilation/diag3913.d(22): Error: no property `foobardoo` for type `Foo` + auto a = Foo.foobardoo; + ^ +fail_compilation/diag3913.d(21): enum `Foo` defined here + enum Foo { first, second } + ^ +fail_compilation/diag3913.d(23): Error: no property `secon` for type `Foo`. Did you mean `Foo.second` ? + auto b = Foo.secon; + ^ +fail_compilation/diag3913.d(21): enum `Foo` defined here + enum Foo { first, second } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag4479.d b/compiler/test/fail_compilation/diag4479.d index 7ce9bd896731..85f355f36125 100644 --- a/compiler/test/fail_compilation/diag4479.d +++ b/compiler/test/fail_compilation/diag4479.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag4479.d(10): Error: module `imports.fail4479mod` from file fail_compilation/imports/fail4479.d must be imported with 'import imports.fail4479mod;' +fail_compilation/diag4479.d(12): Error: module `imports.fail4479mod` from file fail_compilation/imports/fail4479.d must be imported with 'import imports.fail4479mod;' +import imports.fail4479; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag4528.d b/compiler/test/fail_compilation/diag4528.d index ab7b2cf0fc74..5480cebbc23f 100644 --- a/compiler/test/fail_compilation/diag4528.d +++ b/compiler/test/fail_compilation/diag4528.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/diag4528.d(14): Error: function `diag4528.Foo.pva` `private` functions cannot be `abstract` -fail_compilation/diag4528.d(15): Error: function `diag4528.Foo.pka` `package` functions cannot be `abstract` -fail_compilation/diag4528.d(16): Error: function `diag4528.Foo.pvsa` `static` functions cannot be `abstract` -fail_compilation/diag4528.d(17): Error: function `diag4528.Foo.pksa` `static` functions cannot be `abstract` -fail_compilation/diag4528.d(18): Error: function `diag4528.Foo.pbsa` `static` functions cannot be `abstract` +fail_compilation/diag4528.d(24): Error: function `diag4528.Foo.pva` `private` functions cannot be `abstract` + private abstract void pva(); + ^ +fail_compilation/diag4528.d(25): Error: function `diag4528.Foo.pka` `package` functions cannot be `abstract` + package abstract void pka(); + ^ +fail_compilation/diag4528.d(26): Error: function `diag4528.Foo.pvsa` `static` functions cannot be `abstract` + private static abstract void pvsa(); + ^ +fail_compilation/diag4528.d(27): Error: function `diag4528.Foo.pksa` `static` functions cannot be `abstract` + package static abstract void pksa(); + ^ +fail_compilation/diag4528.d(28): Error: function `diag4528.Foo.pbsa` `static` functions cannot be `abstract` + public static abstract void pbsa(); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag4540.d b/compiler/test/fail_compilation/diag4540.d index f26e231b0685..2e1db221de63 100644 --- a/compiler/test/fail_compilation/diag4540.d +++ b/compiler/test/fail_compilation/diag4540.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag4540.d(11): Error: `x` must be of integral or string type, it is a `float` +fail_compilation/diag4540.d(13): Error: `x` must be of integral or string type, it is a `float` + switch (x) + ^ --- */ diff --git a/compiler/test/fail_compilation/diag4596.d b/compiler/test/fail_compilation/diag4596.d index d43342bdc581..8a5f86eb4f12 100644 --- a/compiler/test/fail_compilation/diag4596.d +++ b/compiler/test/fail_compilation/diag4596.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag4596.d(15): Error: cannot modify expression `this` because it is not an lvalue -fail_compilation/diag4596.d(16): Error: conditional expression `1 ? this : this` is not a modifiable lvalue -fail_compilation/diag4596.d(18): Error: cannot modify expression `super` because it is not an lvalue -fail_compilation/diag4596.d(19): Error: conditional expression `1 ? super : super` is not a modifiable lvalue +fail_compilation/diag4596.d(23): Error: cannot modify expression `this` because it is not an lvalue + this = new NoGo4596; + ^ +fail_compilation/diag4596.d(24): Error: conditional expression `1 ? this : this` is not a modifiable lvalue + (1?this:this) = new NoGo4596; + ^ +fail_compilation/diag4596.d(26): Error: cannot modify expression `super` because it is not an lvalue + super = new Object; + ^ +fail_compilation/diag4596.d(27): Error: conditional expression `1 ? super : super` is not a modifiable lvalue + (1?super:super) = new Object; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag5385.d b/compiler/test/fail_compilation/diag5385.d index 368fdfff5293..2bdf8c8722d0 100644 --- a/compiler/test/fail_compilation/diag5385.d +++ b/compiler/test/fail_compilation/diag5385.d @@ -2,22 +2,54 @@ EXTRA_FILES: imports/fail5385.d TEST_OUTPUT: --- -fail_compilation/diag5385.d(28): Error: no property `privX` for type `imports.fail5385.C` +fail_compilation/diag5385.d(60): Error: no property `privX` for type `imports.fail5385.C` + C.privX = 1; + ^ fail_compilation/imports/fail5385.d(3): class `C` defined here -fail_compilation/diag5385.d(29): Error: no property `packX` for type `imports.fail5385.C` +class C +^ +fail_compilation/diag5385.d(61): Error: no property `packX` for type `imports.fail5385.C` + C.packX = 1; + ^ fail_compilation/imports/fail5385.d(3): class `C` defined here -fail_compilation/diag5385.d(30): Error: no property `privX2` for type `imports.fail5385.C` +class C +^ +fail_compilation/diag5385.d(62): Error: no property `privX2` for type `imports.fail5385.C` + C.privX2 = 1; + ^ fail_compilation/imports/fail5385.d(3): class `C` defined here -fail_compilation/diag5385.d(31): Error: no property `packX2` for type `imports.fail5385.C` +class C +^ +fail_compilation/diag5385.d(63): Error: no property `packX2` for type `imports.fail5385.C` + C.packX2 = 1; + ^ fail_compilation/imports/fail5385.d(3): class `C` defined here -fail_compilation/diag5385.d(32): Error: no property `privX` for type `imports.fail5385.S` +class C +^ +fail_compilation/diag5385.d(64): Error: no property `privX` for type `imports.fail5385.S` + S.privX = 1; + ^ fail_compilation/imports/fail5385.d(11): struct `S` defined here -fail_compilation/diag5385.d(33): Error: no property `packX` for type `imports.fail5385.S` +struct S +^ +fail_compilation/diag5385.d(65): Error: no property `packX` for type `imports.fail5385.S` + S.packX = 1; + ^ fail_compilation/imports/fail5385.d(11): struct `S` defined here -fail_compilation/diag5385.d(34): Error: no property `privX2` for type `imports.fail5385.S` +struct S +^ +fail_compilation/diag5385.d(66): Error: no property `privX2` for type `imports.fail5385.S` + S.privX2 = 1; + ^ fail_compilation/imports/fail5385.d(11): struct `S` defined here -fail_compilation/diag5385.d(35): Error: no property `packX2` for type `imports.fail5385.S` +struct S +^ +fail_compilation/diag5385.d(67): Error: no property `packX2` for type `imports.fail5385.S` + S.packX2 = 1; + ^ fail_compilation/imports/fail5385.d(11): struct `S` defined here +struct S +^ --- */ diff --git a/compiler/test/fail_compilation/diag5450.d b/compiler/test/fail_compilation/diag5450.d index f544240d4979..1d2a6ccb6896 100644 --- a/compiler/test/fail_compilation/diag5450.d +++ b/compiler/test/fail_compilation/diag5450.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag5450.d(18): Error: class `diag5450.C` cannot implicitly generate a default constructor when base class `diag5450.B` is missing a default constructor +fail_compilation/diag5450.d(20): Error: class `diag5450.C` cannot implicitly generate a default constructor when base class `diag5450.B` is missing a default constructor +class C : B +^ --- */ diff --git a/compiler/test/fail_compilation/diag6373.d b/compiler/test/fail_compilation/diag6373.d index 8711b90f6abc..d7c09688ba0e 100644 --- a/compiler/test/fail_compilation/diag6373.d +++ b/compiler/test/fail_compilation/diag6373.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/diag6373.d(15): Error: class `diag6373.Bar` use of `diag6373.Foo.method(double x)` is hidden by `Bar`; use `alias method = Foo.method;` to introduce base class overload set +fail_compilation/diag6373.d(17): Error: class `diag6373.Bar` use of `diag6373.Foo.method(double x)` is hidden by `Bar`; use `alias method = Foo.method;` to introduce base class overload set +class Bar : Foo +^ --- */ diff --git a/compiler/test/fail_compilation/diag6539.d b/compiler/test/fail_compilation/diag6539.d index c202548aac53..e6b927213ded 100644 --- a/compiler/test/fail_compilation/diag6539.d +++ b/compiler/test/fail_compilation/diag6539.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag6539.d(21): Error: overloadset `diag6539.Rectangle` is used as a type +fail_compilation/diag6539.d(23): Error: overloadset `diag6539.Rectangle` is used as a type +void test(Rectangle rect) + ^ --- */ diff --git a/compiler/test/fail_compilation/diag6677.d b/compiler/test/fail_compilation/diag6677.d index aef65d26c464..897113885c99 100644 --- a/compiler/test/fail_compilation/diag6677.d +++ b/compiler/test/fail_compilation/diag6677.d @@ -1,16 +1,36 @@ /* TEST_OUTPUT: --- -fail_compilation/diag6677.d(17): Error: static constructor cannot be `const` -fail_compilation/diag6677.d(18): Error: static constructor cannot be `inout` -fail_compilation/diag6677.d(19): Error: static constructor cannot be `immutable` -fail_compilation/diag6677.d(20): Error: use `shared static this()` to declare a shared static constructor -fail_compilation/diag6677.d(21): Error: use `shared static this()` to declare a shared static constructor -fail_compilation/diag6677.d(23): Error: shared static constructor cannot be `const` -fail_compilation/diag6677.d(24): Error: shared static constructor cannot be `inout` -fail_compilation/diag6677.d(25): Error: shared static constructor cannot be `immutable` -fail_compilation/diag6677.d(26): Error: redundant attribute `shared` -fail_compilation/diag6677.d(27): Error: redundant attribute `shared` +fail_compilation/diag6677.d(37): Error: static constructor cannot be `const` +static this() const { } +^ +fail_compilation/diag6677.d(38): Error: static constructor cannot be `inout` +static this() inout { } +^ +fail_compilation/diag6677.d(39): Error: static constructor cannot be `immutable` +static this() immutable { } +^ +fail_compilation/diag6677.d(40): Error: use `shared static this()` to declare a shared static constructor +static this() shared { } +^ +fail_compilation/diag6677.d(41): Error: use `shared static this()` to declare a shared static constructor +static this() const shared { } +^ +fail_compilation/diag6677.d(43): Error: shared static constructor cannot be `const` +shared static this() const { } +^ +fail_compilation/diag6677.d(44): Error: shared static constructor cannot be `inout` +shared static this() inout { } +^ +fail_compilation/diag6677.d(45): Error: shared static constructor cannot be `immutable` +shared static this() immutable { } +^ +fail_compilation/diag6677.d(46): Error: redundant attribute `shared` +shared static this() shared { } + ^ +fail_compilation/diag6677.d(47): Error: redundant attribute `shared` +shared static this() const shared { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag6707.d b/compiler/test/fail_compilation/diag6707.d index 70fea4fcf681..fd429d63c954 100644 --- a/compiler/test/fail_compilation/diag6707.d +++ b/compiler/test/fail_compilation/diag6707.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag6707.d(17): Error: mutable method `diag6707.Foo.value` is not callable using a `const` object -fail_compilation/diag6707.d(13): Consider adding `const` or `inout` here +fail_compilation/diag6707.d(21): Error: mutable method `diag6707.Foo.value` is not callable using a `const` object + auto x = value; + ^ +fail_compilation/diag6707.d(17): Consider adding `const` or `inout` here + @property bool value() { return true; } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag6796.d b/compiler/test/fail_compilation/diag6796.d index c8be130fd5f4..40d34864fee3 100644 --- a/compiler/test/fail_compilation/diag6796.d +++ b/compiler/test/fail_compilation/diag6796.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag6796.d(11): Error: cannot implicitly convert expression `0` of type `int` to `int[]` -fail_compilation/diag6796.d(11): Error: cannot implicitly convert expression `1` of type `int` to `int[]` +fail_compilation/diag6796.d(15): Error: cannot implicitly convert expression `0` of type `int` to `int[]` + enum int[][] array = [0, 1]; + ^ +fail_compilation/diag6796.d(15): Error: cannot implicitly convert expression `1` of type `int` to `int[]` + enum int[][] array = [0, 1]; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag7050a.d b/compiler/test/fail_compilation/diag7050a.d index abd0d182509a..97c1ca1092a0 100644 --- a/compiler/test/fail_compilation/diag7050a.d +++ b/compiler/test/fail_compilation/diag7050a.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag7050a.d(15): Error: `@safe` function `diag7050a.foo` cannot call `@system` constructor `diag7050a.Foo.this` -fail_compilation/diag7050a.d(11): `diag7050a.Foo.this` is declared here +fail_compilation/diag7050a.d(19): Error: `@safe` function `diag7050a.foo` cannot call `@system` constructor `diag7050a.Foo.this` + auto f = Foo(3); + ^ +fail_compilation/diag7050a.d(15): `diag7050a.Foo.this` is declared here + this (int a) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/diag7050b.d b/compiler/test/fail_compilation/diag7050b.d index 78912cdf1d89..b0b858deb80f 100644 --- a/compiler/test/fail_compilation/diag7050b.d +++ b/compiler/test/fail_compilation/diag7050b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag7050b.d(12): Error: `pure` function `diag7050b.f.g` cannot call impure function `diag7050b.f` +fail_compilation/diag7050b.d(14): Error: `pure` function `diag7050b.f.g` cannot call impure function `diag7050b.f` + f(); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag7050c.d b/compiler/test/fail_compilation/diag7050c.d index 3b366df7af34..d7a839697b76 100644 --- a/compiler/test/fail_compilation/diag7050c.d +++ b/compiler/test/fail_compilation/diag7050c.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag7050c.d(14): Error: `@safe` destructor `diag7050c.B.~this` cannot call `@system` destructor `diag7050c.A.~this` -fail_compilation/diag7050c.d(11): `diag7050c.A.~this` is declared here +fail_compilation/diag7050c.d(18): Error: `@safe` destructor `diag7050c.B.~this` cannot call `@system` destructor `diag7050c.A.~this` +@safe struct B + ^ +fail_compilation/diag7050c.d(15): `diag7050c.A.~this` is declared here + ~this(){} + ^ --- */ diff --git a/compiler/test/fail_compilation/diag7420.d b/compiler/test/fail_compilation/diag7420.d index 3267e6692432..45d99710015f 100644 --- a/compiler/test/fail_compilation/diag7420.d +++ b/compiler/test/fail_compilation/diag7420.d @@ -2,17 +2,37 @@ /* TEST_OUTPUT: --- -fail_compilation/diag7420.d(21): Error: static variable `x` cannot be read at compile time -fail_compilation/diag7420.d(21): while evaluating: `static assert(x < 4)` -fail_compilation/diag7420.d(22): Error: static variable `y` cannot be read at compile time -fail_compilation/diag7420.d(22): called from here: `__equals(y, "abc")` -fail_compilation/diag7420.d(22): while evaluating: `static assert(y == "abc")` -fail_compilation/diag7420.d(23): Error: static variable `y` cannot be read at compile time -fail_compilation/diag7420.d(23): while evaluating: `static assert(cast(ubyte[])y != null)` -fail_compilation/diag7420.d(24): Error: static variable `y` cannot be read at compile time -fail_compilation/diag7420.d(24): while evaluating: `static assert(cast(int)y[0] == 1)` -fail_compilation/diag7420.d(25): Error: static variable `y` cannot be read at compile time -fail_compilation/diag7420.d(25): while evaluating: `static assert(y[0..1].length == 1u)` +fail_compilation/diag7420.d(41): Error: static variable `x` cannot be read at compile time +static assert(x < 4); + ^ +fail_compilation/diag7420.d(41): while evaluating: `static assert(x < 4)` +static assert(x < 4); +^ +fail_compilation/diag7420.d(42): Error: static variable `y` cannot be read at compile time +static assert(y == "abc"); + ^ +fail_compilation/diag7420.d(42): called from here: `__equals(y, "abc")` +fail_compilation/diag7420.d(42): while evaluating: `static assert(y == "abc")` +static assert(y == "abc"); +^ +fail_compilation/diag7420.d(43): Error: static variable `y` cannot be read at compile time +static assert(cast(ubyte[])y != null); + ^ +fail_compilation/diag7420.d(43): while evaluating: `static assert(cast(ubyte[])y != null)` +static assert(cast(ubyte[])y != null); +^ +fail_compilation/diag7420.d(44): Error: static variable `y` cannot be read at compile time +static assert(y[0] == 1); + ^ +fail_compilation/diag7420.d(44): while evaluating: `static assert(cast(int)y[0] == 1)` +static assert(y[0] == 1); +^ +fail_compilation/diag7420.d(45): Error: static variable `y` cannot be read at compile time +static assert(y[0..1].length == 1); + ^ +fail_compilation/diag7420.d(45): while evaluating: `static assert(y[0..1].length == 1u)` +static assert(y[0..1].length == 1); +^ --- */ diff --git a/compiler/test/fail_compilation/diag7477.d b/compiler/test/fail_compilation/diag7477.d index b14a3c5df657..16e86c86d4bf 100644 --- a/compiler/test/fail_compilation/diag7477.d +++ b/compiler/test/fail_compilation/diag7477.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag7477.d(13): Error: cannot generate 0 value of type `Foo` for `a` -fail_compilation/diag7477.d(20): Error: cannot generate 0 value of type `string` for `a` +fail_compilation/diag7477.d(17): Error: cannot generate 0 value of type `Foo` for `a` + a, + ^ +fail_compilation/diag7477.d(24): Error: cannot generate 0 value of type `string` for `a` + a, + ^ --- */ diff --git a/compiler/test/fail_compilation/diag7747.d b/compiler/test/fail_compilation/diag7747.d index e2e59929f6ae..acd570881ed0 100644 --- a/compiler/test/fail_compilation/diag7747.d +++ b/compiler/test/fail_compilation/diag7747.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag7747.d(8): Error: forward reference to inferred return type of function call `fact(n - 1)` +fail_compilation/diag7747.d(10): Error: forward reference to inferred return type of function call `fact(n - 1)` +auto fact(int n) { return n > 1 ? fact(n - 1) : 0; } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag7998.d b/compiler/test/fail_compilation/diag7998.d index a245b4061f1d..a104fe3cd69b 100644 --- a/compiler/test/fail_compilation/diag7998.d +++ b/compiler/test/fail_compilation/diag7998.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag7998.d(10): Error: static assert: "abcxe" +fail_compilation/diag7998.d(12): Error: static assert: "abcxe" +static assert(false, "abc" ~['x'] ~ "e"); +^ --- */ diff --git a/compiler/test/fail_compilation/diag8044.d b/compiler/test/fail_compilation/diag8044.d index a8c767ae7a8c..f86275ed1b2a 100644 --- a/compiler/test/fail_compilation/diag8044.d +++ b/compiler/test/fail_compilation/diag8044.d @@ -1,10 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8044.d(18): Error: template instance `diag8044.test!(Enum.Bar)` does not match template declaration `test(Enum en)()` +fail_compilation/diag8044.d(20): Error: template instance `diag8044.test!(Enum.Bar)` does not match template declaration `test(Enum en)()` with `en = Bar` must satisfy the following constraint: ` 0` + test!(Enum.Bar)(); + ^ --- */ enum Enum { Foo, Bar } diff --git a/compiler/test/fail_compilation/diag8101.d b/compiler/test/fail_compilation/diag8101.d index 0d196205640d..e336d1c49696 100644 --- a/compiler/test/fail_compilation/diag8101.d +++ b/compiler/test/fail_compilation/diag8101.d @@ -1,33 +1,85 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8101.d(62): Error: function `f_0` is not callable using argument types `()` -fail_compilation/diag8101.d(62): too few arguments, expected 1, got 0 -fail_compilation/diag8101.d(34): `diag8101.f_0(int)` declared here -fail_compilation/diag8101.d(63): Error: none of the overloads of `f_1` are callable using argument types `()` -fail_compilation/diag8101.d(36): Candidates are: `diag8101.f_1(int)` -fail_compilation/diag8101.d(37): `diag8101.f_1(int, int)` -fail_compilation/diag8101.d(64): Error: none of the overloads of `f_2` are callable using argument types `()` -fail_compilation/diag8101.d(39): Candidates are: `diag8101.f_2(int)` -fail_compilation/diag8101.d(40): `diag8101.f_2(int, int)` -fail_compilation/diag8101.d(41): `diag8101.f_2(int, int, int)` -fail_compilation/diag8101.d(42): `diag8101.f_2(int, int, int, int)` -fail_compilation/diag8101.d(43): `diag8101.f_2(int, int, int, int, int)` -fail_compilation/diag8101.d(44): `diag8101.f_2(int, int, int, int, int, int)` -fail_compilation/diag8101.d(64): ... (1 more, -v to show) ... -fail_compilation/diag8101.d(66): Error: template `t_0` is not callable using argument types `!()()` -fail_compilation/diag8101.d(47): Candidate is: `t_0(T1)()` -fail_compilation/diag8101.d(67): Error: none of the overloads of template `diag8101.t_1` are callable using argument types `!()()` -fail_compilation/diag8101.d(49): Candidates are: `t_1(T1)()` -fail_compilation/diag8101.d(50): `t_1(T1, T2)()` -fail_compilation/diag8101.d(68): Error: none of the overloads of template `diag8101.t_2` are callable using argument types `!()()` -fail_compilation/diag8101.d(52): Candidates are: `t_2(T1)()` -fail_compilation/diag8101.d(53): `t_2(T1, T2)()` -fail_compilation/diag8101.d(54): `t_2(T1, T2, T3)()` -fail_compilation/diag8101.d(55): `t_2(T1, T2, T3, T4)()` -fail_compilation/diag8101.d(56): `t_2(T1, T2, T3, T4, T5)()` -fail_compilation/diag8101.d(57): `t_2(T1, T2, T3, T4, T5, T6)()` -fail_compilation/diag8101.d(68): ... (1 more, -v to show) ... +fail_compilation/diag8101.d(114): Error: function `f_0` is not callable using argument types `()` + f_0(); + ^ +fail_compilation/diag8101.d(114): too few arguments, expected 1, got 0 +fail_compilation/diag8101.d(86): `diag8101.f_0(int)` declared here +void f_0(int); + ^ +fail_compilation/diag8101.d(115): Error: none of the overloads of `f_1` are callable using argument types `()` + f_1(); + ^ +fail_compilation/diag8101.d(88): Candidates are: `diag8101.f_1(int)` +void f_1(int); + ^ +fail_compilation/diag8101.d(89): `diag8101.f_1(int, int)` +void f_1(int, int); + ^ +fail_compilation/diag8101.d(116): Error: none of the overloads of `f_2` are callable using argument types `()` + f_2(); + ^ +fail_compilation/diag8101.d(91): Candidates are: `diag8101.f_2(int)` +void f_2(int); + ^ +fail_compilation/diag8101.d(92): `diag8101.f_2(int, int)` +void f_2(int, int); + ^ +fail_compilation/diag8101.d(93): `diag8101.f_2(int, int, int)` +void f_2(int, int, int); + ^ +fail_compilation/diag8101.d(94): `diag8101.f_2(int, int, int, int)` +void f_2(int, int, int, int); + ^ +fail_compilation/diag8101.d(95): `diag8101.f_2(int, int, int, int, int)` +void f_2(int, int, int, int, int); + ^ +fail_compilation/diag8101.d(96): `diag8101.f_2(int, int, int, int, int, int)` +void f_2(int, int, int, int, int, int); + ^ +fail_compilation/diag8101.d(116): ... (1 more, -v to show) ... + f_2(); + ^ +fail_compilation/diag8101.d(118): Error: template `t_0` is not callable using argument types `!()()` + t_0(); + ^ +fail_compilation/diag8101.d(99): Candidate is: `t_0(T1)()` +void t_0(T1)(); + ^ +fail_compilation/diag8101.d(119): Error: none of the overloads of template `diag8101.t_1` are callable using argument types `!()()` + t_1(); + ^ +fail_compilation/diag8101.d(101): Candidates are: `t_1(T1)()` +void t_1(T1)(); + ^ +fail_compilation/diag8101.d(102): `t_1(T1, T2)()` +void t_1(T1, T2)(); + ^ +fail_compilation/diag8101.d(120): Error: none of the overloads of template `diag8101.t_2` are callable using argument types `!()()` + t_2(); + ^ +fail_compilation/diag8101.d(104): Candidates are: `t_2(T1)()` +void t_2(T1)(); + ^ +fail_compilation/diag8101.d(105): `t_2(T1, T2)()` +void t_2(T1, T2)(); + ^ +fail_compilation/diag8101.d(106): `t_2(T1, T2, T3)()` +void t_2(T1, T2, T3)(); + ^ +fail_compilation/diag8101.d(107): `t_2(T1, T2, T3, T4)()` +void t_2(T1, T2, T3, T4)(); + ^ +fail_compilation/diag8101.d(108): `t_2(T1, T2, T3, T4, T5)()` +void t_2(T1, T2, T3, T4, T5)(); + ^ +fail_compilation/diag8101.d(109): `t_2(T1, T2, T3, T4, T5, T6)()` +void t_2(T1, T2, T3, T4, T5, T6)(); + ^ +fail_compilation/diag8101.d(120): ... (1 more, -v to show) ... + t_2(); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8101b.d b/compiler/test/fail_compilation/diag8101b.d index 626fb827878a..1e40a68d4fce 100644 --- a/compiler/test/fail_compilation/diag8101b.d +++ b/compiler/test/fail_compilation/diag8101b.d @@ -1,16 +1,34 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8101b.d(28): Error: none of the overloads of `foo` are callable using argument types `(double)` -fail_compilation/diag8101b.d(19): Candidates are: `diag8101b.S.foo(int __param_0)` -fail_compilation/diag8101b.d(20): `diag8101b.S.foo(int __param_0, int __param_1)` -fail_compilation/diag8101b.d(30): Error: function `diag8101b.S.bar(int __param_0)` is not callable using argument types `(double)` -fail_compilation/diag8101b.d(30): cannot pass argument `1.0` of type `double` to parameter `int __param_0` -fail_compilation/diag8101b.d(33): Error: none of the overloads of `foo` are callable using a `const` object with argument types `(int)` -fail_compilation/diag8101b.d(19): Candidates are: `diag8101b.S.foo(int __param_0)` -fail_compilation/diag8101b.d(20): `diag8101b.S.foo(int __param_0, int __param_1)` -fail_compilation/diag8101b.d(35): Error: mutable method `diag8101b.S.bar` is not callable using a `const` object -fail_compilation/diag8101b.d(22): Consider adding `const` or `inout` here +fail_compilation/diag8101b.d(46): Error: none of the overloads of `foo` are callable using argument types `(double)` + s.foo(1.0); + ^ +fail_compilation/diag8101b.d(37): Candidates are: `diag8101b.S.foo(int __param_0)` + void foo(int) { } + ^ +fail_compilation/diag8101b.d(38): `diag8101b.S.foo(int __param_0, int __param_1)` + void foo(int, int) { } + ^ +fail_compilation/diag8101b.d(48): Error: function `diag8101b.S.bar(int __param_0)` is not callable using argument types `(double)` + s.bar(1.0); + ^ +fail_compilation/diag8101b.d(48): cannot pass argument `1.0` of type `double` to parameter `int __param_0` +fail_compilation/diag8101b.d(51): Error: none of the overloads of `foo` are callable using a `const` object with argument types `(int)` + cs.foo(1); + ^ +fail_compilation/diag8101b.d(37): Candidates are: `diag8101b.S.foo(int __param_0)` + void foo(int) { } + ^ +fail_compilation/diag8101b.d(38): `diag8101b.S.foo(int __param_0, int __param_1)` + void foo(int, int) { } + ^ +fail_compilation/diag8101b.d(53): Error: mutable method `diag8101b.S.bar` is not callable using a `const` object + cs.bar(1); + ^ +fail_compilation/diag8101b.d(40): Consider adding `const` or `inout` here + void bar(int) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8178.d b/compiler/test/fail_compilation/diag8178.d index 00cac985b13c..3579978269b9 100644 --- a/compiler/test/fail_compilation/diag8178.d +++ b/compiler/test/fail_compilation/diag8178.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8178.d(14): Error: cannot modify manifest constant `s` +fail_compilation/diag8178.d(16): Error: cannot modify manifest constant `s` + Foo.s = ""; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8318.d b/compiler/test/fail_compilation/diag8318.d index 99dc6c41d11a..e0ef1bc29218 100644 --- a/compiler/test/fail_compilation/diag8318.d +++ b/compiler/test/fail_compilation/diag8318.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8318.d(18): Error: function `diag8318.Bar8318.foo` return type inference is not supported if may override base class function -fail_compilation/diag8318.d(23): Error: function `diag8318.C10021.makeI` return type inference is not supported if may override base class function -fail_compilation/diag8318.d(31): Error: function `diag8318.Bar10195.baz` return type inference is not supported if may override base class function -fail_compilation/diag8318.d(37): Error: function `diag8318.B14173.foo` does not override any function -fail_compilation/diag8318.d(23): Error: class `diag8318.C10021` interface function `I10021 makeI()` is not implemented -fail_compilation/diag8318.d(29): Error: class `diag8318.Bar10195` interface function `int baz()` is not implemented +fail_compilation/diag8318.d(30): Error: function `diag8318.Bar8318.foo` return type inference is not supported if may override base class function + override auto foo() { return "Bar.foo"; } + ^ +fail_compilation/diag8318.d(35): Error: function `diag8318.C10021.makeI` return type inference is not supported if may override base class function +class C10021 : I10021 { auto makeI() { return this; } } + ^ +fail_compilation/diag8318.d(43): Error: function `diag8318.Bar10195.baz` return type inference is not supported if may override base class function + override auto baz() { return 1; } + ^ +fail_compilation/diag8318.d(49): Error: function `diag8318.B14173.foo` does not override any function + override foo() {} + ^ +fail_compilation/diag8318.d(35): Error: class `diag8318.C10021` interface function `I10021 makeI()` is not implemented +class C10021 : I10021 { auto makeI() { return this; } } +^ +fail_compilation/diag8318.d(41): Error: class `diag8318.Bar10195` interface function `int baz()` is not implemented +class Bar10195 : Foo10195 +^ --- */ class Foo8318 diff --git a/compiler/test/fail_compilation/diag8425.d b/compiler/test/fail_compilation/diag8425.d index a30881b6df10..22e7fd799289 100644 --- a/compiler/test/fail_compilation/diag8425.d +++ b/compiler/test/fail_compilation/diag8425.d @@ -2,10 +2,18 @@ REQUIRED_ARGS: -m64 -o- TEST_OUTPUT: --- -fail_compilation/diag8425.d(12): Error: T in __vector(T) must be a static array, not `void` -fail_compilation/diag8425.d(13): Error: 1 byte vector type `__vector(void[1])` is not supported on this platform -fail_compilation/diag8425.d(14): Error: 99 byte vector type `__vector(void[99])` is not supported on this platform -fail_compilation/diag8425.d(15): Error: vector type `__vector(void*[4])` is not supported on this platform +fail_compilation/diag8425.d(20): Error: T in __vector(T) must be a static array, not `void` +alias a = __vector(void); // not static array +^ +fail_compilation/diag8425.d(21): Error: 1 byte vector type `__vector(void[1])` is not supported on this platform +alias b = __vector(void[1]); // wrong size +^ +fail_compilation/diag8425.d(22): Error: 99 byte vector type `__vector(void[99])` is not supported on this platform +alias c = __vector(void[99]); // wrong size +^ +fail_compilation/diag8425.d(23): Error: vector type `__vector(void*[4])` is not supported on this platform +alias d = __vector(void*[4]); // wrong base type +^ --- */ diff --git a/compiler/test/fail_compilation/diag8510.d b/compiler/test/fail_compilation/diag8510.d index de9947198526..fa73f4b80ec4 100644 --- a/compiler/test/fail_compilation/diag8510.d +++ b/compiler/test/fail_compilation/diag8510.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8510.d(10): Error: alias `diag8510.a` conflicts with alias `diag8510.a` at fail_compilation/diag8510.d(9) -fail_compilation/diag8510.d(15): Error: alias `diag8510.S.a` conflicts with alias `diag8510.S.a` at fail_compilation/diag8510.d(14) +fail_compilation/diag8510.d(14): Error: alias `diag8510.a` conflicts with alias `diag8510.a` at fail_compilation/diag8510.d(13) +alias int a; +^ +fail_compilation/diag8510.d(19): Error: alias `diag8510.S.a` conflicts with alias `diag8510.S.a` at fail_compilation/diag8510.d(18) + alias g a; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8559.d b/compiler/test/fail_compilation/diag8559.d index 5da50f414434..8bd57ab0032e 100644 --- a/compiler/test/fail_compilation/diag8559.d +++ b/compiler/test/fail_compilation/diag8559.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8559.d(12): Error: `void` does not have a default initializer -fail_compilation/diag8559.d(13): Error: `function` does not have a default initializer +fail_compilation/diag8559.d(16): Error: `void` does not have a default initializer + auto x = void.init; + ^ +fail_compilation/diag8559.d(17): Error: `function` does not have a default initializer + auto y = typeof(foo).init; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8648.d b/compiler/test/fail_compilation/diag8648.d index 8066d6e8bbe5..376db165a4c1 100644 --- a/compiler/test/fail_compilation/diag8648.d +++ b/compiler/test/fail_compilation/diag8648.d @@ -1,15 +1,33 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8648.d(18): Error: undefined identifier `X` -fail_compilation/diag8648.d(29): Error: template `foo` is not callable using argument types `!()(Foo!(int, 1))` -fail_compilation/diag8648.d(18): Candidate is: `foo(T, n)(X!(T, n))` -fail_compilation/diag8648.d(20): Error: undefined identifier `a` -fail_compilation/diag8648.d(31): Error: template `bar` is not callable using argument types `!()(Foo!(int, 1))` -fail_compilation/diag8648.d(20): Candidate is: `bar(T)(Foo!(T, a))` -fail_compilation/diag8648.d(20): Error: undefined identifier `a` -fail_compilation/diag8648.d(32): Error: template `bar` is not callable using argument types `!()(Foo!(int, f))` -fail_compilation/diag8648.d(20): Candidate is: `bar(T)(Foo!(T, a))` +fail_compilation/diag8648.d(36): Error: undefined identifier `X` +void foo(T, n)(X!(T, n) ) {} // undefined identifier 'X' + ^ +fail_compilation/diag8648.d(47): Error: template `foo` is not callable using argument types `!()(Foo!(int, 1))` + foo(x); + ^ +fail_compilation/diag8648.d(36): Candidate is: `foo(T, n)(X!(T, n))` +void foo(T, n)(X!(T, n) ) {} // undefined identifier 'X' + ^ +fail_compilation/diag8648.d(38): Error: undefined identifier `a` +void bar(T)(Foo!(T, a) ) {} // undefined identifier 'a' + ^ +fail_compilation/diag8648.d(49): Error: template `bar` is not callable using argument types `!()(Foo!(int, 1))` + bar(x); // expression '1' vs undefined Type 'a' + ^ +fail_compilation/diag8648.d(38): Candidate is: `bar(T)(Foo!(T, a))` +void bar(T)(Foo!(T, a) ) {} // undefined identifier 'a' + ^ +fail_compilation/diag8648.d(38): Error: undefined identifier `a` +void bar(T)(Foo!(T, a) ) {} // undefined identifier 'a' + ^ +fail_compilation/diag8648.d(50): Error: template `bar` is not callable using argument types `!()(Foo!(int, f))` + bar(y); // symbol 'f' vs undefined Type 'a' + ^ +fail_compilation/diag8648.d(38): Candidate is: `bar(T)(Foo!(T, a))` +void bar(T)(Foo!(T, a) ) {} // undefined identifier 'a' + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8684.d b/compiler/test/fail_compilation/diag8684.d index 9fbbebfd932d..e459615448d8 100644 --- a/compiler/test/fail_compilation/diag8684.d +++ b/compiler/test/fail_compilation/diag8684.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8684.d(12): Error: found `;` when expecting `)` -fail_compilation/diag8684.d(13): Error: semicolon needed to end declaration of `x`, instead of `for` -fail_compilation/diag8684.d(12): `x` declared here +fail_compilation/diag8684.d(16): Error: found `;` when expecting `)` +fail_compilation/diag8684.d(17): Error: semicolon needed to end declaration of `x`, instead of `for` + for (int q=0; q<10; ++q){ + ^ +fail_compilation/diag8684.d(16): `x` declared here + int x = foo( 5, m; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8697.d b/compiler/test/fail_compilation/diag8697.d index bcc0be098973..d38644b359af 100644 --- a/compiler/test/fail_compilation/diag8697.d +++ b/compiler/test/fail_compilation/diag8697.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8697.d(11): Error: no property `Invalid` for type `diag8697.Base` -fail_compilation/diag8697.d(9): class `Base` defined here +fail_compilation/diag8697.d(15): Error: no property `Invalid` for type `diag8697.Base` +void test(Base.Invalid) { } + ^ +fail_compilation/diag8697.d(13): class `Base` defined here +class Base : InterBase { } +^ --- */ interface InterBase : InterRoot { } diff --git a/compiler/test/fail_compilation/diag8714.d b/compiler/test/fail_compilation/diag8714.d index 5a9d8d9cc70d..a8de462ee4a9 100644 --- a/compiler/test/fail_compilation/diag8714.d +++ b/compiler/test/fail_compilation/diag8714.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8714.d(9): Error: function `diag8714.foo` circular dependency. Functions cannot be interpreted while being compiled -fail_compilation/diag8714.d(15): called from here: `foo("somestring")` +fail_compilation/diag8714.d(13): Error: function `diag8714.foo` circular dependency. Functions cannot be interpreted while being compiled +string foo(string f) + ^ +fail_compilation/diag8714.d(19): called from here: `foo("somestring")` + return bar!(foo("somestring")); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8777.d b/compiler/test/fail_compilation/diag8777.d index 8dfac75bfcbc..e901fb2a56ce 100644 --- a/compiler/test/fail_compilation/diag8777.d +++ b/compiler/test/fail_compilation/diag8777.d @@ -1,44 +1,46 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8777.d(12): Error: constructor `diag8777.Foo1.this` missing initializer for immutable field `x` -fail_compilation/diag8777.d(12): Error: constructor `diag8777.Foo1.this` missing initializer for const field `y` +fail_compilation/diag8777.d(28): Error: constructor `diag8777.Foo1.this` missing initializer for immutable field `x` + this() {} // Constructor missing initializers for `x` and `y` + ^ +fail_compilation/diag8777.d(28): Error: constructor `diag8777.Foo1.this` missing initializer for const field `y` + this() {} // Constructor missing initializers for `x` and `y` + ^ +fail_compilation/diag8777.d(34): Error: cannot modify `immutable` expression `x` + x = 1; // Error: `immutable` variable cannot be modified + ^ +fail_compilation/diag8777.d(37): Error: cannot modify `const` expression `y` + y = 1; // Error: `const` variable cannot be modified + ^ +fail_compilation/diag8777.d(44): Error: cannot remove key from `immutable` associative array `hashx` + hashx.remove(1); // Error: cannot modify immutable associative array + ^ +fail_compilation/diag8777.d(45): Error: cannot remove key from `const` associative array `hashy` + hashy.remove(1); // Error: cannot modify const associative array + ^ --- */ class Foo1 { immutable int[5] x; const int[5] y; - this() {} + this() {} // Constructor missing initializers for `x` and `y` } -/* -TEST_OUTPUT: ---- -fail_compilation/diag8777.d(25): Error: cannot modify `immutable` expression `x` -fail_compilation/diag8777.d(28): Error: cannot modify `const` expression `y` ---- -*/ void test2() { - immutable int x; - x = 1; + immutable int x; // Immutable variable `x` declared + x = 1; // Error: `immutable` variable cannot be modified - const int y; - y = 1; + const int y; // Const variable `y` declared + y = 1; // Error: `const` variable cannot be modified } -/* -TEST_OUTPUT: ---- -fail_compilation/diag8777.d(42): Error: cannot remove key from `immutable` associative array `hashx` -fail_compilation/diag8777.d(43): Error: cannot remove key from `const` associative array `hashy` ---- -*/ -immutable(int[int]) hashx; -const(int[int]) hashy; +immutable(int[int]) hashx; // Immutable associative array +const(int[int]) hashy; // Const associative array void test3() { - hashx.remove(1); - hashy.remove(1); + hashx.remove(1); // Error: cannot modify immutable associative array + hashy.remove(1); // Error: cannot modify const associative array } diff --git a/compiler/test/fail_compilation/diag8787.d b/compiler/test/fail_compilation/diag8787.d index c4ff6d2bb5ff..14ebfcdb6ff2 100644 --- a/compiler/test/fail_compilation/diag8787.d +++ b/compiler/test/fail_compilation/diag8787.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8787.d(10): Error: function `diag8787.I.f` function body only allowed in `final` functions in interface `I` +fail_compilation/diag8787.d(12): Error: function `diag8787.I.f` function body only allowed in `final` functions in interface `I` + void f() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8825.d b/compiler/test/fail_compilation/diag8825.d index 68dcaa15e596..8111906aca70 100644 --- a/compiler/test/fail_compilation/diag8825.d +++ b/compiler/test/fail_compilation/diag8825.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8825.d(13): Error: undefined identifier `foo` +fail_compilation/diag8825.d(15): Error: undefined identifier `foo` + t!(foo // line 13 + ^ --- */ diff --git a/compiler/test/fail_compilation/diag8892.d b/compiler/test/fail_compilation/diag8892.d index 1bf6192175be..e8a39230b3c3 100644 --- a/compiler/test/fail_compilation/diag8892.d +++ b/compiler/test/fail_compilation/diag8892.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8892.d(14): Error: cannot implicitly convert expression `['A']` of type `char[]` to `char[2]` +fail_compilation/diag8892.d(16): Error: cannot implicitly convert expression `['A']` of type `char[]` to `char[2]` + auto f = Foo(['A']); + ^ --- */ struct Foo diff --git a/compiler/test/fail_compilation/diag8894.d b/compiler/test/fail_compilation/diag8894.d index e8e0c74cc32e..c7e5ddcb8e1f 100644 --- a/compiler/test/fail_compilation/diag8894.d +++ b/compiler/test/fail_compilation/diag8894.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8894.d(20): Error: no property `x` for `f` of type `diag8894.Foo` -fail_compilation/diag8894.d(15): struct `Foo` defined here -fail_compilation/diag8894.d(21): Error: no property `y` for `f` of type `diag8894.Foo` -fail_compilation/diag8894.d(15): struct `Foo` defined here -fail_compilation/diag8894.d(22): Error: no property `x` for `f` of type `diag8894.Foo` -fail_compilation/diag8894.d(15): struct `Foo` defined here -fail_compilation/diag8894.d(23): Error: no property `x` for `f` of type `diag8894.Foo` -fail_compilation/diag8894.d(15): struct `Foo` defined here +fail_compilation/diag8894.d(36): Error: no property `x` for `f` of type `diag8894.Foo` + f.x; // UFCS getter1 + ^ +fail_compilation/diag8894.d(31): struct `Foo` defined here +struct Foo { } +^ +fail_compilation/diag8894.d(37): Error: no property `y` for `f` of type `diag8894.Foo` + f.y!int; // UFCS getter2 + ^ +fail_compilation/diag8894.d(31): struct `Foo` defined here +struct Foo { } +^ +fail_compilation/diag8894.d(38): Error: no property `x` for `f` of type `diag8894.Foo` + f.x = 10; // UFCS setter1 + ^ +fail_compilation/diag8894.d(31): struct `Foo` defined here +struct Foo { } +^ +fail_compilation/diag8894.d(39): Error: no property `x` for `f` of type `diag8894.Foo` + f.x!int = 10; // UFCS setter2 + ^ +fail_compilation/diag8894.d(31): struct `Foo` defined here +struct Foo { } +^ --- */ diff --git a/compiler/test/fail_compilation/diag8928.d b/compiler/test/fail_compilation/diag8928.d index 36bfc967b22c..3080e55c02a3 100644 --- a/compiler/test/fail_compilation/diag8928.d +++ b/compiler/test/fail_compilation/diag8928.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag8928.d(18): Error: class `diag8928.Z` cannot implicitly generate a default constructor when base class `diag8928.X` is missing a default constructor +fail_compilation/diag8928.d(20): Error: class `diag8928.Z` cannot implicitly generate a default constructor when base class `diag8928.X` is missing a default constructor +class Z : X +^ --- */ diff --git a/compiler/test/fail_compilation/diag9004.d b/compiler/test/fail_compilation/diag9004.d index 4c63bb26d736..116524082871 100644 --- a/compiler/test/fail_compilation/diag9004.d +++ b/compiler/test/fail_compilation/diag9004.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9004.d(21): Error: template `bar` is not callable using argument types `!()(Foo!int, int)` -fail_compilation/diag9004.d(14): Candidate is: `bar(FooT)(FooT foo, FooT.T x)` +fail_compilation/diag9004.d(25): Error: template `bar` is not callable using argument types `!()(Foo!int, int)` + bar(foo, 1); + ^ +fail_compilation/diag9004.d(18): Candidate is: `bar(FooT)(FooT foo, FooT.T x)` +void bar(FooT)(FooT foo, FooT.T x) + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9191.d b/compiler/test/fail_compilation/diag9191.d index 889d1fada2b1..82d4697e89b4 100644 --- a/compiler/test/fail_compilation/diag9191.d +++ b/compiler/test/fail_compilation/diag9191.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9191.d(16): Error: function `void diag9191.C1.aaa()` does not override any function, did you mean to override `void diag9191.B1.aa()`? -fail_compilation/diag9191.d(22): Error: function `diag9191.C2.aaa` does not override any function -fail_compilation/diag9191.d(33): Error: function `void diag9191.C3.foo()` does not override any function, did you mean to override `void diag9191.B2._foo()`? -fail_compilation/diag9191.d(38): Error: function `void diag9191.C4.toStringa()` does not override any function, did you mean to override `string object.Object.toString()`? +fail_compilation/diag9191.d(24): Error: function `void diag9191.C1.aaa()` does not override any function, did you mean to override `void diag9191.B1.aa()`? + override void aaa(); + ^ +fail_compilation/diag9191.d(30): Error: function `diag9191.C2.aaa` does not override any function + override void aaa(); + ^ +fail_compilation/diag9191.d(41): Error: function `void diag9191.C3.foo()` does not override any function, did you mean to override `void diag9191.B2._foo()`? + override void foo(){} + ^ +fail_compilation/diag9191.d(46): Error: function `void diag9191.C4.toStringa()` does not override any function, did you mean to override `string object.Object.toString()`? + override void toStringa(){} + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9210a.d b/compiler/test/fail_compilation/diag9210a.d index d70f4f7d2112..0bd1d6aecb21 100644 --- a/compiler/test/fail_compilation/diag9210a.d +++ b/compiler/test/fail_compilation/diag9210a.d @@ -4,6 +4,8 @@ TEST_OUTPUT: --- fail_compilation/imports/diag9210b.d(6): Error: undefined identifier `A` +interface B : A {} +^ --- */ diff --git a/compiler/test/fail_compilation/diag9247.d b/compiler/test/fail_compilation/diag9247.d index 1519b10f827b..28c8bd3a5e59 100644 --- a/compiler/test/fail_compilation/diag9247.d +++ b/compiler/test/fail_compilation/diag9247.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9247.d(11): Error: functions cannot return opaque type `S` by value -fail_compilation/diag9247.d(12): Error: functions cannot return opaque type `S` by value +fail_compilation/diag9247.d(15): Error: functions cannot return opaque type `S` by value +S foo(); + ^ +fail_compilation/diag9247.d(16): Error: functions cannot return opaque type `S` by value +S function() bar; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9250.d b/compiler/test/fail_compilation/diag9250.d index 177a05cf3963..5f1c3680e661 100644 --- a/compiler/test/fail_compilation/diag9250.d +++ b/compiler/test/fail_compilation/diag9250.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9250.d(19): Error: cannot implicitly convert expression `10u` of type `uint` to `Foo` -fail_compilation/diag9250.d(22): Error: cannot implicitly convert expression `10u` of type `uint` to `void*` +fail_compilation/diag9250.d(23): Error: cannot implicitly convert expression `10u` of type `uint` to `Foo` + Foo x = bar.length; // error here + ^ +fail_compilation/diag9250.d(26): Error: cannot implicitly convert expression `10u` of type `uint` to `void*` + bar.length : // error here + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9312.d b/compiler/test/fail_compilation/diag9312.d index 98308133e02d..ad2459a4230b 100644 --- a/compiler/test/fail_compilation/diag9312.d +++ b/compiler/test/fail_compilation/diag9312.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9312.d(10): Error: `with` expression types must be enums or aggregates or pointers to them, not `int` +fail_compilation/diag9312.d(12): Error: `with` expression types must be enums or aggregates or pointers to them, not `int` + with (1) + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9357.d b/compiler/test/fail_compilation/diag9357.d index 097c8dee2500..74728b52c33e 100644 --- a/compiler/test/fail_compilation/diag9357.d +++ b/compiler/test/fail_compilation/diag9357.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9357.d(14): Error: cannot implicitly convert expression `1.0` of type `double` to `int` -fail_compilation/diag9357.d(15): Error: cannot implicitly convert expression `10.0` of type `double` to `int` -fail_compilation/diag9357.d(16): Error: cannot implicitly convert expression `11.0` of type `double` to `int` -fail_compilation/diag9357.d(17): Error: cannot implicitly convert expression `99.0` of type `double` to `int` -fail_compilation/diag9357.d(18): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int` -fail_compilation/diag9357.d(19): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int` +fail_compilation/diag9357.d(26): Error: cannot implicitly convert expression `1.0` of type `double` to `int` + { int x = 1.0; } + ^ +fail_compilation/diag9357.d(27): Error: cannot implicitly convert expression `10.0` of type `double` to `int` + { int x = 10.0; } + ^ +fail_compilation/diag9357.d(28): Error: cannot implicitly convert expression `11.0` of type `double` to `int` + { int x = 11.0; } + ^ +fail_compilation/diag9357.d(29): Error: cannot implicitly convert expression `99.0` of type `double` to `int` + { int x = 99.0; } + ^ +fail_compilation/diag9357.d(30): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int` + { int x = 1048575.0L; } + ^ +fail_compilation/diag9357.d(31): Error: cannot implicitly convert expression `1.04858e+06L` of type `real` to `int` + { int x = 1048576.0L; } + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/diag9358.d b/compiler/test/fail_compilation/diag9358.d index 58dd495ab8eb..2774fea1ee8c 100644 --- a/compiler/test/fail_compilation/diag9358.d +++ b/compiler/test/fail_compilation/diag9358.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9358.d(13): Error: `x` must be of integral or string type, it is a `double` -fail_compilation/diag9358.d(15): Error: `case` expression must be a compile-time `string` or an integral constant, not `1.1` -fail_compilation/diag9358.d(16): Error: `case` expression must be a compile-time `string` or an integral constant, not `2.1` -fail_compilation/diag9358.d(26): Error: `case` expression must be a compile-time `string` or an integral constant, not `z` +fail_compilation/diag9358.d(21): Error: `x` must be of integral or string type, it is a `double` + switch (x) + ^ +fail_compilation/diag9358.d(23): Error: `case` expression must be a compile-time `string` or an integral constant, not `1.1` + case 1.1: break; + ^ +fail_compilation/diag9358.d(24): Error: `case` expression must be a compile-time `string` or an integral constant, not `2.1` + case 2.1: break; + ^ +fail_compilation/diag9358.d(34): Error: `case` expression must be a compile-time `string` or an integral constant, not `z` + case z: break; + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/diag9398.d b/compiler/test/fail_compilation/diag9398.d index fe7e40081f36..507f88f57ea9 100644 --- a/compiler/test/fail_compilation/diag9398.d +++ b/compiler/test/fail_compilation/diag9398.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9398.d(11): Error: incompatible types for `(f) : (s)`: `float` and `string` +fail_compilation/diag9398.d(13): Error: incompatible types for `(f) : (s)`: `float` and `string` + auto a = (true ? f : s); + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/diag9420.d b/compiler/test/fail_compilation/diag9420.d index 92cb47f9500e..83fd4f5d2d2f 100644 --- a/compiler/test/fail_compilation/diag9420.d +++ b/compiler/test/fail_compilation/diag9420.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9420.d(21): Error: function `diag9420.S.t3!().tx()` is not callable using argument types `(int)` -fail_compilation/diag9420.d(21): expected 0 argument(s), not 1 +fail_compilation/diag9420.d(23): Error: function `diag9420.S.t3!().tx()` is not callable using argument types `(int)` + s1.t3!()(1); + ^ +fail_compilation/diag9420.d(23): expected 0 argument(s), not 1 --- */ diff --git a/compiler/test/fail_compilation/diag9451.d b/compiler/test/fail_compilation/diag9451.d index 980c6897aa21..262d647b8f00 100644 --- a/compiler/test/fail_compilation/diag9451.d +++ b/compiler/test/fail_compilation/diag9451.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9451.d(27): Error: cannot create instance of abstract class `C2` -fail_compilation/diag9451.d(21): class `C2` is declared here -fail_compilation/diag9451.d(15): function `void f1()` is not implemented -fail_compilation/diag9451.d(16): function `void f2(int)` is not implemented -fail_compilation/diag9451.d(17): function `void f2(float) const` is not implemented -fail_compilation/diag9451.d(18): function `int f2(float) pure` is not implemented +fail_compilation/diag9451.d(39): Error: cannot create instance of abstract class `C2` + auto c2 = new C2; + ^ +fail_compilation/diag9451.d(33): class `C2` is declared here +class C2 : C1 +^ +fail_compilation/diag9451.d(27): function `void f1()` is not implemented + abstract void f1(); + ^ +fail_compilation/diag9451.d(28): function `void f2(int)` is not implemented + abstract void f2(int); + ^ +fail_compilation/diag9451.d(29): function `void f2(float) const` is not implemented + abstract void f2(float) const; + ^ +fail_compilation/diag9451.d(30): function `int f2(float) pure` is not implemented + abstract int f2(float) pure; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9479.d b/compiler/test/fail_compilation/diag9479.d index 25cd408b9397..e0ac979124f7 100644 --- a/compiler/test/fail_compilation/diag9479.d +++ b/compiler/test/fail_compilation/diag9479.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9479.d(10): Error: undefined identifier `something_undefined` +fail_compilation/diag9479.d(12): Error: undefined identifier `something_undefined` + return { return something_undefined; }; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9620.d b/compiler/test/fail_compilation/diag9620.d index 4af87df0a2f7..81b3deaa7a47 100644 --- a/compiler/test/fail_compilation/diag9620.d +++ b/compiler/test/fail_compilation/diag9620.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9620.d(20): Error: `pure` function `diag9620.main.bar` cannot call impure function `diag9620.foo1` -fail_compilation/diag9620.d(21): Error: `pure` function `diag9620.main.bar` cannot call impure function `diag9620.foo2!().foo2` -fail_compilation/diag9620.d(14): which wasn't inferred `pure` because of: -fail_compilation/diag9620.d(14): `pure` function `diag9620.foo2!().foo2` cannot access mutable static data `x` +fail_compilation/diag9620.d(26): Error: `pure` function `diag9620.main.bar` cannot call impure function `diag9620.foo1` + foo1(); + ^ +fail_compilation/diag9620.d(27): Error: `pure` function `diag9620.main.bar` cannot call impure function `diag9620.foo2!().foo2` + foo2(); + ^ +fail_compilation/diag9620.d(20): which wasn't inferred `pure` because of: +void foo2()() { x = 3; } + ^ +fail_compilation/diag9620.d(20): `pure` function `diag9620.foo2!().foo2` cannot access mutable static data `x` --- */ diff --git a/compiler/test/fail_compilation/diag9635.d b/compiler/test/fail_compilation/diag9635.d index 9794c8f51e64..f0b976a73858 100644 --- a/compiler/test/fail_compilation/diag9635.d +++ b/compiler/test/fail_compilation/diag9635.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9635.d(17): Error: accessing non-static variable `i` requires an instance of `Foo` -fail_compilation/diag9635.d(18): Error: calling non-static function `foo` requires an instance of type `Foo` +fail_compilation/diag9635.d(21): Error: accessing non-static variable `i` requires an instance of `Foo` + i = 4; + ^ +fail_compilation/diag9635.d(22): Error: calling non-static function `foo` requires an instance of type `Foo` + foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9765.d b/compiler/test/fail_compilation/diag9765.d index fa629a228e82..e0afb17c69b1 100644 --- a/compiler/test/fail_compilation/diag9765.d +++ b/compiler/test/fail_compilation/diag9765.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9765.d(9): Error: cannot implicitly convert expression `'x'` of type `char` to `char[]` +fail_compilation/diag9765.d(11): Error: cannot implicitly convert expression `'x'` of type `char` to `char[]` +const S9765 s9765 = S9765('x'); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9831.d b/compiler/test/fail_compilation/diag9831.d index c93a06a465ac..94486ed15c2e 100644 --- a/compiler/test/fail_compilation/diag9831.d +++ b/compiler/test/fail_compilation/diag9831.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9831.d(13): Error: function `diag9831.main.__lambda3(__T1)(x)` cannot access variable `c` in frame of function `D main` -fail_compilation/diag9831.d(11): `c` declared here +fail_compilation/diag9831.d(17): Error: function `diag9831.main.__lambda3(__T1)(x)` cannot access variable `c` in frame of function `D main` + func = x => c; + ^ +fail_compilation/diag9831.d(15): `c` declared here + immutable int c; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9861.d b/compiler/test/fail_compilation/diag9861.d index 53faea189e9e..c5b7c5bf580f 100644 --- a/compiler/test/fail_compilation/diag9861.d +++ b/compiler/test/fail_compilation/diag9861.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9861.d(8): Error: no property `epsilon` for type `int` -fail_compilation/diag9861.d(9): while looking for match for `Foo!int` +fail_compilation/diag9861.d(12): Error: no property `epsilon` for type `int` +struct Foo(T, real x = T.epsilon) {} + ^ +fail_compilation/diag9861.d(13): while looking for match for `Foo!int` +Foo!(int) q; +^ --- */ struct Foo(T, real x = T.epsilon) {} diff --git a/compiler/test/fail_compilation/diag9880.d b/compiler/test/fail_compilation/diag9880.d index 597b94eb13d2..dce0f53dd722 100644 --- a/compiler/test/fail_compilation/diag9880.d +++ b/compiler/test/fail_compilation/diag9880.d @@ -1,10 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9880.d(12): Error: template instance `diag9880.foo!string` does not match template declaration `foo(T)(int)` +fail_compilation/diag9880.d(14): Error: template instance `diag9880.foo!string` does not match template declaration `foo(T)(int)` with `T = string` must satisfy the following constraint: ` is(T == int)` +void main() { alias f = foo!string; } + ^ --- */ diff --git a/compiler/test/fail_compilation/diag9961.d b/compiler/test/fail_compilation/diag9961.d index 3eba73520414..0869e4dd18ea 100644 --- a/compiler/test/fail_compilation/diag9961.d +++ b/compiler/test/fail_compilation/diag9961.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/diag9961.d(11): Error: cannot implicitly convert expression `""` of type `string` to `int` -fail_compilation/diag9961.d(14): Error: template instance `diag9961.foo!int` error instantiating -fail_compilation/diag9961.d(11): Error: cannot implicitly convert expression `""` of type `string` to `int` -fail_compilation/diag9961.d(15): Error: template instance `diag9961.foo!char` error instantiating +fail_compilation/diag9961.d(19): Error: cannot implicitly convert expression `""` of type `string` to `int` +void foo(T)(T) { int x = ""; } + ^ +fail_compilation/diag9961.d(22): Error: template instance `diag9961.foo!int` error instantiating + 100.foo(); + ^ +fail_compilation/diag9961.d(19): Error: cannot implicitly convert expression `""` of type `string` to `int` +void foo(T)(T) { int x = ""; } + ^ +fail_compilation/diag9961.d(23): Error: template instance `diag9961.foo!char` error instantiating + 'a'.foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag_class_alloc.d b/compiler/test/fail_compilation/diag_class_alloc.d index 326d82e07187..02aa9bec56aa 100644 --- a/compiler/test/fail_compilation/diag_class_alloc.d +++ b/compiler/test/fail_compilation/diag_class_alloc.d @@ -1,9 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/diag_class_alloc.d(15): Error: `new` allocator must be annotated with `@disabled` -fail_compilation/diag_class_alloc.d(16): Deprecation: `new` allocator with non-empty parameter list is deprecated -fail_compilation/diag_class_alloc.d(16): Deprecation: `new` allocator with function definition is deprecated +fail_compilation/diag_class_alloc.d(17): Error: `new` allocator must be annotated with `@disabled` + new(size_t size) // error message + ^ +fail_compilation/diag_class_alloc.d(18): Deprecation: `new` allocator with non-empty parameter list is deprecated +fail_compilation/diag_class_alloc.d(18): Deprecation: `new` allocator with function definition is deprecated --- */ diff --git a/compiler/test/fail_compilation/diag_cstyle.d b/compiler/test/fail_compilation/diag_cstyle.d index 72343e776053..780b6735db3f 100644 --- a/compiler/test/fail_compilation/diag_cstyle.d +++ b/compiler/test/fail_compilation/diag_cstyle.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/diag_cstyle.d(13): Error: instead of C-style syntax, use D-style `int function(int) fp1` -fail_compilation/diag_cstyle.d(14): Error: instead of C-style syntax, use D-style `int function(int)* fp3` -fail_compilation/diag_cstyle.d(16): Error: instead of C-style syntax, use D-style `int function(int) FP` -fail_compilation/diag_cstyle.d(18): Error: instead of C-style syntax, use D-style `int function() fp` -fail_compilation/diag_cstyle.d(18): Error: instead of C-style syntax, use D-style `int[] arr` -fail_compilation/diag_cstyle.d(20): Error: instead of C-style syntax, use D-style `string[] result` +fail_compilation/diag_cstyle.d(25): Error: instead of C-style syntax, use D-style `int function(int) fp1` +int (*fp1)(int); + ^ +fail_compilation/diag_cstyle.d(26): Error: instead of C-style syntax, use D-style `int function(int)* fp3` +int (*(*fp3))(int); + ^ +fail_compilation/diag_cstyle.d(28): Error: instead of C-style syntax, use D-style `int function(int) FP` +alias int(*FP)(int); + ^ +fail_compilation/diag_cstyle.d(30): Error: instead of C-style syntax, use D-style `int function() fp` +void foo(int(*fp)(), int arr[]) {} + ^ +fail_compilation/diag_cstyle.d(30): Error: instead of C-style syntax, use D-style `int[] arr` +void foo(int(*fp)(), int arr[]) {} + ^ +fail_compilation/diag_cstyle.d(32): Error: instead of C-style syntax, use D-style `string[] result` +string result[]() = "abc"; + ^ --- */ diff --git a/compiler/test/fail_compilation/diag_debug_conditional.d b/compiler/test/fail_compilation/diag_debug_conditional.d index 99884c70c429..769776221e8e 100644 --- a/compiler/test/fail_compilation/diag_debug_conditional.d +++ b/compiler/test/fail_compilation/diag_debug_conditional.d @@ -1,11 +1,16 @@ /** TEST_OUTPUT: --- -fail_compilation/diag_debug_conditional.d(1): Error: identifier or integer expected inside `debug(...)`, not `alias` -fail_compilation/diag_debug_conditional.d(2): Error: identifier or integer expected inside `version(...)`, not `alias` -fail_compilation/diag_debug_conditional.d(3): Error: declaration expected following attribute, not end of file +fail_compilation/diag_debug_conditional.d(15): Error: identifier or integer expected inside `debug(...)`, not `alias` +debug(alias) + ^ +fail_compilation/diag_debug_conditional.d(16): Error: identifier or integer expected inside `version(...)`, not `alias` +version(alias) + ^ +fail_compilation/diag_debug_conditional.d(17): Error: declaration expected following attribute, not end of file --- */ -#line 1 + +// Line 1 starts here debug(alias) version(alias) diff --git a/compiler/test/fail_compilation/diag_err1.d b/compiler/test/fail_compilation/diag_err1.d index d1659c401cf2..04f36282387c 100644 --- a/compiler/test/fail_compilation/diag_err1.d +++ b/compiler/test/fail_compilation/diag_err1.d @@ -1,15 +1,33 @@ /* TEST_OUTPUT: --- -fail_compilation/diag_err1.d(21): Error: undefined identifier `x` -fail_compilation/diag_err1.d(21): while evaluating `pragma(msg, [1, 2, x].length)` -fail_compilation/diag_err1.d(22): Error: undefined identifier `x` -fail_compilation/diag_err1.d(22): Error: undefined identifier `y` -fail_compilation/diag_err1.d(22): while evaluating `pragma(msg, (x + y).sizeof)` -fail_compilation/diag_err1.d(23): Error: undefined identifier `x` -fail_compilation/diag_err1.d(23): while evaluating `pragma(msg, (n += x).sizeof)` -fail_compilation/diag_err1.d(24): Error: incompatible types for `(s) ~ (n)`: `string` and `int` -fail_compilation/diag_err1.d(24): while evaluating `pragma(msg, (s ~ n).sizeof)` +fail_compilation/diag_err1.d(39): Error: undefined identifier `x` + pragma(msg, [1,2,x].length); + ^ +fail_compilation/diag_err1.d(39): while evaluating `pragma(msg, [1, 2, x].length)` + pragma(msg, [1,2,x].length); + ^ +fail_compilation/diag_err1.d(40): Error: undefined identifier `x` + pragma(msg, (x + y).sizeof); + ^ +fail_compilation/diag_err1.d(40): Error: undefined identifier `y` + pragma(msg, (x + y).sizeof); + ^ +fail_compilation/diag_err1.d(40): while evaluating `pragma(msg, (x + y).sizeof)` + pragma(msg, (x + y).sizeof); + ^ +fail_compilation/diag_err1.d(41): Error: undefined identifier `x` + pragma(msg, (n += x).sizeof); + ^ +fail_compilation/diag_err1.d(41): while evaluating `pragma(msg, (n += x).sizeof)` + pragma(msg, (n += x).sizeof); + ^ +fail_compilation/diag_err1.d(42): Error: incompatible types for `(s) ~ (n)`: `string` and `int` + pragma(msg, (s ~ n).sizeof); + ^ +fail_compilation/diag_err1.d(42): while evaluating `pragma(msg, (s ~ n).sizeof)` + pragma(msg, (s ~ n).sizeof); + ^ --- */ diff --git a/compiler/test/fail_compilation/diag_in_array.d b/compiler/test/fail_compilation/diag_in_array.d index f869b32856cc..2490839cb729 100644 --- a/compiler/test/fail_compilation/diag_in_array.d +++ b/compiler/test/fail_compilation/diag_in_array.d @@ -1,12 +1,16 @@ /** TEST_OUTPUT: --- -fail_compilation/diag_in_array.d(17): Error: incompatible types for `(3) in (a)`: `int` and `int[4]` -fail_compilation/diag_in_array.d(17): `in` is only allowed on associative arrays -fail_compilation/diag_in_array.d(17): perhaps use `std.algorithm.find(3, a[])` instead -fail_compilation/diag_in_array.d(19): Error: incompatible types for `("s") in (b)`: `string` and `string[]` -fail_compilation/diag_in_array.d(19): `in` is only allowed on associative arrays -fail_compilation/diag_in_array.d(19): perhaps use `std.algorithm.find("s", b)` instead +fail_compilation/diag_in_array.d(21): Error: incompatible types for `(3) in (a)`: `int` and `int[4]` + if (3 in a) + ^ +fail_compilation/diag_in_array.d(21): `in` is only allowed on associative arrays +fail_compilation/diag_in_array.d(21): perhaps use `std.algorithm.find(3, a[])` instead +fail_compilation/diag_in_array.d(23): Error: incompatible types for `("s") in (b)`: `string` and `string[]` + auto c = "s" in b; + ^ +fail_compilation/diag_in_array.d(23): `in` is only allowed on associative arrays +fail_compilation/diag_in_array.d(23): perhaps use `std.algorithm.find("s", b)` instead --- */ diff --git a/compiler/test/fail_compilation/diagin.d b/compiler/test/fail_compilation/diagin.d index 6e8a472cee68..fe5a69fe7be6 100644 --- a/compiler/test/fail_compilation/diagin.d +++ b/compiler/test/fail_compilation/diagin.d @@ -2,11 +2,19 @@ REQUIRED_ARGS: -preview=in TEST_OUTPUT: --- -fail_compilation/diagin.d(15): Error: function `foo` is not callable using argument types `()` -fail_compilation/diagin.d(15): too few arguments, expected 1, got 0 -fail_compilation/diagin.d(20): `diagin.foo(in int)` declared here -fail_compilation/diagin.d(17): Error: template `foo1` is not callable using argument types `!()(bool[])` -fail_compilation/diagin.d(21): Candidate is: `foo1(T)(in T v, string)` +fail_compilation/diagin.d(23): Error: function `foo` is not callable using argument types `()` + foo(); + ^ +fail_compilation/diagin.d(23): too few arguments, expected 1, got 0 +fail_compilation/diagin.d(28): `diagin.foo(in int)` declared here +void foo(in int) {} + ^ +fail_compilation/diagin.d(25): Error: template `foo1` is not callable using argument types `!()(bool[])` + foo1(lvalue); + ^ +fail_compilation/diagin.d(29): Candidate is: `foo1(T)(in T v, string)` +void foo1(T)(in T v, string) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/diaginref.d b/compiler/test/fail_compilation/diaginref.d index 2e83d76b5623..df64e1fe9e16 100644 --- a/compiler/test/fail_compilation/diaginref.d +++ b/compiler/test/fail_compilation/diaginref.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -preview=in TEST_OUTPUT: --- -fail_compilation/diaginref.d(11): Error: attribute `ref` is redundant with previously-applied `in` -fail_compilation/diaginref.d(13): Error: attribute `in` cannot be added after `ref`: remove `ref` +fail_compilation/diaginref.d(15): Error: attribute `ref` is redundant with previously-applied `in` +void foo1(in ref string) {} + ^ +fail_compilation/diaginref.d(17): Error: attribute `in` cannot be added after `ref`: remove `ref` +void foo3(T)(ref in T v, string) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/dip22a.d b/compiler/test/fail_compilation/dip22a.d index 661ebc33fa67..a5e0c4d97b3e 100644 --- a/compiler/test/fail_compilation/dip22a.d +++ b/compiler/test/fail_compilation/dip22a.d @@ -2,13 +2,27 @@ EXTRA_FILES: imports/dip22a.d TEST_OUTPUT: --- -fail_compilation/dip22a.d(18): Error: no property `bar` for `new Klass` of type `imports.dip22a.Klass` +fail_compilation/dip22a.d(32): Error: no property `bar` for `new Klass` of type `imports.dip22a.Klass` + new Klass().bar(); + ^ fail_compilation/imports/dip22a.d(3): class `Klass` defined here -fail_compilation/dip22a.d(19): Error: no property `bar` for `Struct()` of type `imports.dip22a.Struct` +class Klass +^ +fail_compilation/dip22a.d(33): Error: no property `bar` for `Struct()` of type `imports.dip22a.Struct` + Struct().bar(); + ^ fail_compilation/imports/dip22a.d(8): struct `Struct` defined here -fail_compilation/dip22a.d(20): Error: undefined identifier `bar` in module `imports.dip22a` -fail_compilation/dip22a.d(21): Error: no property `bar` for `Template!int` of type `void` -fail_compilation/dip22a.d(22): Error: no property `bar` for `12` of type `int` +struct Struct +^ +fail_compilation/dip22a.d(34): Error: undefined identifier `bar` in module `imports.dip22a` + imports.dip22a.bar(); + ^ +fail_compilation/dip22a.d(35): Error: no property `bar` for `Template!int` of type `void` + Template!int.bar(); + ^ +fail_compilation/dip22a.d(36): Error: no property `bar` for `12` of type `int` + 12.bar(); + ^ --- */ import imports.dip22a; diff --git a/compiler/test/fail_compilation/dip22b.d b/compiler/test/fail_compilation/dip22b.d index 0cd7247a85a4..9fd5267b7d90 100644 --- a/compiler/test/fail_compilation/dip22b.d +++ b/compiler/test/fail_compilation/dip22b.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/dip22b.d imports/dip22c.d TEST_OUTPUT: --- -fail_compilation/dip22b.d(12): Error: undefined identifier `Foo`, did you mean variable `foo`? +fail_compilation/dip22b.d(14): Error: undefined identifier `Foo`, did you mean variable `foo`? +Foo foo; + ^ --- */ module pkg.dip22; diff --git a/compiler/test/fail_compilation/dip22e.d b/compiler/test/fail_compilation/dip22e.d index f118cf12340f..e5c9ef080145 100644 --- a/compiler/test/fail_compilation/dip22e.d +++ b/compiler/test/fail_compilation/dip22e.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/dip22d.d imports/dip22e.d TEST_OUTPUT: --- -fail_compilation/dip22e.d(14): Error: undefined identifier `foo`, did you mean struct `Foo`? +fail_compilation/dip22e.d(16): Error: undefined identifier `foo`, did you mean struct `Foo`? + foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/dip25.d b/compiler/test/fail_compilation/dip25.d index f43a6e9ef8d1..7cf2262de390 100644 --- a/compiler/test/fail_compilation/dip25.d +++ b/compiler/test/fail_compilation/dip25.d @@ -2,11 +2,21 @@ REQUIRED_ARGS: TEST_OUTPUT: --- -fail_compilation/dip25.d(17): Error: returning `this.buffer[]` escapes a reference to parameter `this` -fail_compilation/dip25.d(15): perhaps annotate the function with `return` -fail_compilation/dip25.d(22): Error: returning `identity(x)` escapes a reference to parameter `x` -fail_compilation/dip25.d(23): Error: returning `identity(x)` escapes a reference to parameter `x` -fail_compilation/dip25.d(23): perhaps annotate the parameter with `return` +fail_compilation/dip25.d(27): Error: returning `this.buffer[]` escapes a reference to parameter `this` + return buffer[]; + ^ +fail_compilation/dip25.d(25): perhaps annotate the function with `return` + @property const(char)[] filename() const pure nothrow @safe + ^ +fail_compilation/dip25.d(32): Error: returning `identity(x)` escapes a reference to parameter `x` +ref int fun(return int x) @safe { return identity(x); } + ^ +fail_compilation/dip25.d(33): Error: returning `identity(x)` escapes a reference to parameter `x` +ref int fun2(ref int x) @safe { return identity(x); } + ^ +fail_compilation/dip25.d(33): perhaps annotate the parameter with `return` +ref int fun2(ref int x) @safe { return identity(x); } + ^ --- */ struct Data diff --git a/compiler/test/fail_compilation/disable.d b/compiler/test/fail_compilation/disable.d index 7e7d9c2d48d5..efc5e2228434 100644 --- a/compiler/test/fail_compilation/disable.d +++ b/compiler/test/fail_compilation/disable.d @@ -1,16 +1,36 @@ /* TEST_OUTPUT: --- -fail_compilation/disable.d(56): Error: function `disable.DisabledOpAssign.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(59): Error: function `disable.DisabledPostblit.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(62): Error: function `disable.HasDtor.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(66): Error: generated function `disable.Nested!(DisabledOpAssign).Nested.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(69): Error: generated function `disable.Nested!(DisabledPostblit).Nested.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(72): Error: generated function `disable.Nested!(HasDtor).Nested.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(76): Error: generated function `disable.NestedDtor!(DisabledOpAssign).NestedDtor.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(79): Error: generated function `disable.NestedDtor!(DisabledPostblit).NestedDtor.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(82): Error: generated function `disable.NestedDtor!(HasDtor).NestedDtor.opAssign` cannot be used because it is annotated with `@disable` -fail_compilation/disable.d(84): Error: enum member `disable.Enum1.value` cannot be used because it is annotated with `@disable` +fail_compilation/disable.d(76): Error: function `disable.DisabledOpAssign.opAssign` cannot be used because it is annotated with `@disable` + o = DisabledOpAssign(); + ^ +fail_compilation/disable.d(79): Error: function `disable.DisabledPostblit.opAssign` cannot be used because it is annotated with `@disable` + p = DisabledPostblit(); + ^ +fail_compilation/disable.d(82): Error: function `disable.HasDtor.opAssign` cannot be used because it is annotated with `@disable` + d = HasDtor(); + ^ +fail_compilation/disable.d(86): Error: generated function `disable.Nested!(DisabledOpAssign).Nested.opAssign` cannot be used because it is annotated with `@disable` + no = Nested!(DisabledOpAssign)(); + ^ +fail_compilation/disable.d(89): Error: generated function `disable.Nested!(DisabledPostblit).Nested.opAssign` cannot be used because it is annotated with `@disable` + np = Nested!(DisabledPostblit)(); + ^ +fail_compilation/disable.d(92): Error: generated function `disable.Nested!(HasDtor).Nested.opAssign` cannot be used because it is annotated with `@disable` + nd = Nested!(HasDtor)(); + ^ +fail_compilation/disable.d(96): Error: generated function `disable.NestedDtor!(DisabledOpAssign).NestedDtor.opAssign` cannot be used because it is annotated with `@disable` + ndo = NestedDtor!(DisabledOpAssign)(); + ^ +fail_compilation/disable.d(99): Error: generated function `disable.NestedDtor!(DisabledPostblit).NestedDtor.opAssign` cannot be used because it is annotated with `@disable` + ndp = NestedDtor!(DisabledPostblit)(); + ^ +fail_compilation/disable.d(102): Error: generated function `disable.NestedDtor!(HasDtor).NestedDtor.opAssign` cannot be used because it is annotated with `@disable` + ndd = NestedDtor!(HasDtor)(); + ^ +fail_compilation/disable.d(104): Error: enum member `disable.Enum1.value` cannot be used because it is annotated with `@disable` + auto v1 = Enum1.value; + ^ --- */ struct DisabledOpAssign { diff --git a/compiler/test/fail_compilation/disable_new.d b/compiler/test/fail_compilation/disable_new.d index 33ae32c2d8ab..b7632e55fec4 100644 --- a/compiler/test/fail_compilation/disable_new.d +++ b/compiler/test/fail_compilation/disable_new.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/disable_new.d(23): Error: cannot allocate `class C` with `new` because it is annotated with `@disable new()` -fail_compilation/disable_new.d(24): Error: cannot allocate `struct S` with `new` because it is annotated with `@disable new()` +fail_compilation/disable_new.d(27): Error: cannot allocate `class C` with `new` because it is annotated with `@disable new()` + auto c = new C(); + ^ +fail_compilation/disable_new.d(28): Error: cannot allocate `struct S` with `new` because it is annotated with `@disable new()` + auto s = new S(); + ^ --- */ diff --git a/compiler/test/fail_compilation/discard_value.d b/compiler/test/fail_compilation/discard_value.d index 7fe30a687065..81e7c650e2f3 100644 --- a/compiler/test/fail_compilation/discard_value.d +++ b/compiler/test/fail_compilation/discard_value.d @@ -1,15 +1,33 @@ /* TEST_OUTPUT: --- -fail_compilation/discard_value.d(24): Error: the result of the equality expression `3 is 3` is discarded -fail_compilation/discard_value.d(25): Error: the result of the equality expression `null !is null` is discarded -fail_compilation/discard_value.d(26): Error: the result of the equality expression `v == 0` is discarded -fail_compilation/discard_value.d(27): Error: the result of the equality expression `v == 0` is discarded -fail_compilation/discard_value.d(28): Error: `!__equals("", "")` has no effect -fail_compilation/discard_value.d(29): Error: the result of the equality expression `"" == ""` is discarded -fail_compilation/discard_value.d(30): Error: the result of the equality expression `fun().i == 4` is discarded -fail_compilation/discard_value.d(30): note that `fun().i` may have a side effect -fail_compilation/discard_value.d(33): Error: the result of the equality expression `slice == slice[0..0]` is discarded +fail_compilation/discard_value.d(42): Error: the result of the equality expression `3 is 3` is discarded + 3 is 3; + ^ +fail_compilation/discard_value.d(43): Error: the result of the equality expression `null !is null` is discarded + null !is null; + ^ +fail_compilation/discard_value.d(44): Error: the result of the equality expression `v == 0` is discarded + true && v == 0; + ^ +fail_compilation/discard_value.d(45): Error: the result of the equality expression `v == 0` is discarded + true || v == 0; + ^ +fail_compilation/discard_value.d(46): Error: `!__equals("", "")` has no effect + "" != ""; + ^ +fail_compilation/discard_value.d(47): Error: the result of the equality expression `"" == ""` is discarded + "" == ""; // https://issues.dlang.org/show_bug.cgi?id=24359 + ^ +fail_compilation/discard_value.d(48): Error: the result of the equality expression `fun().i == 4` is discarded + fun().i == 4; // https://issues.dlang.org/show_bug.cgi?id=12390 + ^ +fail_compilation/discard_value.d(48): note that `fun().i` may have a side effect + fun().i == 4; // https://issues.dlang.org/show_bug.cgi?id=12390 + ^ +fail_compilation/discard_value.d(51): Error: the result of the equality expression `slice == slice[0..0]` is discarded + slice == slice[0 .. 0]; + ^ --- */ diff --git a/compiler/test/fail_compilation/e15876_1.d b/compiler/test/fail_compilation/e15876_1.d index 0152cdee276f..c994c990c3d9 100644 --- a/compiler/test/fail_compilation/e15876_1.d +++ b/compiler/test/fail_compilation/e15876_1.d @@ -1,13 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/e15876_1.d(17): Error: valid scope identifiers are `exit`, `failure`, or `success`, not `x` -fail_compilation/e15876_1.d(18): Error: found `End of File` when expecting `)` -fail_compilation/e15876_1.d(18): Error: found `End of File` instead of statement -fail_compilation/e15876_1.d(18): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/e15876_1.d(17): unmatched `{` -fail_compilation/e15876_1.d(18): Error: found `End of File` when expecting `]` -fail_compilation/e15876_1.d(18): Error: no identifier for declarator `o[() +fail_compilation/e15876_1.d(19): Error: valid scope identifiers are `exit`, `failure`, or `success`, not `x` +fail_compilation/e15876_1.d(20): Error: found `End of File` when expecting `)` +fail_compilation/e15876_1.d(20): Error: found `End of File` instead of statement +fail_compilation/e15876_1.d(20): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/e15876_1.d(19): unmatched `{` +o[{scope(x + ^ +fail_compilation/e15876_1.d(20): Error: found `End of File` when expecting `]` +fail_compilation/e15876_1.d(20): Error: no identifier for declarator `o[() { scope(exit) __error__ } diff --git a/compiler/test/fail_compilation/e15876_2.d b/compiler/test/fail_compilation/e15876_2.d index 92164a4fd8b5..a9ee0ff2142e 100644 --- a/compiler/test/fail_compilation/e15876_2.d +++ b/compiler/test/fail_compilation/e15876_2.d @@ -1,11 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/e15876_2.d(16): Error: identifier expected following `template` -fail_compilation/e15876_2.d(16): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/e15876_2.d(15): unmatched `{` -fail_compilation/e15876_2.d(16): Error: found `End of File` when expecting `]` -fail_compilation/e15876_2.d(16): Error: no identifier for declarator `o[() +fail_compilation/e15876_2.d(18): Error: identifier expected following `template` +fail_compilation/e15876_2.d(18): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/e15876_2.d(17): unmatched `{` +o[{template + ^ +fail_compilation/e15876_2.d(18): Error: found `End of File` when expecting `]` +fail_compilation/e15876_2.d(18): Error: no identifier for declarator `o[() { ; } diff --git a/compiler/test/fail_compilation/e15876_3.d b/compiler/test/fail_compilation/e15876_3.d index 100c5e1ed5a9..377c088ceef9 100644 --- a/compiler/test/fail_compilation/e15876_3.d +++ b/compiler/test/fail_compilation/e15876_3.d @@ -1,19 +1,25 @@ /* TEST_OUTPUT: --- -fail_compilation/e15876_3.d(28): Error: unexpected `(` in declarator -fail_compilation/e15876_3.d(28): Error: basic type expected, not `=` -fail_compilation/e15876_3.d(29): Error: found `End of File` when expecting `(` -fail_compilation/e15876_3.d(29): Error: found `End of File` instead of statement -fail_compilation/e15876_3.d(29): Error: expression expected, not `End of File` -fail_compilation/e15876_3.d(29): Error: found `End of File` when expecting `;` following `for` condition -fail_compilation/e15876_3.d(29): Error: expression expected, not `End of File` -fail_compilation/e15876_3.d(29): Error: found `End of File` when expecting `)` -fail_compilation/e15876_3.d(29): Error: found `End of File` instead of statement -fail_compilation/e15876_3.d(29): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/e15876_3.d(28): unmatched `{` -fail_compilation/e15876_3.d(29): Error: found `End of File` when expecting `)` -fail_compilation/e15876_3.d(29): Error: no identifier for declarator `d(_error_ = () +fail_compilation/e15876_3.d(34): Error: unexpected `(` in declarator +d(={for + ^ +fail_compilation/e15876_3.d(34): Error: basic type expected, not `=` +d(={for + ^ +fail_compilation/e15876_3.d(35): Error: found `End of File` when expecting `(` +fail_compilation/e15876_3.d(35): Error: found `End of File` instead of statement +fail_compilation/e15876_3.d(35): Error: expression expected, not `End of File` +fail_compilation/e15876_3.d(35): Error: found `End of File` when expecting `;` following `for` condition +fail_compilation/e15876_3.d(35): Error: expression expected, not `End of File` +fail_compilation/e15876_3.d(35): Error: found `End of File` when expecting `)` +fail_compilation/e15876_3.d(35): Error: found `End of File` instead of statement +fail_compilation/e15876_3.d(35): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/e15876_3.d(34): unmatched `{` +d(={for + ^ +fail_compilation/e15876_3.d(35): Error: found `End of File` when expecting `)` +fail_compilation/e15876_3.d(35): Error: no identifier for declarator `d(_error_ = () { for (__error__ __error; __error) @@ -22,7 +28,7 @@ __error__ } } )` -fail_compilation/e15876_3.d(29): Error: semicolon expected following function declaration, not `End of File` +fail_compilation/e15876_3.d(35): Error: semicolon expected following function declaration, not `End of File` --- */ d(={for diff --git a/compiler/test/fail_compilation/e15876_4.d b/compiler/test/fail_compilation/e15876_4.d index a9115b92dd54..3a365f1efdf1 100644 --- a/compiler/test/fail_compilation/e15876_4.d +++ b/compiler/test/fail_compilation/e15876_4.d @@ -1,18 +1,22 @@ /* TEST_OUTPUT: --- -fail_compilation/e15876_4.d(26): Error: found `)` when expecting `(` -fail_compilation/e15876_4.d(27): Error: found `End of File` when expecting `(` -fail_compilation/e15876_4.d(27): Error: found `End of File` instead of statement -fail_compilation/e15876_4.d(27): Error: expression expected, not `End of File` -fail_compilation/e15876_4.d(27): Error: found `End of File` when expecting `;` following `for` condition -fail_compilation/e15876_4.d(27): Error: expression expected, not `End of File` -fail_compilation/e15876_4.d(27): Error: found `End of File` when expecting `)` -fail_compilation/e15876_4.d(27): Error: found `End of File` instead of statement -fail_compilation/e15876_4.d(27): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/e15876_4.d(26): unmatched `{` -fail_compilation/e15876_4.d(27): Error: found `End of File` when expecting `)` -fail_compilation/e15876_4.d(27): Error: no identifier for declarator `typeof(() +fail_compilation/e15876_4.d(30): Error: found `)` when expecting `(` +typeof){for + ^ +fail_compilation/e15876_4.d(31): Error: found `End of File` when expecting `(` +fail_compilation/e15876_4.d(31): Error: found `End of File` instead of statement +fail_compilation/e15876_4.d(31): Error: expression expected, not `End of File` +fail_compilation/e15876_4.d(31): Error: found `End of File` when expecting `;` following `for` condition +fail_compilation/e15876_4.d(31): Error: expression expected, not `End of File` +fail_compilation/e15876_4.d(31): Error: found `End of File` when expecting `)` +fail_compilation/e15876_4.d(31): Error: found `End of File` instead of statement +fail_compilation/e15876_4.d(31): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/e15876_4.d(30): unmatched `{` +typeof){for + ^ +fail_compilation/e15876_4.d(31): Error: found `End of File` when expecting `)` +fail_compilation/e15876_4.d(31): Error: no identifier for declarator `typeof(() { for (__error__ __error; __error) diff --git a/compiler/test/fail_compilation/e15876_5.d b/compiler/test/fail_compilation/e15876_5.d index 6bebc29fcb64..98c235fff888 100644 --- a/compiler/test/fail_compilation/e15876_5.d +++ b/compiler/test/fail_compilation/e15876_5.d @@ -1,12 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/e15876_5.d(17): Error: basic type expected, not `End of File` -fail_compilation/e15876_5.d(17): Error: semicolon expected to close `alias` declaration, not `End of File` -fail_compilation/e15876_5.d(17): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/e15876_5.d(16): unmatched `{` -fail_compilation/e15876_5.d(17): Error: found `End of File` when expecting `]` -fail_compilation/e15876_5.d(17): Error: no identifier for declarator `p[() +fail_compilation/e15876_5.d(19): Error: basic type expected, not `End of File` +fail_compilation/e15876_5.d(19): Error: semicolon expected to close `alias` declaration, not `End of File` +fail_compilation/e15876_5.d(19): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/e15876_5.d(18): unmatched `{` +p[{alias + ^ +fail_compilation/e15876_5.d(19): Error: found `End of File` when expecting `]` +fail_compilation/e15876_5.d(19): Error: no identifier for declarator `p[() { alias ; } diff --git a/compiler/test/fail_compilation/e7804_1.d b/compiler/test/fail_compilation/e7804_1.d index 1dfcf449771b..0344356c710f 100644 --- a/compiler/test/fail_compilation/e7804_1.d +++ b/compiler/test/fail_compilation/e7804_1.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/e7804_1.d(14): Error: undefined identifier `Aggr` -fail_compilation/e7804_1.d(15): Error: unrecognized trait `farfelu` -fail_compilation/e7804_1.d(17): Error: undefined identifier `Aggr` -fail_compilation/e7804_1.d(18): Error: unrecognized trait `farfelu` +fail_compilation/e7804_1.d(22): Error: undefined identifier `Aggr` +__traits(farfelu, Aggr, "member") a; +^ +fail_compilation/e7804_1.d(23): Error: unrecognized trait `farfelu` +__traits(farfelu, S, "member") a2; +^ +fail_compilation/e7804_1.d(25): Error: undefined identifier `Aggr` +alias foo = __traits(farfelu, Aggr, "member"); + ^ +fail_compilation/e7804_1.d(26): Error: unrecognized trait `farfelu` +alias foo2 = __traits(farfelu, S, "member"); + ^ --- */ module e7804_1; diff --git a/compiler/test/fail_compilation/e7804_2.d b/compiler/test/fail_compilation/e7804_2.d index ef9b784b24a7..86882a143045 100644 --- a/compiler/test/fail_compilation/e7804_2.d +++ b/compiler/test/fail_compilation/e7804_2.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/e7804_2.d(17): Error: `__traits(getMember, Foo, "func")` does not give a valid type +fail_compilation/e7804_2.d(19): Error: `__traits(getMember, Foo, "func")` does not give a valid type + __traits(getMember, Foo, "func") var; + ^ --- */ diff --git a/compiler/test/fail_compilation/editions.d b/compiler/test/fail_compilation/editions.d index 869ee22c11cb..de82d9171d94 100644 --- a/compiler/test/fail_compilation/editions.d +++ b/compiler/test/fail_compilation/editions.d @@ -3,7 +3,9 @@ Test language editions (currently experimental) TEST_OUTPUT: --- -fail_compilation/editions.d(15): Error: scope parameter `x` may not be returned +fail_compilation/editions.d(17): Error: scope parameter `x` may not be returned + return x; + ^ --- */ @__edition_latest_do_not_use diff --git a/compiler/test/fail_compilation/enum9921.d b/compiler/test/fail_compilation/enum9921.d index 51c8b1a66538..8901a6b9537a 100644 --- a/compiler/test/fail_compilation/enum9921.d +++ b/compiler/test/fail_compilation/enum9921.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/enum9921.d(9): Error: enum `enum9921.X` base type must not be `void` -fail_compilation/enum9921.d(11): Error: enum `enum9921.Z` base type must not be `void` -fail_compilation/enum9921.d(13): Error: variable `enum9921.x` - manifest constants must have initializers +fail_compilation/enum9921.d(15): Error: enum `enum9921.X` base type must not be `void` +enum X : void; +^ +fail_compilation/enum9921.d(17): Error: enum `enum9921.Z` base type must not be `void` +enum Z : void { Y }; +^ +fail_compilation/enum9921.d(19): Error: variable `enum9921.x` - manifest constants must have initializers +enum int x; + ^ --- */ enum X : void; diff --git a/compiler/test/fail_compilation/enum_function.d b/compiler/test/fail_compilation/enum_function.d index 52b71d12f5d9..af33bf5a8a02 100644 --- a/compiler/test/fail_compilation/enum_function.d +++ b/compiler/test/fail_compilation/enum_function.d @@ -2,10 +2,18 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/enum_function.d(11): Deprecation: function cannot have enum storage class -fail_compilation/enum_function.d(12): Deprecation: function cannot have enum storage class -fail_compilation/enum_function.d(13): Deprecation: function cannot have enum storage class -fail_compilation/enum_function.d(14): Deprecation: function cannot have enum storage class +fail_compilation/enum_function.d(19): Deprecation: function cannot have enum storage class +enum void f1() { return; } + ^ +fail_compilation/enum_function.d(20): Deprecation: function cannot have enum storage class +enum f2() { return 5; } + ^ +fail_compilation/enum_function.d(21): Deprecation: function cannot have enum storage class +enum f3() => 5; + ^ +fail_compilation/enum_function.d(22): Deprecation: function cannot have enum storage class +enum int f4()() => 5; + ^ --- */ enum void f1() { return; } diff --git a/compiler/test/fail_compilation/enum_member.d b/compiler/test/fail_compilation/enum_member.d index 94c6f9811952..f81eec242ebe 100644 --- a/compiler/test/fail_compilation/enum_member.d +++ b/compiler/test/fail_compilation/enum_member.d @@ -1,12 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/enum_member.d(14): Error: basic type expected, not `for` -fail_compilation/enum_member.d(15): Error: no identifier for declarator `T` -fail_compilation/enum_member.d(15): Error: found `@` when expecting `,` -fail_compilation/enum_member.d(22): Error: found `}` when expecting `identifier` -fail_compilation/enum_member.d(24): Error: found `End of File` when expecting `,` -fail_compilation/enum_member.d(24): Error: premature end of file +fail_compilation/enum_member.d(20): Error: basic type expected, not `for` + for, + ^ +fail_compilation/enum_member.d(21): Error: no identifier for declarator `T` + T @a b = 1 + ^ +fail_compilation/enum_member.d(21): Error: found `@` when expecting `,` + T @a b = 1 + ^ +fail_compilation/enum_member.d(28): Error: found `}` when expecting `identifier` +fail_compilation/enum_member.d(30): Error: found `End of File` when expecting `,` +fail_compilation/enum_member.d(30): Error: premature end of file --- */ enum diff --git a/compiler/test/fail_compilation/fail10.d b/compiler/test/fail_compilation/fail10.d index 48901a1b4e40..8b0963bb0cf1 100644 --- a/compiler/test/fail_compilation/fail10.d +++ b/compiler/test/fail_compilation/fail10.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10.d(18): Error: mixin `Foo!y` cannot resolve forward reference +fail_compilation/fail10.d(20): Error: mixin `Foo!y` cannot resolve forward reference + mixin Foo!(y) y; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail100.d b/compiler/test/fail_compilation/fail100.d index a8189ecb0af7..f9dd0add3b4a 100644 --- a/compiler/test/fail_compilation/fail100.d +++ b/compiler/test/fail_compilation/fail100.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail100.d(24): Error: cannot implicitly convert expression `f` of type `Class[]` to `I[]` +fail_compilation/fail100.d(26): Error: cannot implicitly convert expression `f` of type `Class[]` to `I[]` + return f; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10082.d b/compiler/test/fail_compilation/fail10082.d index 8a3d2fbf5662..c4585e0becb1 100644 --- a/compiler/test/fail_compilation/fail10082.d +++ b/compiler/test/fail_compilation/fail10082.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10082.d(24): Error: cannot infer type from overloaded function symbol `&foo` +fail_compilation/fail10082.d(26): Error: cannot infer type from overloaded function symbol `&foo` + auto x = &A.foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail101.d b/compiler/test/fail_compilation/fail101.d index 0f6e0b3ee49e..7191f3d271a0 100644 --- a/compiler/test/fail_compilation/fail101.d +++ b/compiler/test/fail_compilation/fail101.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail101.d(9): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead -fail_compilation/fail101.d(9): Error: cannot implicitly convert expression `1` of type `int` to `creal` +fail_compilation/fail101.d(13): Deprecation: use of complex type `creal` is deprecated, use `std.complex.Complex!(real)` instead +creal c = 1; + ^ +fail_compilation/fail101.d(13): Error: cannot implicitly convert expression `1` of type `int` to `creal` +creal c = 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10102.d b/compiler/test/fail_compilation/fail10102.d index 17577ec84f4e..6186faa1081c 100644 --- a/compiler/test/fail_compilation/fail10102.d +++ b/compiler/test/fail_compilation/fail10102.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10102.d(48): Error: variable `fail10102.main.m` - default construction is disabled for type `NotNull!(int*)` -fail_compilation/fail10102.d(49): Error: variable `fail10102.main.a` - default construction is disabled for type `NotNull!(int*)[3]` -fail_compilation/fail10102.d(50): Error: default construction is disabled for type `NotNull!(int*)` -fail_compilation/fail10102.d(51): Error: field `S.m` must be initialized because it has no default constructor +fail_compilation/fail10102.d(56): Error: variable `fail10102.main.m` - default construction is disabled for type `NotNull!(int*)` + NotNull!(int*) m; // should fail + ^ +fail_compilation/fail10102.d(57): Error: variable `fail10102.main.a` - default construction is disabled for type `NotNull!(int*)[3]` + NotNull!(int*)[3] a; // should fail + ^ +fail_compilation/fail10102.d(58): Error: default construction is disabled for type `NotNull!(int*)` + auto b = new NotNull!(int*)[3]; // should fail + ^ +fail_compilation/fail10102.d(59): Error: field `S.m` must be initialized because it has no default constructor + S s = S(); // should fail + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10115.d b/compiler/test/fail_compilation/fail10115.d index 4d766cf79566..015c16de5a4c 100644 --- a/compiler/test/fail_compilation/fail10115.d +++ b/compiler/test/fail_compilation/fail10115.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10115.d(35): Error: cannot have `out` parameter of type `S` because the default construction is disabled -fail_compilation/fail10115.d(35): Error: cannot have `out` parameter of type `E` because the default construction is disabled -fail_compilation/fail10115.d(35): Error: cannot have `out` parameter of type `U` because the default construction is disabled -fail_compilation/fail10115.d(40): Error: struct `fail10115.S` default construction is disabled -fail_compilation/fail10115.d(41): Error: struct `fail10115.S` default construction is disabled -fail_compilation/fail10115.d(42): Error: union `fail10115.U` default construction is disabled +fail_compilation/fail10115.d(47): Error: cannot have `out` parameter of type `S` because the default construction is disabled + void foo(out S s, out E e, out U u) { } + ^ +fail_compilation/fail10115.d(47): Error: cannot have `out` parameter of type `E` because the default construction is disabled + void foo(out S s, out E e, out U u) { } + ^ +fail_compilation/fail10115.d(47): Error: cannot have `out` parameter of type `U` because the default construction is disabled + void foo(out S s, out E e, out U u) { } + ^ +fail_compilation/fail10115.d(52): Error: struct `fail10115.S` default construction is disabled + a.length = 5; // compiles -> NG + ^ +fail_compilation/fail10115.d(53): Error: struct `fail10115.S` default construction is disabled + e.length = 5; // compiles -> NG + ^ +fail_compilation/fail10115.d(54): Error: union `fail10115.U` default construction is disabled + u.length = 5; // compiles -> NG + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10254.d b/compiler/test/fail_compilation/fail10254.d index 8ad8fded58b4..211a4cc1387d 100644 --- a/compiler/test/fail_compilation/fail10254.d +++ b/compiler/test/fail_compilation/fail10254.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10254.d(20): Error: `pure` function `fail10254.foo` cannot call impure constructor `fail10254.C.this` -fail_compilation/fail10254.d(20): Error: `@safe` function `fail10254.foo` cannot call `@system` constructor `fail10254.C.this` -fail_compilation/fail10254.d(15): `fail10254.C.this` is declared here -fail_compilation/fail10254.d(21): Error: `pure` function `fail10254.foo` cannot call impure constructor `fail10254.S.this` -fail_compilation/fail10254.d(21): Error: `@safe` function `fail10254.foo` cannot call `@system` constructor `fail10254.S.this` -fail_compilation/fail10254.d(16): `fail10254.S.this` is declared here +fail_compilation/fail10254.d(32): Error: `pure` function `fail10254.foo` cannot call impure constructor `fail10254.C.this` + auto c = new C; // This line should be a compilation error. + ^ +fail_compilation/fail10254.d(32): Error: `@safe` function `fail10254.foo` cannot call `@system` constructor `fail10254.C.this` + auto c = new C; // This line should be a compilation error. + ^ +fail_compilation/fail10254.d(27): `fail10254.C.this` is declared here +class C { this() { a = 2; } } + ^ +fail_compilation/fail10254.d(33): Error: `pure` function `fail10254.foo` cannot call impure constructor `fail10254.S.this` + auto s = new S(1); + ^ +fail_compilation/fail10254.d(33): Error: `@safe` function `fail10254.foo` cannot call `@system` constructor `fail10254.S.this` + auto s = new S(1); + ^ +fail_compilation/fail10254.d(28): `fail10254.S.this` is declared here +struct S { this(int) { a = 2; } } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10277.d b/compiler/test/fail_compilation/fail10277.d index 11ad9d5a75f6..672d890de373 100644 --- a/compiler/test/fail_compilation/fail10277.d +++ b/compiler/test/fail_compilation/fail10277.d @@ -4,25 +4,65 @@ module fail10227; TEST_OUTPUT: --- fail_compilation/imports/fail10277.d(3): Error: class `TypeInfo` only object.d can define this reserved class name +class TypeInfo { } +^ fail_compilation/imports/fail10277.d(4): Error: class `TypeInfo_Class` only object.d can define this reserved class name +class TypeInfo_Class { } +^ fail_compilation/imports/fail10277.d(5): Error: class `TypeInfo_Interface` only object.d can define this reserved class name +class TypeInfo_Interface { } +^ fail_compilation/imports/fail10277.d(6): Error: class `TypeInfo_Struct` only object.d can define this reserved class name +class TypeInfo_Struct { } +^ fail_compilation/imports/fail10277.d(8): Error: class `TypeInfo_Pointer` only object.d can define this reserved class name +class TypeInfo_Pointer { } +^ fail_compilation/imports/fail10277.d(9): Error: class `TypeInfo_Array` only object.d can define this reserved class name +class TypeInfo_Array { } +^ fail_compilation/imports/fail10277.d(10): Error: class `TypeInfo_AssociativeArray` only object.d can define this reserved class name +class TypeInfo_AssociativeArray { } +^ fail_compilation/imports/fail10277.d(11): Error: class `TypeInfo_Enum` only object.d can define this reserved class name +class TypeInfo_Enum { } +^ fail_compilation/imports/fail10277.d(12): Error: class `TypeInfo_Function` only object.d can define this reserved class name +class TypeInfo_Function { } +^ fail_compilation/imports/fail10277.d(13): Error: class `TypeInfo_Delegate` only object.d can define this reserved class name +class TypeInfo_Delegate { } +^ fail_compilation/imports/fail10277.d(14): Error: class `TypeInfo_Tuple` only object.d can define this reserved class name +class TypeInfo_Tuple { } +^ fail_compilation/imports/fail10277.d(15): Error: class `TypeInfo_Const` only object.d can define this reserved class name +class TypeInfo_Const { } +^ fail_compilation/imports/fail10277.d(16): Error: class `TypeInfo_Invariant` only object.d can define this reserved class name +class TypeInfo_Invariant { } +^ fail_compilation/imports/fail10277.d(17): Error: class `TypeInfo_Shared` only object.d can define this reserved class name +class TypeInfo_Shared { } +^ fail_compilation/imports/fail10277.d(18): Error: class `TypeInfo_Inout` only object.d can define this reserved class name +class TypeInfo_Inout { } +^ fail_compilation/imports/fail10277.d(19): Error: class `TypeInfo_Vector` only object.d can define this reserved class name +class TypeInfo_Vector { } +^ fail_compilation/imports/fail10277.d(20): Error: class `Object` only object.d can define this reserved class name +class Object { } +^ fail_compilation/imports/fail10277.d(21): Error: class `Throwable` only object.d can define this reserved class name +class Throwable { } +^ fail_compilation/imports/fail10277.d(22): Error: class `Exception` only object.d can define this reserved class name +class Exception { } +^ fail_compilation/imports/fail10277.d(23): Error: class `Error` only object.d can define this reserved class name +class Error { } +^ --- */ diff --git a/compiler/test/fail_compilation/fail10285.d b/compiler/test/fail_compilation/fail10285.d index 108712533d2a..7371d21bfa3f 100644 --- a/compiler/test/fail_compilation/fail10285.d +++ b/compiler/test/fail_compilation/fail10285.d @@ -1,14 +1,26 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10285.d(16): Error: no identifier for declarator `int` -fail_compilation/fail10285.d(17): Error: expected `,` or `=` after identifier, not `y` -fail_compilation/fail10285.d(17): Error: initializer required after `x` when type is specified -fail_compilation/fail10285.d(18): Error: no identifier for declarator `int` -fail_compilation/fail10285.d(18): Error: found `bool` when expecting `,` -fail_compilation/fail10285.d(19): Error: no identifier for declarator `j` -fail_compilation/fail10285.d(19): Error: found `int` when expecting `,` -fail_compilation/fail10285.d(21): Error: initializer required after `z` when type is specified +fail_compilation/fail10285.d(28): Error: no identifier for declarator `int` + int = 5, + ^ +fail_compilation/fail10285.d(29): Error: expected `,` or `=` after identifier, not `y` + int x y, + ^ +fail_compilation/fail10285.d(29): Error: initializer required after `x` when type is specified +fail_compilation/fail10285.d(30): Error: no identifier for declarator `int` + int bool i = 3, + ^ +fail_compilation/fail10285.d(30): Error: found `bool` when expecting `,` + int bool i = 3, + ^ +fail_compilation/fail10285.d(31): Error: no identifier for declarator `j` + j int k = 3, + ^ +fail_compilation/fail10285.d(31): Error: found `int` when expecting `,` + j int k = 3, + ^ +fail_compilation/fail10285.d(33): Error: initializer required after `z` when type is specified --- */ enum diff --git a/compiler/test/fail_compilation/fail10299.d b/compiler/test/fail_compilation/fail10299.d index d9cfb0477248..1342c772be80 100644 --- a/compiler/test/fail_compilation/fail10299.d +++ b/compiler/test/fail_compilation/fail10299.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10299.d(11): Error: cannot take address of expression `foo!string` because it is not an lvalue +fail_compilation/fail10299.d(13): Error: cannot take address of expression `foo!string` because it is not an lvalue +auto fp = &foo!string; // ICE + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10346.d b/compiler/test/fail_compilation/fail10346.d index 304c00d58fba..30d8d6dde98f 100644 --- a/compiler/test/fail_compilation/fail10346.d +++ b/compiler/test/fail_compilation/fail10346.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10346.d(9): Error: undefined identifier `T` +fail_compilation/fail10346.d(11): Error: undefined identifier `T` +void bar(T x, T)(Foo!T) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail104.d b/compiler/test/fail_compilation/fail104.d index e9190de62062..51e8809b774b 100644 --- a/compiler/test/fail_compilation/fail104.d +++ b/compiler/test/fail_compilation/fail104.d @@ -5,9 +5,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail104.d(26): Error: template instance `P!()` `P` is not a template declaration, it is a alias -fail_compilation/fail104.d(26): Error: mixin `fail104.C!(S).C.T!()` is not defined -fail_compilation/fail104.d(31): Error: template instance `fail104.C!(S)` error instantiating +fail_compilation/fail104.d(32): Error: template instance `P!()` `P` is not a template declaration, it is a alias + mixin P!().T!(); + ^ +fail_compilation/fail104.d(32): Error: mixin `fail104.C!(S).C.T!()` is not defined + mixin P!().T!(); + ^ +fail_compilation/fail104.d(37): Error: template instance `fail104.C!(S)` error instantiating + auto c = new C!(S); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10481.d b/compiler/test/fail_compilation/fail10481.d index a6657c04b397..7b9607d611dd 100644 --- a/compiler/test/fail_compilation/fail10481.d +++ b/compiler/test/fail_compilation/fail10481.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10481.d(11): Error: undefined identifier `T1`, did you mean alias `T0`? -fail_compilation/fail10481.d(15): Error: cannot infer type from template instance `get!(A)` +fail_compilation/fail10481.d(15): Error: undefined identifier `T1`, did you mean alias `T0`? +void get(T0 = T1.Req, Params...)(Params , T1) {} + ^ +fail_compilation/fail10481.d(19): Error: cannot infer type from template instance `get!(A)` + auto xxx = get!A; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail105.d b/compiler/test/fail_compilation/fail105.d index 0e13e3677eba..be3fb30f126e 100644 --- a/compiler/test/fail_compilation/fail105.d +++ b/compiler/test/fail_compilation/fail105.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail105.d(11): Error: cannot cast `"bar"` to `int` at compile time +fail_compilation/fail105.d(13): Error: cannot cast `"bar"` to `int` at compile time +int bar = cast(int)cast(char*)"bar"; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10528.d b/compiler/test/fail_compilation/fail10528.d index 3b3f5bb7f79d..3ae594b78186 100644 --- a/compiler/test/fail_compilation/fail10528.d +++ b/compiler/test/fail_compilation/fail10528.d @@ -2,18 +2,42 @@ EXTRA_FILES: imports/a10528.d TEST_OUTPUT: --- -fail_compilation/fail10528.d(24): Error: undefined identifier `a` -fail_compilation/fail10528.d(25): Error: undefined identifier `a` in module `a10528` -fail_compilation/fail10528.d(27): Error: undefined identifier `b` -fail_compilation/fail10528.d(28): Error: undefined identifier `b` in module `a10528` -fail_compilation/fail10528.d(30): Error: no property `c` for type `a10528.S` +fail_compilation/fail10528.d(48): Error: undefined identifier `a` + auto a1 = a; + ^ +fail_compilation/fail10528.d(49): Error: undefined identifier `a` in module `a10528` + auto a2 = imports.a10528.a; + ^ +fail_compilation/fail10528.d(51): Error: undefined identifier `b` + auto b1 = b; + ^ +fail_compilation/fail10528.d(52): Error: undefined identifier `b` in module `a10528` + auto b2 = imports.a10528.b; + ^ +fail_compilation/fail10528.d(54): Error: no property `c` for type `a10528.S` + auto c1 = S.c; + ^ fail_compilation/imports/a10528.d(4): struct `S` defined here -fail_compilation/fail10528.d(31): Error: no property `c` for type `a10528.S` +struct S { private enum string c = "qwerty"; } +^ +fail_compilation/fail10528.d(55): Error: no property `c` for type `a10528.S` + with (S) auto c2 = c; + ^ fail_compilation/imports/a10528.d(4): struct `S` defined here -fail_compilation/fail10528.d(33): Error: no property `d` for type `a10528.C` +struct S { private enum string c = "qwerty"; } +^ +fail_compilation/fail10528.d(57): Error: no property `d` for type `a10528.C` + auto d1 = C.d; + ^ fail_compilation/imports/a10528.d(5): class `C` defined here -fail_compilation/fail10528.d(34): Error: no property `d` for type `a10528.C` +class C { private enum string d = "qwerty"; } +^ +fail_compilation/fail10528.d(58): Error: no property `d` for type `a10528.C` + with (C) auto d2 = d; + ^ fail_compilation/imports/a10528.d(5): class `C` defined here +class C { private enum string d = "qwerty"; } +^ --- */ diff --git a/compiler/test/fail_compilation/fail10534.d b/compiler/test/fail_compilation/fail10534.d index b5bb67c26786..e68082592c62 100644 --- a/compiler/test/fail_compilation/fail10534.d +++ b/compiler/test/fail_compilation/fail10534.d @@ -1,22 +1,54 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10534.d(28): Error: illegal operator `+` for `a` of type `int delegate()` -fail_compilation/fail10534.d(28): Error: illegal operator `+` for `b` of type `int delegate()` -fail_compilation/fail10534.d(29): Error: illegal operator `-` for `a` of type `int delegate()` -fail_compilation/fail10534.d(29): Error: illegal operator `-` for `b` of type `int delegate()` -fail_compilation/fail10534.d(30): Error: illegal operator `/` for `a` of type `int delegate()` -fail_compilation/fail10534.d(30): Error: illegal operator `/` for `b` of type `int delegate()` -fail_compilation/fail10534.d(31): Error: illegal operator `*` for `a` of type `int delegate()` -fail_compilation/fail10534.d(31): Error: illegal operator `*` for `b` of type `int delegate()` -fail_compilation/fail10534.d(36): Error: illegal operator `+` for `a` of type `int function()` -fail_compilation/fail10534.d(36): Error: illegal operator `+` for `b` of type `int function()` -fail_compilation/fail10534.d(37): Error: illegal operator `-` for `a` of type `int function()` -fail_compilation/fail10534.d(37): Error: illegal operator `-` for `b` of type `int function()` -fail_compilation/fail10534.d(38): Error: illegal operator `/` for `a` of type `int function()` -fail_compilation/fail10534.d(38): Error: illegal operator `/` for `b` of type `int function()` -fail_compilation/fail10534.d(39): Error: illegal operator `*` for `a` of type `int function()` -fail_compilation/fail10534.d(39): Error: illegal operator `*` for `b` of type `int function()` +fail_compilation/fail10534.d(60): Error: illegal operator `+` for `a` of type `int delegate()` + auto c1 = a + b; // passes (and will crash if c1() called) + ^ +fail_compilation/fail10534.d(60): Error: illegal operator `+` for `b` of type `int delegate()` + auto c1 = a + b; // passes (and will crash if c1() called) + ^ +fail_compilation/fail10534.d(61): Error: illegal operator `-` for `a` of type `int delegate()` + auto c2 = a - b; // passes (and will crash if c2() called) + ^ +fail_compilation/fail10534.d(61): Error: illegal operator `-` for `b` of type `int delegate()` + auto c2 = a - b; // passes (and will crash if c2() called) + ^ +fail_compilation/fail10534.d(62): Error: illegal operator `/` for `a` of type `int delegate()` + auto c3 = a / b; // a & b not of arithmetic type + ^ +fail_compilation/fail10534.d(62): Error: illegal operator `/` for `b` of type `int delegate()` + auto c3 = a / b; // a & b not of arithmetic type + ^ +fail_compilation/fail10534.d(63): Error: illegal operator `*` for `a` of type `int delegate()` + auto c4 = a * b; // a & b not of arithmetic type + ^ +fail_compilation/fail10534.d(63): Error: illegal operator `*` for `b` of type `int delegate()` + auto c4 = a * b; // a & b not of arithmetic type + ^ +fail_compilation/fail10534.d(68): Error: illegal operator `+` for `a` of type `int function()` + auto c1 = a + b; + ^ +fail_compilation/fail10534.d(68): Error: illegal operator `+` for `b` of type `int function()` + auto c1 = a + b; + ^ +fail_compilation/fail10534.d(69): Error: illegal operator `-` for `a` of type `int function()` + auto c2 = a - b; + ^ +fail_compilation/fail10534.d(69): Error: illegal operator `-` for `b` of type `int function()` + auto c2 = a - b; + ^ +fail_compilation/fail10534.d(70): Error: illegal operator `/` for `a` of type `int function()` + auto c3 = a / b; + ^ +fail_compilation/fail10534.d(70): Error: illegal operator `/` for `b` of type `int function()` + auto c3 = a / b; + ^ +fail_compilation/fail10534.d(71): Error: illegal operator `*` for `a` of type `int function()` + auto c4 = a * b; + ^ +fail_compilation/fail10534.d(71): Error: illegal operator `*` for `b` of type `int function()` + auto c4 = a * b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail106.d b/compiler/test/fail_compilation/fail106.d index ba9f7dd69cde..6d6d3e03a49b 100644 --- a/compiler/test/fail_compilation/fail106.d +++ b/compiler/test/fail_compilation/fail106.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail106.d(12): Error: cannot modify `immutable` expression `"ABC"[2]` +fail_compilation/fail106.d(14): Error: cannot modify `immutable` expression `"ABC"[2]` + "ABC"[2] = 's'; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10630.d b/compiler/test/fail_compilation/fail10630.d index 35feaea24245..7d6eba7d5fc9 100644 --- a/compiler/test/fail_compilation/fail10630.d +++ b/compiler/test/fail_compilation/fail10630.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10630.d(12): Error: cannot have `out` parameter of type `S` because the default construction is disabled +fail_compilation/fail10630.d(14): Error: cannot have `out` parameter of type `S` because the default construction is disabled +void foo(out S) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10666.d b/compiler/test/fail_compilation/fail10666.d index 9fe28d02ffd7..068c87f2f43d 100644 --- a/compiler/test/fail_compilation/fail10666.d +++ b/compiler/test/fail_compilation/fail10666.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10666.d(16): Error: variable `fail10666.foo10666.s1` has scoped destruction, cannot build closure +fail_compilation/fail10666.d(18): Error: variable `fail10666.foo10666.s1` has scoped destruction, cannot build closure +void foo10666(S10666 s1) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10806.d b/compiler/test/fail_compilation/fail10806.d index 48f35371ddcb..0072c9eb42f0 100644 --- a/compiler/test/fail_compilation/fail10806.d +++ b/compiler/test/fail_compilation/fail10806.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10806.d(12): Error: function `fail10806.Class.clone` incompatible covariant types `First()` and `Second()` +fail_compilation/fail10806.d(14): Error: function `fail10806.Class.clone` incompatible covariant types `First()` and `Second()` + override Class clone() { return this; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10947.d b/compiler/test/fail_compilation/fail10947.d index 9b2de96ff2a1..e6060b239309 100644 --- a/compiler/test/fail_compilation/fail10947.d +++ b/compiler/test/fail_compilation/fail10947.d @@ -1,15 +1,33 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10947.d(21): Error: cannot have `immutable out` parameter of type `immutable(S)` -fail_compilation/fail10947.d(22): Error: cannot have `immutable out` parameter of type `immutable(S)` -fail_compilation/fail10947.d(23): Error: cannot have `immutable out` parameter of type `immutable(S)` -fail_compilation/fail10947.d(25): Error: cannot have `const out` parameter of type `const(S)` -fail_compilation/fail10947.d(26): Error: cannot have `const out` parameter of type `const(S)` -fail_compilation/fail10947.d(27): Error: cannot have `const out` parameter of type `const(S)` -fail_compilation/fail10947.d(29): Error: cannot have `inout out` parameter of type `inout(S)` -fail_compilation/fail10947.d(30): Error: cannot have `inout out` parameter of type `inout(S)` -fail_compilation/fail10947.d(31): Error: cannot have `inout out` parameter of type `inout(S)` +fail_compilation/fail10947.d(39): Error: cannot have `immutable out` parameter of type `immutable(S)` +void fooi1(out SI) {} + ^ +fail_compilation/fail10947.d(40): Error: cannot have `immutable out` parameter of type `immutable(S)` +void fooi2(out immutable(S)) {} + ^ +fail_compilation/fail10947.d(41): Error: cannot have `immutable out` parameter of type `immutable(S)` +void fooi3(out immutable S) {} + ^ +fail_compilation/fail10947.d(43): Error: cannot have `const out` parameter of type `const(S)` +void fooc1(out SC) {} + ^ +fail_compilation/fail10947.d(44): Error: cannot have `const out` parameter of type `const(S)` +void fooc2(out const(S)) {} + ^ +fail_compilation/fail10947.d(45): Error: cannot have `const out` parameter of type `const(S)` +void fooc3(out const S) {} + ^ +fail_compilation/fail10947.d(47): Error: cannot have `inout out` parameter of type `inout(S)` +void foow1(out SW) {} + ^ +fail_compilation/fail10947.d(48): Error: cannot have `inout out` parameter of type `inout(S)` +void foow2(out inout(S)) {} + ^ +fail_compilation/fail10947.d(49): Error: cannot have `inout out` parameter of type `inout(S)` +void foow3(out inout S) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10964.d b/compiler/test/fail_compilation/fail10964.d index 9f38cb04069b..91382de1e8a2 100644 --- a/compiler/test/fail_compilation/fail10964.d +++ b/compiler/test/fail_compilation/fail10964.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10964.d(28): Error: function `fail10964.S.__postblit` is not `nothrow` -fail_compilation/fail10964.d(29): Error: function `fail10964.S.__postblit` is not `nothrow` -fail_compilation/fail10964.d(30): Error: function `fail10964.S.__postblit` is not `nothrow` -fail_compilation/fail10964.d(33): Error: function `fail10964.S.__postblit` is not `nothrow` -fail_compilation/fail10964.d(34): Error: function `fail10964.S.__postblit` is not `nothrow` -fail_compilation/fail10964.d(35): Error: function `fail10964.S.__postblit` is not `nothrow` -fail_compilation/fail10964.d(22): Error: function `fail10964.foo` may throw but is marked as `nothrow` +fail_compilation/fail10964.d(42): Error: function `fail10964.S.__postblit` is not `nothrow` + ss = ss; + ^ +fail_compilation/fail10964.d(43): Error: function `fail10964.S.__postblit` is not `nothrow` + sa = ss; + ^ +fail_compilation/fail10964.d(44): Error: function `fail10964.S.__postblit` is not `nothrow` + sa = sa; + ^ +fail_compilation/fail10964.d(47): Error: function `fail10964.S.__postblit` is not `nothrow` + S ss2 = ss; + ^ +fail_compilation/fail10964.d(48): Error: function `fail10964.S.__postblit` is not `nothrow` + S[1] sa2 = ss; + ^ +fail_compilation/fail10964.d(49): Error: function `fail10964.S.__postblit` is not `nothrow` + S[1] sa3 = sa; + ^ +fail_compilation/fail10964.d(36): Error: function `fail10964.foo` may throw but is marked as `nothrow` +void foo() nothrow + ^ --- */ diff --git a/compiler/test/fail_compilation/fail10980.d b/compiler/test/fail_compilation/fail10980.d index 4869d27954f1..37594967a385 100644 --- a/compiler/test/fail_compilation/fail10980.d +++ b/compiler/test/fail_compilation/fail10980.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/fail10980.d(22): Error: variable `fail10980.s1b` of type struct `immutable(S1)` uses `this(this)`, which is not allowed in static initialization -fail_compilation/fail10980.d(28): Error: variable `fail10980.s1d` of type struct `immutable(S1)` uses `this(this)`, which is not allowed in static initialization -fail_compilation/fail10980.d(27): Error: static variable `s1x` cannot be read at compile time -fail_compilation/fail10980.d(28): called from here: `bar1()` -fail_compilation/fail10980.d(38): Error: variable `fail10980.s2b` of type struct `immutable(S2)` uses `this(this)`, which is not allowed in static initialization -fail_compilation/fail10980.d(44): Error: variable `fail10980.s2d` of type struct `immutable(S2)` uses `this(this)`, which is not allowed in static initialization -fail_compilation/fail10980.d(43): Error: static variable `s2x` cannot be read at compile time -fail_compilation/fail10980.d(44): called from here: `bar2()` +fail_compilation/fail10980.d(38): Error: variable `fail10980.s1b` of type struct `immutable(S1)` uses `this(this)`, which is not allowed in static initialization +static immutable S1 s1b = s1a; // NG + ^ +fail_compilation/fail10980.d(44): Error: variable `fail10980.s1d` of type struct `immutable(S1)` uses `this(this)`, which is not allowed in static initialization +static immutable S1 s1d = bar1(); // NG + ^ +fail_compilation/fail10980.d(43): Error: static variable `s1x` cannot be read at compile time +ref S1 bar1() { static S1 s1x; return s1x; } + ^ +fail_compilation/fail10980.d(44): called from here: `bar1()` +static immutable S1 s1d = bar1(); // NG + ^ +fail_compilation/fail10980.d(54): Error: variable `fail10980.s2b` of type struct `immutable(S2)` uses `this(this)`, which is not allowed in static initialization +static immutable S2 s2b = s2a; // NG + ^ +fail_compilation/fail10980.d(60): Error: variable `fail10980.s2d` of type struct `immutable(S2)` uses `this(this)`, which is not allowed in static initialization +static immutable S2 s2d = bar2(); // NG + ^ +fail_compilation/fail10980.d(59): Error: static variable `s2x` cannot be read at compile time +ref S2 bar2() { static S2 s2x; return s2x; } + ^ +fail_compilation/fail10980.d(60): called from here: `bar2()` +static immutable S2 s2d = bar2(); // NG + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11.d b/compiler/test/fail_compilation/fail11.d index 9a5a815afcdf..f211d05ab913 100644 --- a/compiler/test/fail_compilation/fail11.d +++ b/compiler/test/fail_compilation/fail11.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11.d(12): Error: `int*` has no effect +fail_compilation/fail11.d(14): Error: `int*` has no effect + TFoo!(int).t; // should produce a "no identifier" error. + ^ --- */ diff --git a/compiler/test/fail_compilation/fail110.d b/compiler/test/fail_compilation/fail110.d index 4ba2a8c487ec..e59ca17c582a 100644 --- a/compiler/test/fail_compilation/fail110.d +++ b/compiler/test/fail_compilation/fail110.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail110.d(19): Error: variable `i` is shadowing variable `fail110.main.i` -fail_compilation/fail110.d(17): declared here -fail_compilation/fail110.d(20): Error: variable `i` is shadowing variable `fail110.main.i` -fail_compilation/fail110.d(17): declared here -fail_compilation/fail110.d(21): Error: variable `i` is shadowing variable `fail110.main.i` -fail_compilation/fail110.d(17): declared here +fail_compilation/fail110.d(31): Error: variable `i` is shadowing variable `fail110.main.i` + foreach (i; a) {} + ^ +fail_compilation/fail110.d(29): declared here + int i; + ^ +fail_compilation/fail110.d(32): Error: variable `i` is shadowing variable `fail110.main.i` + foreach (size_t i, n; a) {} + ^ +fail_compilation/fail110.d(29): declared here + int i; + ^ +fail_compilation/fail110.d(33): Error: variable `i` is shadowing variable `fail110.main.i` + for (int i;;) {} + ^ +fail_compilation/fail110.d(29): declared here + int i; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11038.d b/compiler/test/fail_compilation/fail11038.d index 331c3fc5892d..f80b94537c2b 100644 --- a/compiler/test/fail_compilation/fail11038.d +++ b/compiler/test/fail_compilation/fail11038.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11038.d(16): Error: `printf` is not defined, perhaps `import core.stdc.stdio;` is needed? +fail_compilation/fail11038.d(18): Error: `printf` is not defined, perhaps `import core.stdc.stdio;` is needed? + printf("foo"); // compiles + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11042.d b/compiler/test/fail_compilation/fail11042.d index 6123f175e707..59b30cbea3cf 100644 --- a/compiler/test/fail_compilation/fail11042.d +++ b/compiler/test/fail_compilation/fail11042.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11042.d(8): Error: undefined identifier `error`, did you mean class `Error`? -fail_compilation/fail11042.d(9): Error: undefined identifier `error`, did you mean class `Error`? +fail_compilation/fail11042.d(12): Error: undefined identifier `error`, did you mean class `Error`? +static if ({ return true || error; }()) {} // NG + ^ +fail_compilation/fail11042.d(13): Error: undefined identifier `error`, did you mean class `Error`? +static if ({ return false && error; }()) {} // NG + ^ --- */ static if ({ return true || error; }()) {} // NG diff --git a/compiler/test/fail_compilation/fail111.d b/compiler/test/fail_compilation/fail111.d index b5d16691cb87..c69a690ea520 100644 --- a/compiler/test/fail_compilation/fail111.d +++ b/compiler/test/fail_compilation/fail111.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail111.d(12): Error: cannot have array of `int(int)` +fail_compilation/fail111.d(14): Error: cannot have array of `int(int)` +ft[] x; // is allowed + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11125.d b/compiler/test/fail_compilation/fail11125.d index 1a682cd197c8..feabfe4ec208 100644 --- a/compiler/test/fail_compilation/fail11125.d +++ b/compiler/test/fail_compilation/fail11125.d @@ -1,14 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11125.d(26): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)` +fail_compilation/fail11125.d(30): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)` with `predfun = __lambda1` must satisfy the following constraint: ` is(ReturnType!predfun == bool)` -fail_compilation/fail11125.d(27): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)` + filter!((int a) => a + 1)([1]); // fails in constraint + ^ +fail_compilation/fail11125.d(31): Error: template instance `fail11125.filter!(function (int a) pure nothrow @nogc @safe => a + 1)` does not match template declaration `filter(alias predfun)` with `predfun = __lambda2` must satisfy the following constraint: ` is(ReturnType!predfun == bool)` + [1].filter!((int a) => a + 1); // fails internally in static assert! + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11151.d b/compiler/test/fail_compilation/fail11151.d index e5c262272a22..9c81aa2a2891 100644 --- a/compiler/test/fail_compilation/fail11151.d +++ b/compiler/test/fail_compilation/fail11151.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11151.d(30): Error: overlapping initialization for field `a` and `y` +fail_compilation/fail11151.d(32): Error: overlapping initialization for field `a` and `y` + U u = {a:1, y:2}; // overlapped initializing U.a and U.y + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11163.d b/compiler/test/fail_compilation/fail11163.d index 41cddbf33dd3..6165fb99f3a8 100644 --- a/compiler/test/fail_compilation/fail11163.d +++ b/compiler/test/fail_compilation/fail11163.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11163.d(12): Error: cannot implicitly convert expression `foo()` of type `int[]` to `immutable(int[])` -fail_compilation/fail11163.d(13): while evaluating `pragma(msg, a)` +fail_compilation/fail11163.d(16): Error: cannot implicitly convert expression `foo()` of type `int[]` to `immutable(int[])` + immutable a = foo(); + ^ +fail_compilation/fail11163.d(17): while evaluating `pragma(msg, a)` + pragma(msg, a); + ^ --- */ int[] foo() { diff --git a/compiler/test/fail_compilation/fail113.d b/compiler/test/fail_compilation/fail113.d index 43ee2d842e20..0df9978c1e40 100644 --- a/compiler/test/fail_compilation/fail113.d +++ b/compiler/test/fail_compilation/fail113.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail113.d(10): Error: forward reference to `test` +fail_compilation/fail113.d(12): Error: forward reference to `test` +void test(typeof(test) p) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11355.d b/compiler/test/fail_compilation/fail11355.d index 50897ad802a3..4a5ffda5cab2 100644 --- a/compiler/test/fail_compilation/fail11355.d +++ b/compiler/test/fail_compilation/fail11355.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11355.d(28): Error: struct `fail11355.A` is not copyable because it has a disabled postblit +fail_compilation/fail11355.d(30): Error: struct `fail11355.A` is not copyable because it has a disabled postblit + A a = move(b); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11375.d b/compiler/test/fail_compilation/fail11375.d index cabf87a6cae3..8ee83995e419 100644 --- a/compiler/test/fail_compilation/fail11375.d +++ b/compiler/test/fail_compilation/fail11375.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11375.d(18): Error: constructor `fail11375.D!().D.this` is not `nothrow` +fail_compilation/fail11375.d(22): Error: constructor `fail11375.D!().D.this` is not `nothrow` + auto d = new D!()(); + ^ which calls `fail11375.B.this` -fail_compilation/fail11375.d(16): Error: function `D main` may throw but is marked as `nothrow` +fail_compilation/fail11375.d(20): Error: function `D main` may throw but is marked as `nothrow` +void main() nothrow + ^ --- */ diff --git a/compiler/test/fail_compilation/fail114.d b/compiler/test/fail_compilation/fail114.d index 65eeef701a00..4e92f98a5785 100644 --- a/compiler/test/fail_compilation/fail114.d +++ b/compiler/test/fail_compilation/fail114.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail114.d(12): Error: forward reference to `funcA` +fail_compilation/fail114.d(14): Error: forward reference to `funcA` +void funcB(typeof(&funcA) p) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11426.d b/compiler/test/fail_compilation/fail11426.d index 7b2dc4fd6e57..9b82084147ec 100644 --- a/compiler/test/fail_compilation/fail11426.d +++ b/compiler/test/fail_compilation/fail11426.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11426.d(15): Error: cannot implicitly convert expression `udarr` of type `uint[]` to `int[]` -fail_compilation/fail11426.d(16): Error: cannot implicitly convert expression `usarr` of type `uint[1]` to `int[]` -fail_compilation/fail11426.d(18): Error: cannot implicitly convert expression `udarr` of type `uint[]` to `int[]` -fail_compilation/fail11426.d(19): Error: cannot implicitly convert expression `usarr` of type `uint[1]` to `int[]` +fail_compilation/fail11426.d(23): Error: cannot implicitly convert expression `udarr` of type `uint[]` to `int[]` + int[1] arr1; arr1 = udarr; // Error, OK + ^ +fail_compilation/fail11426.d(24): Error: cannot implicitly convert expression `usarr` of type `uint[1]` to `int[]` + int[1] arr2; arr2 = usarr; // Error, OK + ^ +fail_compilation/fail11426.d(26): Error: cannot implicitly convert expression `udarr` of type `uint[]` to `int[]` + int[1] arr3 = udarr; // accepted, BAD! + ^ +fail_compilation/fail11426.d(27): Error: cannot implicitly convert expression `usarr` of type `uint[1]` to `int[]` + int[1] arr4 = usarr; // accepted, BAD! + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail11445.d b/compiler/test/fail_compilation/fail11445.d index 3295b243815a..25907cf91b27 100644 --- a/compiler/test/fail_compilation/fail11445.d +++ b/compiler/test/fail_compilation/fail11445.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11445.d(11): Error: incompatible types for `(a) + (b)`: both operands are of type `double[string]` +fail_compilation/fail11445.d(13): Error: incompatible types for `(a) + (b)`: both operands are of type `double[string]` + auto c = a + b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11453a.d b/compiler/test/fail_compilation/fail11453a.d index 379e86bf5f34..1d3ee361b378 100644 --- a/compiler/test/fail_compilation/fail11453a.d +++ b/compiler/test/fail_compilation/fail11453a.d @@ -4,6 +4,8 @@ TEST_OUTPUT: --- fail_compilation/extra-files/bar11453.d(1): Error: package name 'foo11453' conflicts with usage as a module name in file fail_compilation/extra-files/foo11453.d +module foo11453.bar11453; +^ --- */ diff --git a/compiler/test/fail_compilation/fail11453b.d b/compiler/test/fail_compilation/fail11453b.d index 4e99395ac67b..1e73eb71a1b0 100644 --- a/compiler/test/fail_compilation/fail11453b.d +++ b/compiler/test/fail_compilation/fail11453b.d @@ -4,6 +4,8 @@ TEST_OUTPUT: --- fail_compilation/extra-files/foo11453.d(1): Error: module `foo11453` from file fail_compilation/extra-files/foo11453.d conflicts with package name foo11453 +module foo11453; +^ --- */ diff --git a/compiler/test/fail_compilation/fail115.d b/compiler/test/fail_compilation/fail115.d index 4990b66f1f93..816b38594ca1 100644 --- a/compiler/test/fail_compilation/fail115.d +++ b/compiler/test/fail_compilation/fail115.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail115.d(17): Error: mixin `Foo!y` cannot resolve forward reference +fail_compilation/fail115.d(19): Error: mixin `Foo!y` cannot resolve forward reference + mixin Foo!(y) y; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11503a.d b/compiler/test/fail_compilation/fail11503a.d index b49cde9330be..e97db7f9a471 100644 --- a/compiler/test/fail_compilation/fail11503a.d +++ b/compiler/test/fail_compilation/fail11503a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11503a.d(24): Error: cannot implicitly convert expression `makes()` of type `immutable(S)*` to `S*` +fail_compilation/fail11503a.d(26): Error: cannot implicitly convert expression `makes()` of type `immutable(S)*` to `S*` + S* s = makes(); // s is mutable and contains an immutable reference to itself + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/fail11503b.d b/compiler/test/fail_compilation/fail11503b.d index ebfbbfdc4472..b38a2843fc98 100644 --- a/compiler/test/fail_compilation/fail11503b.d +++ b/compiler/test/fail_compilation/fail11503b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11503b.d(17): Error: cannot implicitly convert expression `makes()` of type `immutable(int[])` to `int[]` +fail_compilation/fail11503b.d(19): Error: cannot implicitly convert expression `makes()` of type `immutable(int[])` to `int[]` + int[] b = makes(); + ^ --- */ immutable int[] x = [1, 2, 3]; diff --git a/compiler/test/fail_compilation/fail11503c.d b/compiler/test/fail_compilation/fail11503c.d index 88565d37134a..91e393702678 100644 --- a/compiler/test/fail_compilation/fail11503c.d +++ b/compiler/test/fail_compilation/fail11503c.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11503c.d(19): Error: cannot implicitly convert expression `d.filename()` of type `const(char)[]` to `string` +fail_compilation/fail11503c.d(21): Error: cannot implicitly convert expression `d.filename()` of type `const(char)[]` to `string` + string f = d.filename; + ^ --- */ struct Data diff --git a/compiler/test/fail_compilation/fail11503d.d b/compiler/test/fail_compilation/fail11503d.d index 30efa8d42582..ff0183221e59 100644 --- a/compiler/test/fail_compilation/fail11503d.d +++ b/compiler/test/fail_compilation/fail11503d.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11503d.d(26): Error: cannot implicitly convert expression `filename(d)` of type `const(char)[]` to `string` -fail_compilation/fail11503d.d(27): Error: cannot implicitly convert expression `filename2(& d)` of type `const(char)[]` to `string` +fail_compilation/fail11503d.d(30): Error: cannot implicitly convert expression `filename(d)` of type `const(char)[]` to `string` + string f = d.filename; + ^ +fail_compilation/fail11503d.d(31): Error: cannot implicitly convert expression `filename2(& d)` of type `const(char)[]` to `string` + string g = (&d).filename2; + ^ --- */ struct Data2 diff --git a/compiler/test/fail_compilation/fail11510.d b/compiler/test/fail_compilation/fail11510.d index de08b5560d70..49eb01975d67 100644 --- a/compiler/test/fail_compilation/fail11510.d +++ b/compiler/test/fail_compilation/fail11510.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11510.d(25): Error: reinterpretation through overlapped field `y` is not allowed in CTFE -fail_compilation/fail11510.d(29): called from here: `test11510a()` -fail_compilation/fail11510.d(36): Error: reinterpretation through overlapped field `y` is not allowed in CTFE -fail_compilation/fail11510.d(40): called from here: `test11510b()` +fail_compilation/fail11510.d(33): Error: reinterpretation through overlapped field `y` is not allowed in CTFE + auto x = s.x; // reinterpretation + ^ +fail_compilation/fail11510.d(37): called from here: `test11510a()` +enum a = test11510a(); + ^ +fail_compilation/fail11510.d(44): Error: reinterpretation through overlapped field `y` is not allowed in CTFE + auto y = s.y; // reinterpretation + ^ +fail_compilation/fail11510.d(48): called from here: `test11510b()` +enum b = test11510b(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11532.d b/compiler/test/fail_compilation/fail11532.d index 144dec76b00f..2c2d44298dc1 100644 --- a/compiler/test/fail_compilation/fail11532.d +++ b/compiler/test/fail_compilation/fail11532.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11532.d(17): Error: cannot pass static arrays to `extern(C)` vararg functions -fail_compilation/fail11532.d(18): Error: cannot pass dynamic arrays to `extern(C)` vararg functions -fail_compilation/fail11532.d(19): Error: cannot pass static arrays to `extern(C++)` vararg functions -fail_compilation/fail11532.d(20): Error: cannot pass dynamic arrays to `extern(C++)` vararg functions +fail_compilation/fail11532.d(25): Error: cannot pass static arrays to `extern(C)` vararg functions + cvararg(0, arr); + ^ +fail_compilation/fail11532.d(26): Error: cannot pass dynamic arrays to `extern(C)` vararg functions + cvararg(0, arr[]); + ^ +fail_compilation/fail11532.d(27): Error: cannot pass static arrays to `extern(C++)` vararg functions + cppvararg(0, arr); + ^ +fail_compilation/fail11532.d(28): Error: cannot pass dynamic arrays to `extern(C++)` vararg functions + cppvararg(0, arr[]); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11545.d b/compiler/test/fail_compilation/fail11545.d index 01d8e93d5695..e89107d8d542 100644 --- a/compiler/test/fail_compilation/fail11545.d +++ b/compiler/test/fail_compilation/fail11545.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11545.d(14): Error: accessing non-static variable `x` requires an instance of `C` fail_compilation/fail11545.d(18): Error: accessing non-static variable `x` requires an instance of `C` + return x; + ^ +fail_compilation/fail11545.d(22): Error: accessing non-static variable `x` requires an instance of `C` + return x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11552.d b/compiler/test/fail_compilation/fail11552.d index 252022598afe..8fee154c5ada 100644 --- a/compiler/test/fail_compilation/fail11552.d +++ b/compiler/test/fail_compilation/fail11552.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: --- -fail_compilation/fail11552.d(11): Error: function `D main` label `label` is undefined +fail_compilation/fail11552.d(13): Error: function `D main` label `label` is undefined + goto label; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11562.d b/compiler/test/fail_compilation/fail11562.d index dcae1f515669..bd74d8a0004b 100644 --- a/compiler/test/fail_compilation/fail11562.d +++ b/compiler/test/fail_compilation/fail11562.d @@ -2,10 +2,18 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: --- -fail_compilation/fail11562.d(15): Error: cannot `goto` in or out of `finally` block -fail_compilation/fail11562.d(36): Error: cannot `goto` in or out of `finally` block -fail_compilation/fail11562.d(48): Error: cannot `goto` in or out of `finally` block -fail_compilation/fail11562.d(63): Error: cannot `goto` in or out of `finally` block +fail_compilation/fail11562.d(23): Error: cannot `goto` in or out of `finally` block + if (b) goto label; + ^ +fail_compilation/fail11562.d(44): Error: cannot `goto` in or out of `finally` block + if (b) goto label; + ^ +fail_compilation/fail11562.d(56): Error: cannot `goto` in or out of `finally` block + if (b) goto label; + ^ +fail_compilation/fail11562.d(71): Error: cannot `goto` in or out of `finally` block + if (b) goto label; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail116.d b/compiler/test/fail_compilation/fail116.d index 64f225d09941..13d516b0ebbc 100644 --- a/compiler/test/fail_compilation/fail116.d +++ b/compiler/test/fail_compilation/fail116.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail116.d(11): Error: undefined identifier `x` -fail_compilation/fail116.d(16): Error: template instance `square!1.2` does not match template declaration `square(_error_ x)` +fail_compilation/fail116.d(15): Error: undefined identifier `x` +template square(typeof(x) x) + ^ +fail_compilation/fail116.d(20): Error: template instance `square!1.2` does not match template declaration `square(_error_ x)` +const b = square!(1.2); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11653.d b/compiler/test/fail_compilation/fail11653.d index 4eeb9bea5217..e9a6a63ce752 100644 --- a/compiler/test/fail_compilation/fail11653.d +++ b/compiler/test/fail_compilation/fail11653.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11653.d(18): Error: switch case fallthrough - use 'goto case;' if intended -fail_compilation/fail11653.d(23): Error: switch case fallthrough - use 'goto default;' if intended +fail_compilation/fail11653.d(22): Error: switch case fallthrough - use 'goto case;' if intended + case 2: .. case 3: + ^ +fail_compilation/fail11653.d(27): Error: switch case fallthrough - use 'goto default;' if intended + default: + ^ --- */ diff --git a/compiler/test/fail_compilation/fail117.d b/compiler/test/fail_compilation/fail117.d index b0e1b120c9cf..d56019ea6a50 100644 --- a/compiler/test/fail_compilation/fail117.d +++ b/compiler/test/fail_compilation/fail117.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/fail117.d(37): Error: expression `foo.mixin MGettor!(a) geta; +fail_compilation/fail117.d(41): Error: expression `foo.mixin MGettor!(a) geta; ` is `void` and has no value -fail_compilation/fail117.d(38): Error: expression `foo.mixin MGettor!(b) getb; + int a = foo.geta; + ^ +fail_compilation/fail117.d(42): Error: expression `foo.mixin MGettor!(b) getb; ` is `void` and has no value + int b = foo.getb; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11714.d b/compiler/test/fail_compilation/fail11714.d index abc47087ffaa..bf78e641d88f 100644 --- a/compiler/test/fail_compilation/fail11714.d +++ b/compiler/test/fail_compilation/fail11714.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11714.d(14): Error: variable `fail11714.c` is a thread-local class and cannot have a static initializer. Use `static this()` to initialize instead. -fail_compilation/fail11714.d(21): Error: variable `fail11714.s` is a thread-local pointer to struct and cannot have a static initializer. Use `static this()` to initialize instead. +fail_compilation/fail11714.d(18): Error: variable `fail11714.c` is a thread-local class and cannot have a static initializer. Use `static this()` to initialize instead. +C11714 c = new C11714; // mutable class reference. + ^ +fail_compilation/fail11714.d(25): Error: variable `fail11714.s` is a thread-local pointer to struct and cannot have a static initializer. Use `static this()` to initialize instead. +S11714* s = new S11714; // mutable pointer to struct. + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11746.d b/compiler/test/fail_compilation/fail11746.d index 6ca07fc2d1e8..5588a68e6bb9 100644 --- a/compiler/test/fail_compilation/fail11746.d +++ b/compiler/test/fail_compilation/fail11746.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11746.d(18): Error: cannot implicitly convert expression `1` of type `int` to `string` -fail_compilation/fail11746.d(25): Error: cannot implicitly convert expression `1` of type `int` to `string` -fail_compilation/fail11746.d(26): Error: cannot implicitly convert expression `2` of type `int` to `string` +fail_compilation/fail11746.d(22): Error: cannot implicitly convert expression `1` of type `int` to `string` + bar = 1, + ^ +fail_compilation/fail11746.d(29): Error: cannot implicitly convert expression `1` of type `int` to `string` + bar = 1, + ^ +fail_compilation/fail11746.d(30): Error: cannot implicitly convert expression `2` of type `int` to `string` --- */ diff --git a/compiler/test/fail_compilation/fail11748.d b/compiler/test/fail_compilation/fail11748.d index 7b6a6c8a7d1d..954b46252959 100644 --- a/compiler/test/fail_compilation/fail11748.d +++ b/compiler/test/fail_compilation/fail11748.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11748.d(12): Error: expression `my_function(0)` is `void` and has no value +fail_compilation/fail11748.d(14): Error: expression `my_function(0)` is `void` and has no value + my_template!(my_function(0)); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail11751.d b/compiler/test/fail_compilation/fail11751.d index 36d7f9d8e302..9c39144bf373 100644 --- a/compiler/test/fail_compilation/fail11751.d +++ b/compiler/test/fail_compilation/fail11751.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail11751.d(10): Error: missing exponent -fail_compilation/fail11751.d(10): Error: semicolon expected following auto declaration, not `ABC` -fail_compilation/fail11751.d(10): Error: no identifier for declarator `ABC` +fail_compilation/fail11751.d(14): Error: missing exponent +auto x = 0x1.FFFFFFFFFFFFFpABC; + ^ +fail_compilation/fail11751.d(14): Error: semicolon expected following auto declaration, not `ABC` +auto x = 0x1.FFFFFFFFFFFFFpABC; + ^ +fail_compilation/fail11751.d(14): Error: no identifier for declarator `ABC` --- */ diff --git a/compiler/test/fail_compilation/fail118.d b/compiler/test/fail_compilation/fail118.d index a526b908acdb..310d46fe5a79 100644 --- a/compiler/test/fail_compilation/fail118.d +++ b/compiler/test/fail_compilation/fail118.d @@ -1,17 +1,31 @@ /* TEST_OUTPUT: --- -fail_compilation/fail118.d(45): Error: invalid `foreach` aggregate `Iter` of type `Iter` -fail_compilation/fail118.d(45): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property -fail_compilation/fail118.d(45): https://dlang.org/phobos/std_range_primitives.html#isInputRange -fail_compilation/fail118.d(46): Error: invalid `foreach` aggregate `Iter` of type `Iter` -fail_compilation/fail118.d(46): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property -fail_compilation/fail118.d(46): https://dlang.org/phobos/std_range_primitives.html#isInputRange -fail_compilation/fail118.d(49): Error: invalid `foreach` aggregate `s` of type `S*` -fail_compilation/fail118.d(51): Error: undefined identifier `unknown` -fail_compilation/fail118.d(39): Error: undefined identifier `doesNotExist` -fail_compilation/fail118.d(53): Error: template instance `fail118.error!()` error instantiating -fail_compilation/fail118.d(53): Error: invalid `foreach` aggregate `error()` of type `void` +fail_compilation/fail118.d(59): Error: invalid `foreach` aggregate `Iter` of type `Iter` + foreach (int i; f.oldIterMix.Iter) {} + ^ +fail_compilation/fail118.d(59): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property +fail_compilation/fail118.d(59): https://dlang.org/phobos/std_range_primitives.html#isInputRange +fail_compilation/fail118.d(60): Error: invalid `foreach` aggregate `Iter` of type `Iter` + foreach ( i; f.oldIterMix.Iter) {} + ^ +fail_compilation/fail118.d(60): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property +fail_compilation/fail118.d(60): https://dlang.org/phobos/std_range_primitives.html#isInputRange +fail_compilation/fail118.d(63): Error: invalid `foreach` aggregate `s` of type `S*` + foreach (const i; s) {} + ^ +fail_compilation/fail118.d(65): Error: undefined identifier `unknown` + foreach(const i; unknown) {} + ^ +fail_compilation/fail118.d(53): Error: undefined identifier `doesNotExist` + doesNotExist(); + ^ +fail_compilation/fail118.d(67): Error: template instance `fail118.error!()` error instantiating + foreach (const i; error()) {} + ^ +fail_compilation/fail118.d(67): Error: invalid `foreach` aggregate `error()` of type `void` + foreach (const i; error()) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12.d b/compiler/test/fail_compilation/fail12.d index 7b082aea4a76..0d2a107f2327 100644 --- a/compiler/test/fail_compilation/fail12.d +++ b/compiler/test/fail_compilation/fail12.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12.d(19): Error: `abc` matches conflicting symbols: -fail_compilation/fail12.d(11): function `fail12.main.Foo!(y).abc` -fail_compilation/fail12.d(11): function `fail12.main.Foo!(y).abc` +fail_compilation/fail12.d(23): Error: `abc` matches conflicting symbols: + assert(abc() == 8); + ^ +fail_compilation/fail12.d(15): function `fail12.main.Foo!(y).abc` + int abc() { return b; } + ^ +fail_compilation/fail12.d(15): function `fail12.main.Foo!(y).abc` --- */ template Foo(alias b) diff --git a/compiler/test/fail_compilation/fail120.d b/compiler/test/fail_compilation/fail120.d index f9ede04fb5d8..8c84b01ece07 100644 --- a/compiler/test/fail_compilation/fail120.d +++ b/compiler/test/fail_compilation/fail120.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail120.d(12): Error: accessing non-static variable `nodes` requires an instance of `Foo` -fail_compilation/fail120.d(13): Error: accessing non-static variable `nodes` requires an instance of `Foo` +fail_compilation/fail120.d(16): Error: accessing non-static variable `nodes` requires an instance of `Foo` + auto left = (){ return nodes[0]; }; + ^ +fail_compilation/fail120.d(17): Error: accessing non-static variable `nodes` requires an instance of `Foo` + auto right = (){ return nodes[1]; }; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12047.d b/compiler/test/fail_compilation/fail12047.d index b948b6771d1b..fc513f0f8354 100644 --- a/compiler/test/fail_compilation/fail12047.d +++ b/compiler/test/fail_compilation/fail12047.d @@ -2,13 +2,27 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12047.d(15): Error: undefined identifier `asdf` -fail_compilation/fail12047.d(16): Error: undefined identifier `asdf` -fail_compilation/fail12047.d(17): Error: undefined identifier `asdf` -fail_compilation/fail12047.d(18): Error: undefined identifier `asdf` -fail_compilation/fail12047.d(19): Error: undefined identifier `asdf` -fail_compilation/fail12047.d(20): Error: undefined identifier `asdf` -fail_compilation/fail12047.d(21): Error: undefined identifier `asdf` +fail_compilation/fail12047.d(29): Error: undefined identifier `asdf` +@asdf void func() { } + ^ +fail_compilation/fail12047.d(30): Error: undefined identifier `asdf` +@asdf int var = 1; + ^ +fail_compilation/fail12047.d(31): Error: undefined identifier `asdf` +@asdf enum E : int { a } + ^ +fail_compilation/fail12047.d(32): Error: undefined identifier `asdf` +@asdf struct S {} + ^ +fail_compilation/fail12047.d(33): Error: undefined identifier `asdf` +@asdf class C {} + ^ +fail_compilation/fail12047.d(34): Error: undefined identifier `asdf` +@asdf interface I {} + ^ +fail_compilation/fail12047.d(35): Error: undefined identifier `asdf` +@asdf alias int myint; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail121.d b/compiler/test/fail_compilation/fail121.d index 110547be7cae..f6b57f807666 100644 --- a/compiler/test/fail_compilation/fail121.d +++ b/compiler/test/fail_compilation/fail121.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail121.d(24): Error: no property `typeinfo` for `list[1]` of type `fail121.myobject` -fail_compilation/fail121.d(12): struct `myobject` defined here -fail_compilation/fail121.d(24): Error: no property `typeinfo` for `i` of type `int` +fail_compilation/fail121.d(30): Error: no property `typeinfo` for `list[1]` of type `fail121.myobject` + list[1].typeinfo = i.typeinfo; + ^ +fail_compilation/fail121.d(18): struct `myobject` defined here +struct myobject +^ +fail_compilation/fail121.d(30): Error: no property `typeinfo` for `i` of type `int` + list[1].typeinfo = i.typeinfo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail122.d b/compiler/test/fail_compilation/fail122.d index da355d50ed32..1f85adc8af7e 100644 --- a/compiler/test/fail_compilation/fail122.d +++ b/compiler/test/fail_compilation/fail122.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail122.d(12): Error: undefined identifier `y` +fail_compilation/fail122.d(14): Error: undefined identifier `y` + y = 2; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12236.d b/compiler/test/fail_compilation/fail12236.d index 824f5e48db25..e24dbc738e10 100644 --- a/compiler/test/fail_compilation/fail12236.d +++ b/compiler/test/fail_compilation/fail12236.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12236.d(16): Error: forward reference to inferred return type of function `f1` -fail_compilation/fail12236.d(16): while evaluating `pragma(msg, f1.mangleof)` -fail_compilation/fail12236.d(21): Error: forward reference to inferred return type of function `f2` -fail_compilation/fail12236.d(21): while evaluating `pragma(msg, f2(T)(T).mangleof)` -fail_compilation/fail12236.d(27): Error: template instance `fail12236.f2!int` error instantiating -fail_compilation/fail12236.d(31): Error: forward reference to inferred return type of function `__lambda1` -fail_compilation/fail12236.d(31): while evaluating `pragma(msg, __lambda1(__T1)(a).mangleof)` +fail_compilation/fail12236.d(30): Error: forward reference to inferred return type of function `f1` + pragma(msg, f1.mangleof); // forward reference error + ^ +fail_compilation/fail12236.d(30): while evaluating `pragma(msg, f1.mangleof)` + pragma(msg, f1.mangleof); // forward reference error + ^ +fail_compilation/fail12236.d(35): Error: forward reference to inferred return type of function `f2` + pragma(msg, f2.mangleof); // error <- weird output: "v" + ^ +fail_compilation/fail12236.d(35): while evaluating `pragma(msg, f2(T)(T).mangleof)` + pragma(msg, f2.mangleof); // error <- weird output: "v" + ^ +fail_compilation/fail12236.d(41): Error: template instance `fail12236.f2!int` error instantiating + f2(1); + ^ +fail_compilation/fail12236.d(45): Error: forward reference to inferred return type of function `__lambda1` + pragma(msg, __traits(parent, x).mangleof); + ^ +fail_compilation/fail12236.d(45): while evaluating `pragma(msg, __lambda1(__T1)(a).mangleof)` + pragma(msg, __traits(parent, x).mangleof); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail123.d b/compiler/test/fail_compilation/fail123.d index 1566b91bf2ba..1e10dca4a454 100644 --- a/compiler/test/fail_compilation/fail123.d +++ b/compiler/test/fail_compilation/fail123.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail123.d(11): Error: undefined identifier `type` -fail_compilation/fail123.d(17): Error: enum `fail123.foo2` base type must not be `void` +fail_compilation/fail123.d(15): Error: undefined identifier `type` +enum foo : type +^ +fail_compilation/fail123.d(21): Error: enum `fail123.foo2` base type must not be `void` +enum foo2 : void { a, b } +^ --- */ diff --git a/compiler/test/fail_compilation/fail124.d b/compiler/test/fail_compilation/fail124.d index 7eeb29f672ac..7811ab282eed 100644 --- a/compiler/test/fail_compilation/fail124.d +++ b/compiler/test/fail_compilation/fail124.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail124.d(17): Error: class `fail124.CC` inherits from duplicate interface `C` -fail_compilation/fail124.d(31): Error: class `fail124.D` inherits from duplicate interface `T` -fail_compilation/fail124.d(31): Error: class `fail124.D` inherits from duplicate interface `T` +fail_compilation/fail124.d(23): Error: class `fail124.CC` inherits from duplicate interface `C` +class CC : C, C +^ +fail_compilation/fail124.d(37): Error: class `fail124.D` inherits from duplicate interface `T` +class D : T, T, T { } +^ +fail_compilation/fail124.d(37): Error: class `fail124.D` inherits from duplicate interface `T` +class D : T, T, T { } +^ --- */ diff --git a/compiler/test/fail_compilation/fail125.d b/compiler/test/fail_compilation/fail125.d index 8a4be29fbfb6..30a61638c4e3 100644 --- a/compiler/test/fail_compilation/fail125.d +++ b/compiler/test/fail_compilation/fail125.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail125.d(15): Error: sequence index `[2]` is outside bounds `[0 .. 2]` -fail_compilation/fail125.d(18): Error: template instance `fail125.main.recMove!(1, a, b)` error instantiating -fail_compilation/fail125.d(25): instantiated from here: `recMove!(0, a, b)` +fail_compilation/fail125.d(21): Error: sequence index `[2]` is outside bounds `[0 .. 2]` + X[i] = X[i+1]; + ^ +fail_compilation/fail125.d(24): Error: template instance `fail125.main.recMove!(1, a, b)` error instantiating + recMove!(i+1, X); + ^ +fail_compilation/fail125.d(31): instantiated from here: `recMove!(0, a, b)` + recMove!(0, a, b); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail126.d b/compiler/test/fail_compilation/fail126.d index b851c507a99b..1a3add8ae45f 100644 --- a/compiler/test/fail_compilation/fail126.d +++ b/compiler/test/fail_compilation/fail126.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail126.d(8): Error: forward reference to `test` +fail_compilation/fail126.d(10): Error: forward reference to `test` +void test(typeof(test) p) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12622.d b/compiler/test/fail_compilation/fail12622.d index 1a8b18511c18..cc9ffc10f493 100644 --- a/compiler/test/fail_compilation/fail12622.d +++ b/compiler/test/fail_compilation/fail12622.d @@ -1,16 +1,36 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12622.d(26): Error: `pure` function `fail12622.foo` cannot call impure function pointer `fp` -fail_compilation/fail12622.d(26): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function pointer `fp` -fail_compilation/fail12622.d(26): Error: `@safe` function `fail12622.foo` cannot call `@system` function pointer `fp` -fail_compilation/fail12622.d(28): Error: `pure` function `fail12622.foo` cannot call impure function pointer `fp` -fail_compilation/fail12622.d(28): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function pointer `fp` -fail_compilation/fail12622.d(28): Error: `@safe` function `fail12622.foo` cannot call `@system` function pointer `fp` -fail_compilation/fail12622.d(30): Error: `pure` function `fail12622.foo` cannot call impure function `fail12622.bar` -fail_compilation/fail12622.d(30): Error: `@safe` function `fail12622.foo` cannot call `@system` function `fail12622.bar` -fail_compilation/fail12622.d(20): `fail12622.bar` is declared here -fail_compilation/fail12622.d(30): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function `fail12622.bar` +fail_compilation/fail12622.d(46): Error: `pure` function `fail12622.foo` cannot call impure function pointer `fp` + (*fp)(); + ^ +fail_compilation/fail12622.d(46): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function pointer `fp` + (*fp)(); + ^ +fail_compilation/fail12622.d(46): Error: `@safe` function `fail12622.foo` cannot call `@system` function pointer `fp` + (*fp)(); + ^ +fail_compilation/fail12622.d(48): Error: `pure` function `fail12622.foo` cannot call impure function pointer `fp` + fp(); + ^ +fail_compilation/fail12622.d(48): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function pointer `fp` + fp(); + ^ +fail_compilation/fail12622.d(48): Error: `@safe` function `fail12622.foo` cannot call `@system` function pointer `fp` + fp(); + ^ +fail_compilation/fail12622.d(50): Error: `pure` function `fail12622.foo` cannot call impure function `fail12622.bar` + bar(); + ^ +fail_compilation/fail12622.d(50): Error: `@safe` function `fail12622.foo` cannot call `@system` function `fail12622.bar` + bar(); + ^ +fail_compilation/fail12622.d(40): `fail12622.bar` is declared here +void bar(); + ^ +fail_compilation/fail12622.d(50): Error: `@nogc` function `fail12622.foo` cannot call non-@nogc function `fail12622.bar` + bar(); + ^ --- */ // Note that, today nothrow violation errors are accidentally hidden. diff --git a/compiler/test/fail_compilation/fail12636.d b/compiler/test/fail_compilation/fail12636.d index 42e785547164..0d325c3016a9 100644 --- a/compiler/test/fail_compilation/fail12636.d +++ b/compiler/test/fail_compilation/fail12636.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12636.d(13): Error: C++ class `fail12636.C` cannot implement D interface `fail12636.D` +fail_compilation/fail12636.d(15): Error: C++ class `fail12636.C` cannot implement D interface `fail12636.D` +extern(C++) class C : D + ^ --- */ diff --git a/compiler/test/fail_compilation/fail127.d b/compiler/test/fail_compilation/fail127.d index ad9ddd099781..2513082bd868 100644 --- a/compiler/test/fail_compilation/fail127.d +++ b/compiler/test/fail_compilation/fail127.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail127.d(9): Error: a struct is not a valid initializer for a `char[][]` -fail_compilation/fail127.d(10): Error: a struct is not a valid initializer for a `string[]` +fail_compilation/fail127.d(13): Error: a struct is not a valid initializer for a `char[][]` +char[][] Level2Text1 = {"LOW", "MEDIUM", "HIGH"}; + ^ +fail_compilation/fail127.d(14): Error: a struct is not a valid initializer for a `string[]` +string[] Level2Text2 = {"LOW", "MEDIUM", "HIGH"}; // for D2 + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12744.d b/compiler/test/fail_compilation/fail12744.d index 3b1ab723b9ed..6cf1fbd6473c 100644 --- a/compiler/test/fail_compilation/fail12744.d +++ b/compiler/test/fail_compilation/fail12744.d @@ -1,24 +1,60 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12744.d(38): Error: incompatible parameter storage classes `ref` and `out` -fail_compilation/fail12744.d(52): Error: template instance `fail12744.bar12744R!(foo12744O)` error instantiating -fail_compilation/fail12744.d(38): Error: incompatible parameter storage classes `ref` and `lazy` -fail_compilation/fail12744.d(53): Error: template instance `fail12744.bar12744R!(foo12744L)` error instantiating -fail_compilation/fail12744.d(39): Error: incompatible parameter storage classes `out` and `ref` -fail_compilation/fail12744.d(56): Error: template instance `fail12744.bar12744O!(foo12744R)` error instantiating -fail_compilation/fail12744.d(39): Error: incompatible parameter storage classes `out` and `lazy` -fail_compilation/fail12744.d(58): Error: template instance `fail12744.bar12744O!(foo12744L)` error instantiating -fail_compilation/fail12744.d(40): Error: incompatible parameter storage classes `lazy` and `ref` -fail_compilation/fail12744.d(61): Error: template instance `fail12744.bar12744L!(foo12744R)` error instantiating -fail_compilation/fail12744.d(40): Error: incompatible parameter storage classes `lazy` and `out` -fail_compilation/fail12744.d(62): Error: template instance `fail12744.bar12744L!(foo12744O)` error instantiating -fail_compilation/fail12744.d(41): Error: incompatible parameter storage classes `auto ref` and `out` -fail_compilation/fail12744.d(67): Error: template `bar12744A` is not callable using argument types `!(foo12744O)(int)` -fail_compilation/fail12744.d(41): Candidate is: `bar12744A(alias f)(auto ref PTT12744!f args)` -fail_compilation/fail12744.d(41): Error: incompatible parameter storage classes `auto ref` and `lazy` -fail_compilation/fail12744.d(68): Error: template `bar12744A` is not callable using argument types `!(foo12744L)(int)` -fail_compilation/fail12744.d(41): Candidate is: `bar12744A(alias f)(auto ref PTT12744!f args)` +fail_compilation/fail12744.d(74): Error: incompatible parameter storage classes `ref` and `out` +void bar12744R(alias f)( ref PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(88): Error: template instance `fail12744.bar12744R!(foo12744O)` error instantiating + alias bRO = bar12744R!foo12744O; // error + ^ +fail_compilation/fail12744.d(74): Error: incompatible parameter storage classes `ref` and `lazy` +void bar12744R(alias f)( ref PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(89): Error: template instance `fail12744.bar12744R!(foo12744L)` error instantiating + alias bRL = bar12744R!foo12744L; // error + ^ +fail_compilation/fail12744.d(75): Error: incompatible parameter storage classes `out` and `ref` +void bar12744O(alias f)( out PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(92): Error: template instance `fail12744.bar12744O!(foo12744R)` error instantiating + alias bOR = bar12744O!foo12744R; // error + ^ +fail_compilation/fail12744.d(75): Error: incompatible parameter storage classes `out` and `lazy` +void bar12744O(alias f)( out PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(94): Error: template instance `fail12744.bar12744O!(foo12744L)` error instantiating + alias bOL = bar12744O!foo12744L; // error + ^ +fail_compilation/fail12744.d(76): Error: incompatible parameter storage classes `lazy` and `ref` +void bar12744L(alias f)( lazy PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(97): Error: template instance `fail12744.bar12744L!(foo12744R)` error instantiating + alias bLR = bar12744L!foo12744R; // error + ^ +fail_compilation/fail12744.d(76): Error: incompatible parameter storage classes `lazy` and `out` +void bar12744L(alias f)( lazy PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(98): Error: template instance `fail12744.bar12744L!(foo12744O)` error instantiating + alias bLO = bar12744L!foo12744O; // error + ^ +fail_compilation/fail12744.d(77): Error: incompatible parameter storage classes `auto ref` and `out` +void bar12744A(alias f)(auto ref PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(103): Error: template `bar12744A` is not callable using argument types `!(foo12744O)(int)` + bar12744A!foo12744O(1); // error + ^ +fail_compilation/fail12744.d(77): Candidate is: `bar12744A(alias f)(auto ref PTT12744!f args)` +void bar12744A(alias f)(auto ref PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(77): Error: incompatible parameter storage classes `auto ref` and `lazy` +void bar12744A(alias f)(auto ref PTT12744!f args) {} + ^ +fail_compilation/fail12744.d(104): Error: template `bar12744A` is not callable using argument types `!(foo12744L)(int)` + bar12744A!foo12744L(1); // error + ^ +fail_compilation/fail12744.d(77): Candidate is: `bar12744A(alias f)(auto ref PTT12744!f args)` +void bar12744A(alias f)(auto ref PTT12744!f args) {} + ^ --- */ template PTT12744(func...) diff --git a/compiler/test/fail_compilation/fail12764.d b/compiler/test/fail_compilation/fail12764.d index f889cb72d373..8507a22b0725 100644 --- a/compiler/test/fail_compilation/fail12764.d +++ b/compiler/test/fail_compilation/fail12764.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12764.d(20): Error: field `s` must be initialized in constructor +fail_compilation/fail12764.d(22): Error: field `s` must be initialized in constructor + this(int) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12901.d b/compiler/test/fail_compilation/fail12901.d index 31c90c1df61d..04f2d33d8cb6 100644 --- a/compiler/test/fail_compilation/fail12901.d +++ b/compiler/test/fail_compilation/fail12901.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12901.d(11): Error: constructor `fail12901.S.this` `in` and `out` contracts can only appear without a body when they are virtual interface functions or abstract +fail_compilation/fail12901.d(13): Error: constructor `fail12901.S.this` `in` and `out` contracts can only appear without a body when they are virtual interface functions or abstract + this(int n) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12908.d b/compiler/test/fail_compilation/fail12908.d index 67ea6cefb227..a07117c9b18e 100644 --- a/compiler/test/fail_compilation/fail12908.d +++ b/compiler/test/fail_compilation/fail12908.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12908.d(14): Error: `pure` delegate `fail12908.main.__foreachbody1` cannot call impure function `fail12908.g` +fail_compilation/fail12908.d(16): Error: `pure` delegate `fail12908.main.__foreachbody1` cannot call impure function `fail12908.g` + g(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail12932.d b/compiler/test/fail_compilation/fail12932.d index fe68fea01ca5..bc4135542ac2 100644 --- a/compiler/test/fail_compilation/fail12932.d +++ b/compiler/test/fail_compilation/fail12932.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail12932.d(11): Error: array literal in `@nogc` function `fail12932.foo` may cause a GC allocation fail_compilation/fail12932.d(15): Error: array literal in `@nogc` function `fail12932.foo` may cause a GC allocation + foreach (ref e; [1,2,3]) + ^ +fail_compilation/fail12932.d(19): Error: array literal in `@nogc` function `fail12932.foo` may cause a GC allocation + foreach (ref e; [1,2,3]) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13064.d b/compiler/test/fail_compilation/fail13064.d index a59de72e9dd1..c905a218d713 100644 --- a/compiler/test/fail_compilation/fail13064.d +++ b/compiler/test/fail_compilation/fail13064.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13064.d(8): Error: function `fail13064.f` storage class `auto` has no effect if return type is not inferred +fail_compilation/fail13064.d(10): Error: function `fail13064.f` storage class `auto` has no effect if return type is not inferred +auto void f() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail131.d b/compiler/test/fail_compilation/fail131.d index 78176e84f436..6ca823c0906a 100644 --- a/compiler/test/fail_compilation/fail131.d +++ b/compiler/test/fail_compilation/fail131.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail131.d(8): Error: function `D main` parameter list must be empty or accept one parameter of type `string[]` +fail_compilation/fail131.d(10): Error: function `D main` parameter list must be empty or accept one parameter of type `string[]` +int main(lazy char[][] args) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13116.d b/compiler/test/fail_compilation/fail13116.d index 156da435c7b6..5faca0e5a78e 100644 --- a/compiler/test/fail_compilation/fail13116.d +++ b/compiler/test/fail_compilation/fail13116.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13116.d(14): Error: cannot `ref` return expression `this` because it is not an lvalue -fail_compilation/fail13116.d(23): Error: cannot `ref` return expression `super` because it is not an lvalue +fail_compilation/fail13116.d(18): Error: cannot `ref` return expression `this` because it is not an lvalue + ref C evil() { return this; } // this should be rejected + ^ +fail_compilation/fail13116.d(27): Error: cannot `ref` return expression `super` because it is not an lvalue + ref Base evil() { return super; } // should be rejected + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/fail13123.d b/compiler/test/fail_compilation/fail13123.d index 4a3be08308e0..0307c7e7be2c 100644 --- a/compiler/test/fail_compilation/fail13123.d +++ b/compiler/test/fail_compilation/fail13123.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13123.d(9): Error: `fail13123.test`: `in` contract may throw but function is marked as `nothrow` -fail_compilation/fail13123.d(9): Error: `fail13123.test`: `out` contract may throw but function is marked as `nothrow` +fail_compilation/fail13123.d(13): Error: `fail13123.test`: `in` contract may throw but function is marked as `nothrow` +void test() nothrow + ^ +fail_compilation/fail13123.d(13): Error: `fail13123.test`: `out` contract may throw but function is marked as `nothrow` +void test() nothrow + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13187.d b/compiler/test/fail_compilation/fail13187.d index 2972c2792629..8e8810cafef8 100644 --- a/compiler/test/fail_compilation/fail13187.d +++ b/compiler/test/fail_compilation/fail13187.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13187.d(12): Error: `pure` function `fail13187.test` cannot access mutable static data `my_func_ptr` +fail_compilation/fail13187.d(14): Error: `pure` function `fail13187.test` cannot access mutable static data `my_func_ptr` + my_func_ptr(1); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail132.d b/compiler/test/fail_compilation/fail132.d index 58ce8a1a6bc0..f07124d4a5b6 100644 --- a/compiler/test/fail_compilation/fail132.d +++ b/compiler/test/fail_compilation/fail132.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail132.d(19): Error: cannot construct nested class `B` because no implicit `this` reference to outer class `A` is available +fail_compilation/fail132.d(21): Error: cannot construct nested class `B` because no implicit `this` reference to outer class `A` is available + A.B c = new A.B; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail133.d b/compiler/test/fail_compilation/fail133.d index 29b7d40975cc..8e3fac226fbf 100644 --- a/compiler/test/fail_compilation/fail133.d +++ b/compiler/test/fail_compilation/fail133.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail133.d(13): Error: function `D main` circular dependency. Functions cannot be interpreted while being compiled -fail_compilation/fail133.d(15): called from here: `main()` +fail_compilation/fail133.d(17): Error: function `D main` circular dependency. Functions cannot be interpreted while being compiled +int main() + ^ +fail_compilation/fail133.d(19): called from here: `main()` + return t!(main() + 8); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13336a.d b/compiler/test/fail_compilation/fail13336a.d index 6307e9025515..12e066555221 100644 --- a/compiler/test/fail_compilation/fail13336a.d +++ b/compiler/test/fail_compilation/fail13336a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13336a.d(28): Error: cannot modify expression `choose(true)` because it is not an lvalue +fail_compilation/fail13336a.d(30): Error: cannot modify expression `choose(true)` because it is not an lvalue + choose(true) = new Dog(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13336b.d b/compiler/test/fail_compilation/fail13336b.d index f8959a2183c2..22c920e4cf5e 100644 --- a/compiler/test/fail_compilation/fail13336b.d +++ b/compiler/test/fail_compilation/fail13336b.d @@ -6,8 +6,12 @@ double sy; /* TEST_OUTPUT: --- -fail_compilation/fail13336b.d(16): Error: cannot `ref` return expression `cast(double)sx` because it is not an lvalue -fail_compilation/fail13336b.d(24): Error: cannot `ref` return expression `cast(double)sx` because it is not an lvalue +fail_compilation/fail13336b.d(20): Error: cannot `ref` return expression `cast(double)sx` because it is not an lvalue + return sx; + ^ +fail_compilation/fail13336b.d(28): Error: cannot `ref` return expression `cast(double)sx` because it is not an lvalue + return sx; + ^ --- */ ref f1(bool f) diff --git a/compiler/test/fail_compilation/fail134.d b/compiler/test/fail_compilation/fail134.d index d8ae89cdf8ed..4c8baa51b824 100644 --- a/compiler/test/fail_compilation/fail134.d +++ b/compiler/test/fail_compilation/fail134.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail134.d(14): Error: template instance `foo!(f)` does not match template declaration `foo(T)` -fail_compilation/fail134.d(14): `f` is not a type -fail_compilation/fail134.d(15): Error: template instance `fail134.bar!(f)` error instantiating +fail_compilation/fail134.d(18): Error: template instance `foo!(f)` does not match template declaration `foo(T)` +template bar(T...) { alias foo!(T) buz; } + ^ +fail_compilation/fail134.d(18): `f` is not a type +fail_compilation/fail134.d(19): Error: template instance `fail134.bar!(f)` error instantiating +alias bar!(f) a; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13424.d b/compiler/test/fail_compilation/fail13424.d index dcec523a0133..3b8b84d4907b 100644 --- a/compiler/test/fail_compilation/fail13424.d +++ b/compiler/test/fail_compilation/fail13424.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13424.d(12): Error: delegate `fail13424.S.__lambda2` cannot be struct members -fail_compilation/fail13424.d(17): Error: delegate `fail13424.U.__lambda2` cannot be union members -fail_compilation/fail13424.d(22): Error: delegate `fail13424.C.__lambda2` cannot be class members +fail_compilation/fail13424.d(18): Error: delegate `fail13424.S.__lambda2` cannot be struct members + void delegate(dchar) onChar = (dchar) {}; + ^ +fail_compilation/fail13424.d(23): Error: delegate `fail13424.U.__lambda2` cannot be union members + void delegate(dchar) onChar = (dchar) {}; + ^ +fail_compilation/fail13424.d(28): Error: delegate `fail13424.C.__lambda2` cannot be class members + void delegate(dchar) onChar = (dchar) {}; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13434_m32.d b/compiler/test/fail_compilation/fail13434_m32.d index 0b1baaac2adc..3f350b78b0ec 100644 --- a/compiler/test/fail_compilation/fail13434_m32.d +++ b/compiler/test/fail_compilation/fail13434_m32.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13434_m32.d(13): Error: cannot implicitly convert expression `()` of type `()` to `uint` +fail_compilation/fail13434_m32.d(15): Error: cannot implicitly convert expression `()` of type `()` to `uint` + arr[tuple!()] = 0; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13434_m64.d b/compiler/test/fail_compilation/fail13434_m64.d index a92282bb737b..25fb34310cb0 100644 --- a/compiler/test/fail_compilation/fail13434_m64.d +++ b/compiler/test/fail_compilation/fail13434_m64.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13434_m64.d(13): Error: cannot implicitly convert expression `()` of type `()` to `ulong` +fail_compilation/fail13434_m64.d(15): Error: cannot implicitly convert expression `()` of type `()` to `ulong` + arr[tuple!()] = 0; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13435.d b/compiler/test/fail_compilation/fail13435.d index a3ef5e4e4655..1265ddfc9fd0 100644 --- a/compiler/test/fail_compilation/fail13435.d +++ b/compiler/test/fail_compilation/fail13435.d @@ -3,9 +3,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13435.d(22): Error: cannot implicitly convert expression `d` of type `int[]` to `S!int` -fail_compilation/fail13435.d(22): `this._a = d` is the first assignment of `this._a` therefore it represents its initialization -fail_compilation/fail13435.d(22): `opAssign` methods are not used for initialization, but for subsequent assignments +fail_compilation/fail13435.d(26): Error: cannot implicitly convert expression `d` of type `int[]` to `S!int` + _a = d; // Error: cannot implicitly convert expression (d) of type int[] to S!int + ^ +fail_compilation/fail13435.d(26): `this._a = d` is the first assignment of `this._a` therefore it represents its initialization + _a = d; // Error: cannot implicitly convert expression (d) of type int[] to S!int + ^ +fail_compilation/fail13435.d(26): `opAssign` methods are not used for initialization, but for subsequent assignments --- */ diff --git a/compiler/test/fail_compilation/fail13498.d b/compiler/test/fail_compilation/fail13498.d index 27f47b3f7abd..0bf54ba5f618 100644 --- a/compiler/test/fail_compilation/fail13498.d +++ b/compiler/test/fail_compilation/fail13498.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13498.d(11): Error: cannot implicitly convert expression `"foo"` of type `string` to `int` -fail_compilation/fail13498.d(16): Error: template instance `fail13498.foo!()` error instantiating +fail_compilation/fail13498.d(15): Error: cannot implicitly convert expression `"foo"` of type `string` to `int` + return "foo"; // should fail as well + ^ +fail_compilation/fail13498.d(20): Error: template instance `fail13498.foo!()` error instantiating + foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13574.d b/compiler/test/fail_compilation/fail13574.d index 2a9336bc1827..dab8e27fa321 100644 --- a/compiler/test/fail_compilation/fail13574.d +++ b/compiler/test/fail_compilation/fail13574.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13574.d(21): Error: cannot modify operator `$` -fail_compilation/fail13574.d(27): Error: cannot modify operator `$` +fail_compilation/fail13574.d(25): Error: cannot modify operator `$` + foo[0 .. $ = 2]; // assigns to the temporary dollar variable + ^ +fail_compilation/fail13574.d(31): Error: cannot modify operator `$` + auto y = arr[0 .. $ = 2]; // should also be disallowed + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13577.d b/compiler/test/fail_compilation/fail13577.d index f1048073591e..5719accce24f 100644 --- a/compiler/test/fail_compilation/fail13577.d +++ b/compiler/test/fail_compilation/fail13577.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13577.d(27): Error: cannot implicitly convert tuple element of type `int[]` to variable `x` of type `immutable(int[])` +fail_compilation/fail13577.d(29): Error: cannot implicitly convert tuple element of type `int[]` to variable `x` of type `immutable(int[])` + foreach (immutable i, immutable x; Range!(int[])()) {} // Error + ^ --- */ diff --git a/compiler/test/fail_compilation/fail136.d b/compiler/test/fail_compilation/fail136.d index 3fa42e6cc841..e1046bc9a36d 100644 --- a/compiler/test/fail_compilation/fail136.d +++ b/compiler/test/fail_compilation/fail136.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail136.d(10): Error: `x"EFBBBF"` has no effect +fail_compilation/fail136.d(12): Error: `x"EFBBBF"` has no effect + x"EF BB BF"; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13601.d b/compiler/test/fail_compilation/fail13601.d index 51291f4dc1bb..10d3eeb2b920 100644 --- a/compiler/test/fail_compilation/fail13601.d +++ b/compiler/test/fail_compilation/fail13601.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13601.d(13): Error: variable `__ctfe` cannot be read at compile time -fail_compilation/fail13601.d(14): Error: variable `__ctfe` cannot be read at compile time -fail_compilation/fail13601.d(15): Error: variable `__ctfe` cannot be read at compile time -fail_compilation/fail13601.d(16): Error: variable `__ctfe` cannot be read at compile time +fail_compilation/fail13601.d(21): Error: variable `__ctfe` cannot be read at compile time + static if (__ctfe) {} + ^ +fail_compilation/fail13601.d(22): Error: variable `__ctfe` cannot be read at compile time + enum a = __ctfe ? "a" : "b"; + ^ +fail_compilation/fail13601.d(23): Error: variable `__ctfe` cannot be read at compile time + static int b = __ctfe * 2; + ^ +fail_compilation/fail13601.d(24): Error: variable `__ctfe` cannot be read at compile time + int[__ctfe] sarr; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13701.d b/compiler/test/fail_compilation/fail13701.d index 88ed2d99a22b..fba998107bbb 100644 --- a/compiler/test/fail_compilation/fail13701.d +++ b/compiler/test/fail_compilation/fail13701.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13701.d(16): Error: cannot modify `immutable` expression `this.aa[10]` -fail_compilation/fail13701.d(23): Error: cannot modify `immutable` expression `aa[10]` -fail_compilation/fail13701.d(24): Error: cannot modify `immutable` expression `aa[10]` +fail_compilation/fail13701.d(22): Error: cannot modify `immutable` expression `this.aa[10]` + aa[10] = 30; // assignment + ^ +fail_compilation/fail13701.d(29): Error: cannot modify `immutable` expression `aa[10]` + aa[10] = 20; + ^ +fail_compilation/fail13701.d(30): Error: cannot modify `immutable` expression `aa[10]` + aa[10]++; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13756.d b/compiler/test/fail_compilation/fail13756.d index cdf0e854d54f..89dbb96990af 100644 --- a/compiler/test/fail_compilation/fail13756.d +++ b/compiler/test/fail_compilation/fail13756.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13756.d(11): Error: `foreach`: index must be type `const(int)`, not `int` +fail_compilation/fail13756.d(13): Error: `foreach`: index must be type `const(int)`, not `int` + foreach (ref int k, v; aa) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail13775.d b/compiler/test/fail_compilation/fail13775.d index 8649d591b696..16f4f423c97b 100644 --- a/compiler/test/fail_compilation/fail13775.d +++ b/compiler/test/fail_compilation/fail13775.d @@ -2,10 +2,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail13775.d(17): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `ubyte[1]` -fail_compilation/fail13775.d(18): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `ubyte[3]` -fail_compilation/fail13775.d(19): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `byte[1]` -fail_compilation/fail13775.d(20): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `byte[3]` +fail_compilation/fail13775.d(25): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `ubyte[1]` + auto ng1 = cast(ubyte[1]) ubytes[0 .. 2]; // ubyte[2] to ubyte[1] + ^ +fail_compilation/fail13775.d(26): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `ubyte[3]` + auto ng2 = cast(ubyte[3]) ubytes[0 .. 2]; // ubyte[2] to ubyte[3] + ^ +fail_compilation/fail13775.d(27): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `byte[1]` + auto ng3 = cast( byte[1]) ubytes[0 .. 2]; // ubyte[2] to byte[1] + ^ +fail_compilation/fail13775.d(28): Error: cannot cast expression `ubytes[0..2]` of type `ubyte[2]` to `byte[3]` + auto ng4 = cast( byte[3]) ubytes[0 .. 2]; // ubyte[2] to byte[3] + ^ --- */ diff --git a/compiler/test/fail_compilation/fail139.d b/compiler/test/fail_compilation/fail139.d index d5cdb99aa336..e30f7951a479 100644 --- a/compiler/test/fail_compilation/fail139.d +++ b/compiler/test/fail_compilation/fail139.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail139.d(8): Error: forward reference to `test` +fail_compilation/fail139.d(10): Error: forward reference to `test` +void test(typeof(&test) p) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14.d b/compiler/test/fail_compilation/fail14.d index a44d41cb80a4..2632f408943c 100644 --- a/compiler/test/fail_compilation/fail14.d +++ b/compiler/test/fail_compilation/fail14.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14.d(10): Error: template instance `fail14.A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!int))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))` recursive expansion exceeded allowed nesting limit +fail_compilation/fail14.d(12): Error: template instance `fail14.A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!(A!int))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))` recursive expansion exceeded allowed nesting limit + .A!(A) x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14009.d b/compiler/test/fail_compilation/fail14009.d index 8a5bfc556158..a6006fc2e2dd 100644 --- a/compiler/test/fail_compilation/fail14009.d +++ b/compiler/test/fail_compilation/fail14009.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14009.d(12): Error: expression expected not `:` +fail_compilation/fail14009.d(14): Error: expression expected not `:` + mov EAX, FS: 1 ? 2 : : 3; // rejected + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14089.d b/compiler/test/fail_compilation/fail14089.d index f60910432de0..b6c00f190b16 100644 --- a/compiler/test/fail_compilation/fail14089.d +++ b/compiler/test/fail_compilation/fail14089.d @@ -1,16 +1,36 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14089.d(41): Error: `1` has no effect -fail_compilation/fail14089.d(41): Error: `1` has no effect -fail_compilation/fail14089.d(42): Error: `1` has no effect -fail_compilation/fail14089.d(42): Error: `n` has no effect -fail_compilation/fail14089.d(43): Error: `1` has no effect -fail_compilation/fail14089.d(43): Error: `s.val` has no effect -fail_compilation/fail14089.d(44): Error: `n` has no effect -fail_compilation/fail14089.d(44): Error: `1` has no effect -fail_compilation/fail14089.d(45): Error: `s.val` has no effect -fail_compilation/fail14089.d(45): Error: `1` has no effect +fail_compilation/fail14089.d(61): Error: `1` has no effect + cond ? 1 : 1; + ^ +fail_compilation/fail14089.d(61): Error: `1` has no effect + cond ? 1 : 1; + ^ +fail_compilation/fail14089.d(62): Error: `1` has no effect + cond ? 1 : n; + ^ +fail_compilation/fail14089.d(62): Error: `n` has no effect + cond ? 1 : n; + ^ +fail_compilation/fail14089.d(63): Error: `1` has no effect + cond ? 1 : s.val; + ^ +fail_compilation/fail14089.d(63): Error: `s.val` has no effect + cond ? 1 : s.val; + ^ +fail_compilation/fail14089.d(64): Error: `n` has no effect + cond ? n : 1; + ^ +fail_compilation/fail14089.d(64): Error: `1` has no effect + cond ? n : 1; + ^ +fail_compilation/fail14089.d(65): Error: `s.val` has no effect + cond ? s.val : 1; + ^ +fail_compilation/fail14089.d(65): Error: `1` has no effect + cond ? s.val : 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail142.d b/compiler/test/fail_compilation/fail142.d index c31a317500ad..8b2abc2bc257 100644 --- a/compiler/test/fail_compilation/fail142.d +++ b/compiler/test/fail_compilation/fail142.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail142.d(21): Error: cannot create instance of abstract class `B` -fail_compilation/fail142.d(15): class `B` is declared here -fail_compilation/fail142.d(12): function `void test()` is not implemented +fail_compilation/fail142.d(27): Error: cannot create instance of abstract class `B` + B b = new B(); + ^ +fail_compilation/fail142.d(21): class `B` is declared here +class B : A +^ +fail_compilation/fail142.d(18): function `void test()` is not implemented + abstract void test() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14249.d b/compiler/test/fail_compilation/fail14249.d index 8d66a75c5c11..804b532194b8 100644 --- a/compiler/test/fail_compilation/fail14249.d +++ b/compiler/test/fail_compilation/fail14249.d @@ -2,18 +2,42 @@ REQUIRED_ARGS: -unittest TEST_OUTPUT: --- -fail_compilation/fail14249.d(21): Error: `shared static` constructor can only be member of module/aggregate/template, not function `main` -fail_compilation/fail14249.d(22): Error: `shared static` destructor can only be member of module/aggregate/template, not function `main` -fail_compilation/fail14249.d(23): Error: `static` constructor can only be member of module/aggregate/template, not function `main` -fail_compilation/fail14249.d(24): Error: `static` destructor can only be member of module/aggregate/template, not function `main` -fail_compilation/fail14249.d(25): Error: `unittest` can only be a member of module/aggregate/template, not function `main` -fail_compilation/fail14249.d(26): Error: `invariant` can only be a member of aggregate, not function `main` -fail_compilation/fail14249.d(27): Error: alias this can only be a member of aggregate, not function `main` -fail_compilation/fail14249.d(28): Error: constructor can only be a member of aggregate, not function `main` -fail_compilation/fail14249.d(29): Error: destructor can only be a member of aggregate, not function `main` -fail_compilation/fail14249.d(30): Error: postblit can only be a member of struct, not function `main` -fail_compilation/fail14249.d(31): Error: anonymous union can only be a part of an aggregate, not function `main` -fail_compilation/fail14249.d(35): Error: mixin `fail14249.main.Mix!()` error instantiating +fail_compilation/fail14249.d(45): Error: `shared static` constructor can only be member of module/aggregate/template, not function `main` + shared static this() {} + ^ +fail_compilation/fail14249.d(46): Error: `shared static` destructor can only be member of module/aggregate/template, not function `main` + shared static ~this() {} + ^ +fail_compilation/fail14249.d(47): Error: `static` constructor can only be member of module/aggregate/template, not function `main` + static this() {} // from fail197.d, 1510 ICE: Assertion failure: 'ad' on line 925 in file 'func.c' + ^ +fail_compilation/fail14249.d(48): Error: `static` destructor can only be member of module/aggregate/template, not function `main` + static ~this() {} + ^ +fail_compilation/fail14249.d(49): Error: `unittest` can only be a member of module/aggregate/template, not function `main` + unittest {} + ^ +fail_compilation/fail14249.d(50): Error: `invariant` can only be a member of aggregate, not function `main` + invariant {} + ^ +fail_compilation/fail14249.d(51): Error: alias this can only be a member of aggregate, not function `main` + alias a this; + ^ +fail_compilation/fail14249.d(52): Error: constructor can only be a member of aggregate, not function `main` + this() {} // from fail268.d + ^ +fail_compilation/fail14249.d(53): Error: destructor can only be a member of aggregate, not function `main` + ~this() {} // from fail268.d + ^ +fail_compilation/fail14249.d(54): Error: postblit can only be a member of struct, not function `main` + this(this) {} + ^ +fail_compilation/fail14249.d(55): Error: anonymous union can only be a part of an aggregate, not function `main` + union { int x; double y; } + ^ +fail_compilation/fail14249.d(59): Error: mixin `fail14249.main.Mix!()` error instantiating + mixin Mix!(); + ^ --- */ mixin template Mix() diff --git a/compiler/test/fail_compilation/fail143.d b/compiler/test/fail_compilation/fail143.d index e5ccb0fcb06f..3ebfc72ac427 100644 --- a/compiler/test/fail_compilation/fail143.d +++ b/compiler/test/fail_compilation/fail143.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail143.d(23): Error: calling non-static function `next` requires an instance of type `Quux` -fail_compilation/fail143.d(30): Error: template instance `fail143.Foo!int` error instantiating +fail_compilation/fail143.d(27): Error: calling non-static function `next` requires an instance of type `Quux` + int r = Quux.next; + ^ +fail_compilation/fail143.d(34): Error: template instance `fail143.Foo!int` error instantiating + alias Foo!(int).bar baz; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14304.d b/compiler/test/fail_compilation/fail14304.d index 8321401bcafa..c32e4767e7dd 100644 --- a/compiler/test/fail_compilation/fail14304.d +++ b/compiler/test/fail_compilation/fail14304.d @@ -1,16 +1,36 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14304.d(26): Error: reinterpreting cast from `const(S14304)*` to `S14304*` is not supported in CTFE -fail_compilation/fail14304.d(58): called from here: `sle14304.modify()` -fail_compilation/fail14304.d(35): Error: cannot modify read-only constant `[1:1, 2:2]` -fail_compilation/fail14304.d(61): called from here: `modify14304(aae14304)` -fail_compilation/fail14304.d(41): Error: cannot modify read-only constant `[1, 2, 3]` -fail_compilation/fail14304.d(64): called from here: `modify14304(cast(const(int)[])index14304)` -fail_compilation/fail14304.d(46): Error: array cast from `immutable(double[])` to `double[]` is not supported at compile time -fail_compilation/fail14304.d(67): called from here: `modify14304(cast(const(double)[])slice14304)` -fail_compilation/fail14304.d(53): Error: cannot modify read-only string literal `"abc"` -fail_compilation/fail14304.d(70): called from here: `modify14304(cast(const(char)[])str14304)` +fail_compilation/fail14304.d(46): Error: reinterpreting cast from `const(S14304)*` to `S14304*` is not supported in CTFE + (cast(S14304*)&this).x = 10; + ^ +fail_compilation/fail14304.d(78): called from here: `sle14304.modify()` +static immutable v14304 = sle14304.modify(); + ^ +fail_compilation/fail14304.d(55): Error: cannot modify read-only constant `[1:1, 2:2]` + *p = 10; + ^ +fail_compilation/fail14304.d(81): called from here: `modify14304(aae14304)` +static immutable w14304 = modify14304(aae14304); + ^ +fail_compilation/fail14304.d(61): Error: cannot modify read-only constant `[1, 2, 3]` + a[0] = 10; + ^ +fail_compilation/fail14304.d(84): called from here: `modify14304(cast(const(int)[])index14304)` +static immutable x14304 = modify14304(index14304); + ^ +fail_compilation/fail14304.d(66): Error: array cast from `immutable(double[])` to `double[]` is not supported at compile time + auto a = cast(double[])arr; + ^ +fail_compilation/fail14304.d(87): called from here: `modify14304(cast(const(double)[])slice14304)` +static immutable y14304 = modify14304(slice14304); + ^ +fail_compilation/fail14304.d(73): Error: cannot modify read-only string literal `"abc"` + s[0] = 'z'; + ^ +fail_compilation/fail14304.d(90): called from here: `modify14304(cast(const(char)[])str14304)` +static immutable z14304 = modify14304(str14304); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail144.d b/compiler/test/fail_compilation/fail144.d index 4977e4d86d4e..909dbe9ff990 100644 --- a/compiler/test/fail_compilation/fail144.d +++ b/compiler/test/fail_compilation/fail144.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail144.d(13): Error: message -fail_compilation/fail144.d(26): called from here: `bar(7)` +fail_compilation/fail144.d(17): Error: message + assert(i < 0, "message"); + ^ +fail_compilation/fail144.d(30): called from here: `bar(7)` + static b = bar(7); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14416.d b/compiler/test/fail_compilation/fail14416.d index 9d0b3e8f402d..28ca1cc5d5d4 100644 --- a/compiler/test/fail_compilation/fail14416.d +++ b/compiler/test/fail_compilation/fail14416.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14416.d(13): Error: template `S(T)` does not have property `sizeof` +fail_compilation/fail14416.d(15): Error: template `S(T)` does not have property `sizeof` +enum n = S.sizeof; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14486.d b/compiler/test/fail_compilation/fail14486.d index 35312454960b..1e2563785a93 100644 --- a/compiler/test/fail_compilation/fail14486.d +++ b/compiler/test/fail_compilation/fail14486.d @@ -3,30 +3,54 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14486.d(47): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(47): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead -fail_compilation/fail14486.d(48): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(48): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead -fail_compilation/fail14486.d(53): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(53): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead -fail_compilation/fail14486.d(54): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(54): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead -fail_compilation/fail14486.d(59): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(59): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead -fail_compilation/fail14486.d(60): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(60): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead -fail_compilation/fail14486.d(65): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(65): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead -fail_compilation/fail14486.d(66): Error: the `delete` keyword is obsolete -fail_compilation/fail14486.d(66): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead fail_compilation/fail14486.d(71): Error: the `delete` keyword is obsolete + C0a c0; delete c0; // error + ^ fail_compilation/fail14486.d(71): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead fail_compilation/fail14486.d(72): Error: the `delete` keyword is obsolete + C1a c1; delete c1; // error + ^ fail_compilation/fail14486.d(72): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead fail_compilation/fail14486.d(77): Error: the `delete` keyword is obsolete + C0b c0; delete c0; // no error + ^ fail_compilation/fail14486.d(77): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead fail_compilation/fail14486.d(78): Error: the `delete` keyword is obsolete + C1b c1; delete c1; // error + ^ fail_compilation/fail14486.d(78): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(83): Error: the `delete` keyword is obsolete + S0a* s0; delete s0; // error + ^ +fail_compilation/fail14486.d(83): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(84): Error: the `delete` keyword is obsolete + S1a* s1; delete s1; // error + ^ +fail_compilation/fail14486.d(84): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(89): Error: the `delete` keyword is obsolete + S0b* s0; delete s0; // no error + ^ +fail_compilation/fail14486.d(89): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(90): Error: the `delete` keyword is obsolete + S1b* s1; delete s1; // error + ^ +fail_compilation/fail14486.d(90): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(95): Error: the `delete` keyword is obsolete + S0a[] a0; delete a0; // error + ^ +fail_compilation/fail14486.d(95): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(96): Error: the `delete` keyword is obsolete + S1a[] a1; delete a1; // error + ^ +fail_compilation/fail14486.d(96): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(101): Error: the `delete` keyword is obsolete + S0b[] a0; delete a0; // no error + ^ +fail_compilation/fail14486.d(101): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail14486.d(102): Error: the `delete` keyword is obsolete + S1b[] a1; delete a1; // error + ^ +fail_compilation/fail14486.d(102): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead --- */ diff --git a/compiler/test/fail_compilation/fail145.d b/compiler/test/fail_compilation/fail145.d index 1e90237d0c33..8bfa581c1cc6 100644 --- a/compiler/test/fail_compilation/fail145.d +++ b/compiler/test/fail_compilation/fail145.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -checkaction=context TEST_OUTPUT: --- -fail_compilation/fail145.d(14): Error: `assert(i && (i < 0))` failed -fail_compilation/fail145.d(27): called from here: `bar(7)` +fail_compilation/fail145.d(18): Error: `assert(i && (i < 0))` failed + assert(i && i < 0); + ^ +fail_compilation/fail145.d(31): called from here: `bar(7)` + static b = bar(7); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14554.d b/compiler/test/fail_compilation/fail14554.d index b71a68e2322a..eb47c780ba25 100644 --- a/compiler/test/fail_compilation/fail14554.d +++ b/compiler/test/fail_compilation/fail14554.d @@ -3,14 +3,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14554.d(28): Error: `fail14554.issue14554_1.foo` called with argument types `(int)` matches both: -fail_compilation/fail14554.d(17): `fail14554.issue14554_1.foo!bool.foo(int j)` +fail_compilation/fail14554.d(32): Error: `fail14554.issue14554_1.foo` called with argument types `(int)` matches both: +fail_compilation/fail14554.d(21): `fail14554.issue14554_1.foo!bool.foo(int j)` and: -fail_compilation/fail14554.d(18): `fail14554.issue14554_1.foo!bool.foo(int j)` -fail_compilation/fail14554.d(29): Error: `fail14554.issue14554_2.foo` called with argument types `(int)` matches both: -fail_compilation/fail14554.d(22): `fail14554.issue14554_2.foo!bool.foo(int j)` +fail_compilation/fail14554.d(22): `fail14554.issue14554_1.foo!bool.foo(int j)` + issue14554_1.foo!bool(1); + ^ +fail_compilation/fail14554.d(33): Error: `fail14554.issue14554_2.foo` called with argument types `(int)` matches both: +fail_compilation/fail14554.d(26): `fail14554.issue14554_2.foo!bool.foo(int j)` and: -fail_compilation/fail14554.d(23): `fail14554.issue14554_2.foo!bool.foo(int j)` +fail_compilation/fail14554.d(27): `fail14554.issue14554_2.foo!bool.foo(int j)` + issue14554_2.foo!bool(1); + ^ --- */ struct issue14554_1 { diff --git a/compiler/test/fail_compilation/fail14965.d b/compiler/test/fail_compilation/fail14965.d index 37fc0fa0cc62..314df6b0b231 100644 --- a/compiler/test/fail_compilation/fail14965.d +++ b/compiler/test/fail_compilation/fail14965.d @@ -1,18 +1,42 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14965.d(19): Error: forward reference to inferred return type of function `foo1` -fail_compilation/fail14965.d(20): Error: forward reference to inferred return type of function `foo2` -fail_compilation/fail14965.d(22): Error: forward reference to inferred return type of function `bar1` -fail_compilation/fail14965.d(23): Error: forward reference to inferred return type of function `bar2` -fail_compilation/fail14965.d(25): Error: forward reference to inferred return type of function `baz1` -fail_compilation/fail14965.d(26): Error: forward reference to inferred return type of function `baz2` -fail_compilation/fail14965.d(30): Error: forward reference to inferred return type of function `foo1` -fail_compilation/fail14965.d(31): Error: forward reference to inferred return type of function `foo2` -fail_compilation/fail14965.d(33): Error: forward reference to inferred return type of function `bar1` -fail_compilation/fail14965.d(34): Error: forward reference to inferred return type of function `bar2` -fail_compilation/fail14965.d(36): Error: forward reference to inferred return type of function `baz1` -fail_compilation/fail14965.d(37): Error: forward reference to inferred return type of function `baz2` +fail_compilation/fail14965.d(43): Error: forward reference to inferred return type of function `foo1` +auto foo1() { alias F = typeof(foo1); } // TypeTypeof + ^ +fail_compilation/fail14965.d(44): Error: forward reference to inferred return type of function `foo2` +auto foo2() { alias FP = typeof(&foo2); } // TypeTypeof + ^ +fail_compilation/fail14965.d(46): Error: forward reference to inferred return type of function `bar1` +auto bar1() { auto fp = &bar1; } // ExpInitializer + ^ +fail_compilation/fail14965.d(47): Error: forward reference to inferred return type of function `bar2` +auto bar2() { auto fp = cast(void function())&bar2; } // castTo + ^ +fail_compilation/fail14965.d(49): Error: forward reference to inferred return type of function `baz1` +auto baz1() { return &baz1; } // ReturnStatement + ^ +fail_compilation/fail14965.d(50): Error: forward reference to inferred return type of function `baz2` +auto baz2() { (&baz2); } // ExpStatement + ^ +fail_compilation/fail14965.d(54): Error: forward reference to inferred return type of function `foo1` + auto foo1() { alias F = typeof(this.foo1); } + ^ +fail_compilation/fail14965.d(55): Error: forward reference to inferred return type of function `foo2` + auto foo2() { alias FP = typeof(&this.foo2); } + ^ +fail_compilation/fail14965.d(57): Error: forward reference to inferred return type of function `bar1` + auto bar1() { auto fp = &this.bar1; } + ^ +fail_compilation/fail14965.d(58): Error: forward reference to inferred return type of function `bar2` + auto bar2() { auto dg = cast(void delegate())&this.bar2; } + ^ +fail_compilation/fail14965.d(60): Error: forward reference to inferred return type of function `baz1` + auto baz1() { return &baz1; } + ^ +fail_compilation/fail14965.d(61): Error: forward reference to inferred return type of function `baz2` + auto baz2() { (&baz2); } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail14997.d b/compiler/test/fail_compilation/fail14997.d index 3654f0414292..391656476c11 100644 --- a/compiler/test/fail_compilation/fail14997.d +++ b/compiler/test/fail_compilation/fail14997.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail14997.d(19): Error: none of the overloads of `this` are callable using argument types `()` -fail_compilation/fail14997.d(14): Candidates are: `fail14997.Foo.this(int a)` -fail_compilation/fail14997.d(15): `fail14997.Foo.this(string a)` +fail_compilation/fail14997.d(25): Error: none of the overloads of `this` are callable using argument types `()` + auto a = new Foo; + ^ +fail_compilation/fail14997.d(20): Candidates are: `fail14997.Foo.this(int a)` + this (int a) {} + ^ +fail_compilation/fail14997.d(21): `fail14997.Foo.this(string a)` + this (string a) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15.d b/compiler/test/fail_compilation/fail15.d index 9d226de11265..2dcdc88a9bcc 100644 --- a/compiler/test/fail_compilation/fail15.d +++ b/compiler/test/fail_compilation/fail15.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15.d(24): Error: cannot use `[]` operator on expression of type `void` +fail_compilation/fail15.d(26): Error: cannot use `[]` operator on expression of type `void` + bool x = xs[false]; + ^ --- */ /* diff --git a/compiler/test/fail_compilation/fail150.d b/compiler/test/fail_compilation/fail150.d index 6ba04c181bf3..7578c8d63c49 100644 --- a/compiler/test/fail_compilation/fail150.d +++ b/compiler/test/fail_compilation/fail150.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail150.d(22): Error: `.new` is only for allocating nested classes +fail_compilation/fail150.d(24): Error: `.new` is only for allocating nested classes + myclass.new Foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15044.d b/compiler/test/fail_compilation/fail15044.d index 964dcf913c2a..73d5824b3732 100644 --- a/compiler/test/fail_compilation/fail15044.d +++ b/compiler/test/fail_compilation/fail15044.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15044.d(30): Error: generated function `fail15044.V.opAssign` cannot be used because it is annotated with `@disable` +fail_compilation/fail15044.d(32): Error: generated function `fail15044.V.opAssign` cannot be used because it is annotated with `@disable` + v = v; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15068.d b/compiler/test/fail_compilation/fail15068.d index ca555b0a2f22..89d876852e00 100644 --- a/compiler/test/fail_compilation/fail15068.d +++ b/compiler/test/fail_compilation/fail15068.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15068.d(17): Error: `T!int` is not a valid template instance, because `T` is not a template declaration but a type (`T == int`) -fail_compilation/fail15068.d(13): Error: template instance `fail15068.Stuff!int` error instantiating +fail_compilation/fail15068.d(21): Error: `T!int` is not a valid template instance, because `T` is not a template declaration but a type (`T == int`) + T!int var; + ^ +fail_compilation/fail15068.d(17): Error: template instance `fail15068.Stuff!int` error instantiating + Stuff!int s; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15089.d b/compiler/test/fail_compilation/fail15089.d index 9aa94f863dfe..1462ae328827 100644 --- a/compiler/test/fail_compilation/fail15089.d +++ b/compiler/test/fail_compilation/fail15089.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15089.d(10): Error: cannot implicitly convert expression `2 ^ 128` of type `int` to `byte` +fail_compilation/fail15089.d(12): Error: cannot implicitly convert expression `2 ^ 128` of type `int` to `byte` +byte piece = Pieces.Rook ^ color; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail152.d b/compiler/test/fail_compilation/fail152.d index 00b0b45316ee..ace8d1330790 100644 --- a/compiler/test/fail_compilation/fail152.d +++ b/compiler/test/fail_compilation/fail152.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail152.d(16): Error: cannot use type `double` as an operand -fail_compilation/fail152.d(22): Error: template instance `fail152.a!double` error instantiating +fail_compilation/fail152.d(20): Error: cannot use type `double` as an operand + fstp double ptr var1; // (2) ICE + ^ +fail_compilation/fail152.d(26): Error: template instance `fail152.a!double` error instantiating + a(3.6); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail153.d b/compiler/test/fail_compilation/fail153.d index 96cd383b5062..9eadc684b3f4 100644 --- a/compiler/test/fail_compilation/fail153.d +++ b/compiler/test/fail_compilation/fail153.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail153.d(10): Error: class `fail153.Bar` cannot inherit from class `Foo` because it is `final` +fail_compilation/fail153.d(12): Error: class `fail153.Bar` cannot inherit from class `Foo` because it is `final` +class Bar : Foo { } +^ --- */ diff --git a/compiler/test/fail_compilation/fail15361.d b/compiler/test/fail_compilation/fail15361.d index 8e5f9800a816..ac21aaf39d3b 100644 --- a/compiler/test/fail_compilation/fail15361.d +++ b/compiler/test/fail_compilation/fail15361.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15361.d(8): Error: unexpected `(` after `errorize`, inside `is` expression. Try enclosing the contents of `is` with a `typeof` expression +fail_compilation/fail15361.d(10): Error: unexpected `(` after `errorize`, inside `is` expression. Try enclosing the contents of `is` with a `typeof` expression +enum isErrorizable(T) = is(errorize(T.init)); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail154.d b/compiler/test/fail_compilation/fail154.d index ee9eb42c3a1a..762ee3a436b8 100644 --- a/compiler/test/fail_compilation/fail154.d +++ b/compiler/test/fail_compilation/fail154.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail154.d(18): Error: template instance `X!(MYP!int)` does not match template declaration `X(T : Policy!T, alias Policy)` +fail_compilation/fail154.d(20): Error: template instance `X!(MYP!int)` does not match template declaration `X(T : Policy!T, alias Policy)` +X!(MYP!(int)) x; +^ --- */ diff --git a/compiler/test/fail_compilation/fail15414.d b/compiler/test/fail_compilation/fail15414.d index ed576b57fe66..c7dc9f8246a3 100644 --- a/compiler/test/fail_compilation/fail15414.d +++ b/compiler/test/fail_compilation/fail15414.d @@ -5,8 +5,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15414.d(20): Deprecation: `__traits(getAttributes)` may only be used for individual functions, not the overload set `fun` -fail_compilation/fail15414.d(20): the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from +fail_compilation/fail15414.d(22): Deprecation: `__traits(getAttributes)` may only be used for individual functions, not the overload set `fun` + auto t = __traits(getAttributes, fun); + ^ +fail_compilation/fail15414.d(22): the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from --- */ diff --git a/compiler/test/fail_compilation/fail155.d b/compiler/test/fail_compilation/fail155.d index 5f73f9a0ea5e..58768f0a2357 100644 --- a/compiler/test/fail_compilation/fail155.d +++ b/compiler/test/fail_compilation/fail155.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail155.d(20): Error: overlapping initialization for field `x` and `y` -fail_compilation/fail155.d(20): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized +fail_compilation/fail155.d(22): Error: overlapping initialization for field `x` and `y` +S s = S( 1, 2, 3, 4 ); + ^ +fail_compilation/fail155.d(22): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized --- */ diff --git a/compiler/test/fail_compilation/fail15535.d b/compiler/test/fail_compilation/fail15535.d index 6f71a927fb23..224cb7fb11e6 100644 --- a/compiler/test/fail_compilation/fail15535.d +++ b/compiler/test/fail_compilation/fail15535.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15535.d(17): Error: `goto default` not allowed in `final switch` statement +fail_compilation/fail15535.d(19): Error: `goto default` not allowed in `final switch` statement + goto default; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15550.d b/compiler/test/fail_compilation/fail15550.d index f7b910c3c91f..50d600ff323e 100644 --- a/compiler/test/fail_compilation/fail15550.d +++ b/compiler/test/fail_compilation/fail15550.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15550.d(25): Error: partial template instance `foo!int` has no type -fail_compilation/fail15550.d(26): Error: partial template instance `opDispatch!"_isMatrix"` has no type -fail_compilation/fail15550.d(27): Error: partial template instance `baz!"_isMatrix"` has no type +fail_compilation/fail15550.d(31): Error: partial template instance `foo!int` has no type +alias T1 = typeof(foo!int); + ^ +fail_compilation/fail15550.d(32): Error: partial template instance `opDispatch!"_isMatrix"` has no type +alias T2 = typeof(Vector._isMatrix); + ^ +fail_compilation/fail15550.d(33): Error: partial template instance `baz!"_isMatrix"` has no type +alias T3 = typeof(Vector.baz!"_isMatrix"); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail156.d b/compiler/test/fail_compilation/fail156.d index ccb325415b2a..1fcb0318721e 100644 --- a/compiler/test/fail_compilation/fail156.d +++ b/compiler/test/fail_compilation/fail156.d @@ -2,10 +2,14 @@ /* TEST_OUTPUT: --- -fail_compilation/fail156.d(35): Error: overlapping initialization for field `x` and `y` -fail_compilation/fail156.d(35): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized -fail_compilation/fail156.d(42): Error: overlapping initialization for field `x` and `y` -fail_compilation/fail156.d(42): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized +fail_compilation/fail156.d(39): Error: overlapping initialization for field `x` and `y` + static S t = S( 1, 6, 6 ); + ^ +fail_compilation/fail156.d(39): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized +fail_compilation/fail156.d(46): Error: overlapping initialization for field `x` and `y` + S u = S( 1, 5, 6 ); + ^ +fail_compilation/fail156.d(46): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized --- */ diff --git a/compiler/test/fail_compilation/fail15616b.d b/compiler/test/fail_compilation/fail15616b.d index 4b209685ca44..bd02ff0199fa 100644 --- a/compiler/test/fail_compilation/fail15616b.d +++ b/compiler/test/fail_compilation/fail15616b.d @@ -3,30 +3,48 @@ REQUIRED_ARGS: -v TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|semantic|entry|\s*$)") TEST_OUTPUT: --- -fail_compilation/fail15616b.d(44): Error: none of the overloads of `foo` are callable using argument types `(double)` -fail_compilation/fail15616b.d(17): Candidates are: `fail15616b.foo(int a)` -fail_compilation/fail15616b.d(20): `fail15616b.foo(int a, int b)` -fail_compilation/fail15616b.d(29): `fail15616b.foo(int a, int b, int c)` -fail_compilation/fail15616b.d(32): `fail15616b.foo(string a)` -fail_compilation/fail15616b.d(35): `fail15616b.foo(string a, string b)` -fail_compilation/fail15616b.d(38): `fail15616b.foo(string a, string b, string c)` -fail_compilation/fail15616b.d(23): `foo(T)(T a)` +fail_compilation/fail15616b.d(75): Error: none of the overloads of `foo` are callable using argument types `(double)` + foo(3.14); + ^ +fail_compilation/fail15616b.d(48): Candidates are: `fail15616b.foo(int a)` +void foo(int a) + ^ +fail_compilation/fail15616b.d(51): `fail15616b.foo(int a, int b)` +void foo(int a, int b) + ^ +fail_compilation/fail15616b.d(60): `fail15616b.foo(int a, int b, int c)` +void foo(int a, int b, int c) + ^ +fail_compilation/fail15616b.d(63): `fail15616b.foo(string a)` +void foo(string a) + ^ +fail_compilation/fail15616b.d(66): `fail15616b.foo(string a, string b)` +void foo(string a, string b) + ^ +fail_compilation/fail15616b.d(69): `fail15616b.foo(string a, string b, string c)` +void foo(string a, string b, string c) + ^ +fail_compilation/fail15616b.d(54): `foo(T)(T a)` with `T = double` whose parameters have the following constraints: `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~` ` > is(T == float) ` `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~` -fail_compilation/fail15616b.d(26): `foo(T)(T a)` +void foo(T)(T a) if (is(T == float)) + ^ +fail_compilation/fail15616b.d(57): `foo(T)(T a)` with `T = double` whose parameters have the following constraints: `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~` ` > is(T == char) ` `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~` +void foo(T)(T a) if (is(T == char)) + ^ Tip: not satisfied constraints are marked with `>` --- */ -#line 17 +// Line 17 starts here void foo(int a) {} diff --git a/compiler/test/fail_compilation/fail15616c.d b/compiler/test/fail_compilation/fail15616c.d index 092590eff1a2..c74842802ed2 100644 --- a/compiler/test/fail_compilation/fail15616c.d +++ b/compiler/test/fail_compilation/fail15616c.d @@ -2,25 +2,43 @@ REQUIRED_ARGS: -verror-supplements=0 TEST_OUTPUT: --- -fail_compilation/fail15616c.d(44): Error: none of the overloads of `foo` are callable using argument types `(double)` -fail_compilation/fail15616c.d(17): Candidates are: `fail15616c.foo(int a)` -fail_compilation/fail15616c.d(20): `fail15616c.foo(int a, int b)` -fail_compilation/fail15616c.d(29): `fail15616c.foo(int a, int b, int c)` -fail_compilation/fail15616c.d(32): `fail15616c.foo(string a)` -fail_compilation/fail15616c.d(35): `fail15616c.foo(string a, string b)` -fail_compilation/fail15616c.d(38): `fail15616c.foo(string a, string b, string c)` -fail_compilation/fail15616c.d(23): `foo(T)(T a)` +fail_compilation/fail15616c.d(69): Error: none of the overloads of `foo` are callable using argument types `(double)` + foo(3.14); + ^ +fail_compilation/fail15616c.d(42): Candidates are: `fail15616c.foo(int a)` +void foo(int a) + ^ +fail_compilation/fail15616c.d(45): `fail15616c.foo(int a, int b)` +void foo(int a, int b) + ^ +fail_compilation/fail15616c.d(54): `fail15616c.foo(int a, int b, int c)` +void foo(int a, int b, int c) + ^ +fail_compilation/fail15616c.d(57): `fail15616c.foo(string a)` +void foo(string a) + ^ +fail_compilation/fail15616c.d(60): `fail15616c.foo(string a, string b)` +void foo(string a, string b) + ^ +fail_compilation/fail15616c.d(63): `fail15616c.foo(string a, string b, string c)` +void foo(string a, string b, string c) + ^ +fail_compilation/fail15616c.d(48): `foo(T)(T a)` with `T = double` must satisfy the following constraint: ` is(T == float)` -fail_compilation/fail15616c.d(26): `foo(T)(T a)` +void foo(T)(T a) if (is(T == float)) + ^ +fail_compilation/fail15616c.d(51): `foo(T)(T a)` with `T = double` must satisfy the following constraint: ` is(T == char)` +void foo(T)(T a) if (is(T == char)) + ^ --- */ -#line 17 +// Line 17 starts here void foo(int a) {} diff --git a/compiler/test/fail_compilation/fail15626.d b/compiler/test/fail_compilation/fail15626.d index 8ef14cd5aae6..698c8001504f 100644 --- a/compiler/test/fail_compilation/fail15626.d +++ b/compiler/test/fail_compilation/fail15626.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15626.d(12): Error: class `fail15626.D` C++ base class `C` needs at least one virtual function +fail_compilation/fail15626.d(14): Error: class `fail15626.D` C++ base class `C` needs at least one virtual function + class D : C, I + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15691.d b/compiler/test/fail_compilation/fail15691.d index 10033edaf210..73fd280c6ee0 100644 --- a/compiler/test/fail_compilation/fail15691.d +++ b/compiler/test/fail_compilation/fail15691.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15691.d(15): Error: `c` is not a member of `Foo` -fail_compilation/fail15691.d(20): Error: `bc` is not a member of `Foo`, did you mean variable `abc`? +fail_compilation/fail15691.d(19): Error: `c` is not a member of `Foo` + c: 4, // line 15 + ^ +fail_compilation/fail15691.d(24): Error: `bc` is not a member of `Foo`, did you mean variable `abc`? + bc: 4, // line 20 + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15755.d b/compiler/test/fail_compilation/fail15755.d index 502eedcd6e38..00f62b4e5cb8 100644 --- a/compiler/test/fail_compilation/fail15755.d +++ b/compiler/test/fail_compilation/fail15755.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15755.d(28): Error: `AliasSeq!(123)` has no effect +fail_compilation/fail15755.d(30): Error: `AliasSeq!(123)` has no effect + getattribute!(__traits(getMember, Foo, "a")); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail158.d b/compiler/test/fail_compilation/fail158.d index 3253d1671626..904d904db417 100644 --- a/compiler/test/fail_compilation/fail158.d +++ b/compiler/test/fail_compilation/fail158.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail158.d(17): Error: too many initializers for `S` with 2 fields +fail_compilation/fail158.d(19): Error: too many initializers for `S` with 2 fields + S s = S( 1, 5, 6 ); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail15896.d b/compiler/test/fail_compilation/fail15896.d index 3fdbf4e9f98d..d433c5a1a765 100644 --- a/compiler/test/fail_compilation/fail15896.d +++ b/compiler/test/fail_compilation/fail15896.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail15896.d(11): Error: module `imports.imp15896` member `thebar` is not visible from module `fail15896` -fail_compilation/fail15896.d(11): Error: module `imports.imp15896` member `packagebar` is not visible from module `fail15896` +fail_compilation/fail15896.d(15): Error: module `imports.imp15896` member `thebar` is not visible from module `fail15896` +import imports.imp15896 : thebar, packagebar; + ^ +fail_compilation/fail15896.d(15): Error: module `imports.imp15896` member `packagebar` is not visible from module `fail15896` +import imports.imp15896 : thebar, packagebar; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail159.d b/compiler/test/fail_compilation/fail159.d index a10060662046..fc65632e99a9 100644 --- a/compiler/test/fail_compilation/fail159.d +++ b/compiler/test/fail_compilation/fail159.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail159.d(24): Error: static assert: `foo(S(1, 5), S(1, 4)) == 0` is false +fail_compilation/fail159.d(26): Error: static assert: `foo(S(1, 5), S(1, 4)) == 0` is false + static assert(foo( S(1,5), S(1,4) ) == 0); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail16.d b/compiler/test/fail_compilation/fail16.d index f462a13a5852..65ef6f168027 100644 --- a/compiler/test/fail_compilation/fail16.d +++ b/compiler/test/fail_compilation/fail16.d @@ -2,8 +2,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail16.d(19): Error: function declaration without return type. (Note that constructors are always named `this`) -fail_compilation/fail16.d(19): Error: no identifier for declarator `bar!(typeof(X))(X)` +fail_compilation/fail16.d(21): Error: function declaration without return type. (Note that constructors are always named `this`) + bar!(typeof(X))(X); + ^ +fail_compilation/fail16.d(21): Error: no identifier for declarator `bar!(typeof(X))(X)` --- */ diff --git a/compiler/test/fail_compilation/fail160.d b/compiler/test/fail_compilation/fail160.d index 9abe59f835b9..f55997033a06 100644 --- a/compiler/test/fail_compilation/fail160.d +++ b/compiler/test/fail_compilation/fail160.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail160.d(22): Error: `typeid(fail160.Foo).vtbl` is not yet implemented at compile time +fail_compilation/fail160.d(24): Error: `typeid(fail160.Foo).vtbl` is not yet implemented at compile time + auto x = new Wrapper!(Foo, Foo.work, cast(int)(Foo.classinfo.vtbl[0]))(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail16001.d b/compiler/test/fail_compilation/fail16001.d index 9d0b96f81d9b..c165a887b3aa 100644 --- a/compiler/test/fail_compilation/fail16001.d +++ b/compiler/test/fail_compilation/fail16001.d @@ -2,8 +2,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail16001.d(10): Deprecation: using `(args) => { ... }` to create a delegate that returns a delegate is error-prone. -fail_compilation/fail16001.d(10): Use `(args) { ... }` for a multi-statement function literal or use `(args) => () { }` if you intended for the lambda to return a delegate. +fail_compilation/fail16001.d(12): Deprecation: using `(args) => { ... }` to create a delegate that returns a delegate is error-prone. + auto fail = () => {}; + ^ +fail_compilation/fail16001.d(12): Use `(args) { ... }` for a multi-statement function literal or use `(args) => () { }` if you intended for the lambda to return a delegate. --- */ void main() { diff --git a/compiler/test/fail_compilation/fail161.d b/compiler/test/fail_compilation/fail161.d index ecbf69199c7b..6a2a0e10133e 100644 --- a/compiler/test/fail_compilation/fail161.d +++ b/compiler/test/fail_compilation/fail161.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail161.d(15): Error: template instance `MetaString!"2 == 1"` does not match template declaration `MetaString(String)` +fail_compilation/fail161.d(17): Error: template instance `MetaString!"2 == 1"` does not match template declaration `MetaString(String)` + alias MetaString!("2 == 1") S; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail162.d b/compiler/test/fail_compilation/fail162.d index 600e2c9d69c9..28afcc7ab54e 100644 --- a/compiler/test/fail_compilation/fail162.d +++ b/compiler/test/fail_compilation/fail162.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail162.d(25): Error: template `testHelper` is not callable using argument types `!()(string, string)` -fail_compilation/fail162.d(10): Candidate is: `testHelper(A...)()` -fail_compilation/fail162.d(30): Error: template instance `fail162.test!("hello", "world")` error instantiating +fail_compilation/fail162.d(31): Error: template `testHelper` is not callable using argument types `!()(string, string)` + const char[] test = testHelper(A); + ^ +fail_compilation/fail162.d(16): Candidate is: `testHelper(A...)()` +template testHelper(A ...) +^ +fail_compilation/fail162.d(36): Error: template instance `fail162.test!("hello", "world")` error instantiating + mixin(test!("hello", "world")); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail16206a.d b/compiler/test/fail_compilation/fail16206a.d index d28a8c33731a..34818e2e3f99 100644 --- a/compiler/test/fail_compilation/fail16206a.d +++ b/compiler/test/fail_compilation/fail16206a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail16206a.d(14): Error: `bool` expected as third argument of `__traits(getOverloads)`, not `"Not a bool"` of type `string` +fail_compilation/fail16206a.d(16): Error: `bool` expected as third argument of `__traits(getOverloads)`, not `"Not a bool"` of type `string` +alias allFoos = AliasSeq!(__traits(getOverloads, S, "foo", "Not a bool")); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail16206b.d b/compiler/test/fail_compilation/fail16206b.d index 0f20ad59a897..1851ee711f3b 100644 --- a/compiler/test/fail_compilation/fail16206b.d +++ b/compiler/test/fail_compilation/fail16206b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail16206b.d(14): Error: expected 2 arguments for `hasMember` but had 3 +fail_compilation/fail16206b.d(16): Error: expected 2 arguments for `hasMember` but had 3 +alias allFoos = AliasSeq!(__traits(hasMember, S, "foo", true)); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail163.d b/compiler/test/fail_compilation/fail163.d index 7f8f028fa52d..06c2088deb9f 100644 --- a/compiler/test/fail_compilation/fail163.d +++ b/compiler/test/fail_compilation/fail163.d @@ -1,7 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/fail163.d(11): Error: cannot implicitly convert expression `q` of type `const(char)[]` to `char[]` +fail_compilation/fail163.d(34): Error: cannot implicitly convert expression `q` of type `const(char)[]` to `char[]` + p = q; + ^ +fail_compilation/fail163.d(41): Error: cannot implicitly convert expression `p` of type `const(int***)` to `const(int)***` + cp = p; + ^ +fail_compilation/fail163.d(48): Error: cannot modify `const` expression `p` + p = cp; + ^ +fail_compilation/fail163.d(55): Error: cannot implicitly convert expression `cp` of type `const(int)***[]` to `const(uint***)[]` + p = cp; + ^ +fail_compilation/fail163.d(62): Error: cannot modify `const` expression `*p` + *p = 3; + ^ +fail_compilation/fail163.d(68): Error: cannot implicitly convert expression `& x` of type `int*` to `immutable(int)*` + immutable(int)* p = &x; + ^ +fail_compilation/fail163.d(69): Error: cannot modify `immutable` expression `*p` + *p = 3; + ^ +fail_compilation/fail163.d(75): Error: cannot implicitly convert expression `& x` of type `const(int)*` to `int*` + int* p = &x; + ^ --- */ void test1() @@ -11,12 +34,6 @@ void test1() p = q; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail163.d(24): Error: cannot implicitly convert expression `p` of type `const(int***)` to `const(int)***` ---- -*/ void test2() { const int*** p; @@ -24,12 +41,6 @@ void test2() cp = p; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail163.d(37): Error: cannot modify `const` expression `p` ---- -*/ void test3() { const(uint***) p; @@ -37,12 +48,6 @@ void test3() p = cp; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail163.d(50): Error: cannot implicitly convert expression `cp` of type `const(int)***[]` to `const(uint***)[]` ---- -*/ void test4() { const(uint***)[] p; @@ -50,12 +55,6 @@ void test4() p = cp; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail163.d(63): Error: cannot modify `const` expression `*p` ---- -*/ void test5() { int x; @@ -63,13 +62,6 @@ void test5() *p = 3; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail163.d(76): Error: cannot implicitly convert expression `& x` of type `int*` to `immutable(int)*` -fail_compilation/fail163.d(77): Error: cannot modify `immutable` expression `*p` ---- -*/ void test6() { int x; @@ -77,12 +69,6 @@ void test6() *p = 3; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail163.d(89): Error: cannot implicitly convert expression `& x` of type `const(int)*` to `int*` ---- -*/ void test7() { const(int) x = 3; diff --git a/compiler/test/fail_compilation/fail16575.d b/compiler/test/fail_compilation/fail16575.d index 7f6672428bf6..104601e8adf4 100644 --- a/compiler/test/fail_compilation/fail16575.d +++ b/compiler/test/fail_compilation/fail16575.d @@ -3,63 +3,105 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/fail16575.d(10): Error: function `fail16575.immNull` cannot have parameter of type `immutable(typeof(null))*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(11): Error: function `fail16575.shaNull` cannot have parameter of type `shared(typeof(null))*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(20): Error: function `fail16575.immNoReturn` cannot have parameter of type `immutable(noreturn)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(21): Error: function `fail16575.shaNoReturn` cannot have parameter of type `shared(noreturn)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(30): Error: function `fail16575.immBasic` cannot have parameter of type `immutable(int)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(31): Error: function `fail16575.shaBasic` cannot have parameter of type `shared(int)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(40): Error: function `fail16575.immVector` cannot have parameter of type `immutable(__vector(long[2]))*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(41): Error: function `fail16575.shaVector` cannot have parameter of type `shared(__vector(long[2]))*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(50): Error: function `fail16575.immSArray` cannot have parameter of type `immutable(long[2])` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(50): perhaps use a `long*` type instead -fail_compilation/fail16575.d(51): Error: function `fail16575.shaSArray` cannot have parameter of type `shared(long[2])` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(51): perhaps use a `long*` type instead -fail_compilation/fail16575.d(60): Error: function `fail16575.immPointer` cannot have parameter of type `immutable(int*)` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(61): Error: function `fail16575.shaPointer` cannot have parameter of type `shared(int*)` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(71): Error: function `fail16575.immStruct` cannot have parameter of type `immutable(SPP)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(72): Error: function `fail16575.shaStruct` cannot have parameter of type `shared(SPP)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(81): Error: function `fail16575.immClass` cannot have parameter of type `immutable(CPP)` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(82): Error: function `fail16575.shaClass` cannot have parameter of type `shared(CPP)` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(91): Error: function `fail16575.immEnum` cannot have parameter of type `immutable(EPP)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(92): Error: function `fail16575.shaEnum` cannot have parameter of type `shared(EPP)*` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(100): Error: function `fail16575.typeDArray` cannot have parameter of type `int[]` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(101): Error: function `fail16575.typeAArray` cannot have parameter of type `int[int]` because its linkage is `extern(C++)` -fail_compilation/fail16575.d(102): Error: function `fail16575.typeDelegate` cannot have parameter of type `extern (C++) int delegate()` because its linkage is `extern(C++)` +fail_compilation/fail16575.d(75): Error: function `fail16575.immNull` cannot have parameter of type `immutable(typeof(null))*` because its linkage is `extern(C++)` +extern(C++) void immNull(immutable(typeof(null))* a) {} + ^ +fail_compilation/fail16575.d(76): Error: function `fail16575.shaNull` cannot have parameter of type `shared(typeof(null))*` because its linkage is `extern(C++)` +extern(C++) void shaNull(shared(typeof(null))* a) {} + ^ +fail_compilation/fail16575.d(78): Error: function `fail16575.immNoReturn` cannot have parameter of type `immutable(noreturn)*` because its linkage is `extern(C++)` +extern(C++) void immNoReturn(immutable(typeof(*null))* a) {} + ^ +fail_compilation/fail16575.d(79): Error: function `fail16575.shaNoReturn` cannot have parameter of type `shared(noreturn)*` because its linkage is `extern(C++)` +extern(C++) void shaNoReturn(shared(typeof(*null))* a) {} + ^ +fail_compilation/fail16575.d(81): Error: function `fail16575.immBasic` cannot have parameter of type `immutable(int)*` because its linkage is `extern(C++)` +extern(C++) void immBasic(immutable(int)* a) {} + ^ +fail_compilation/fail16575.d(82): Error: function `fail16575.shaBasic` cannot have parameter of type `shared(int)*` because its linkage is `extern(C++)` +extern(C++) void shaBasic(shared(int)* a) {} + ^ +fail_compilation/fail16575.d(84): Error: function `fail16575.immVector` cannot have parameter of type `immutable(__vector(long[2]))*` because its linkage is `extern(C++)` +extern(C++) void immVector(immutable(__vector(long[2]))* a) {} + ^ +fail_compilation/fail16575.d(85): Error: function `fail16575.shaVector` cannot have parameter of type `shared(__vector(long[2]))*` because its linkage is `extern(C++)` +extern(C++) void shaVector(shared(__vector(long[2]))* a) {} + ^ +fail_compilation/fail16575.d(87): Error: function `fail16575.immSArray` cannot have parameter of type `immutable(long[2])` because its linkage is `extern(C++)` +extern(C++) void immSArray(immutable(long[2]) a) {} + ^ +fail_compilation/fail16575.d(87): perhaps use a `long*` type instead +fail_compilation/fail16575.d(88): Error: function `fail16575.shaSArray` cannot have parameter of type `shared(long[2])` because its linkage is `extern(C++)` +extern(C++) void shaSArray(shared(long[2]) a) {} + ^ +fail_compilation/fail16575.d(88): perhaps use a `long*` type instead +fail_compilation/fail16575.d(90): Error: function `fail16575.immPointer` cannot have parameter of type `immutable(int*)` because its linkage is `extern(C++)` +extern(C++) void immPointer(immutable(int*) a) {} + ^ +fail_compilation/fail16575.d(91): Error: function `fail16575.shaPointer` cannot have parameter of type `shared(int*)` because its linkage is `extern(C++)` +extern(C++) void shaPointer(shared(int*) a) {} + ^ +fail_compilation/fail16575.d(94): Error: function `fail16575.immStruct` cannot have parameter of type `immutable(SPP)*` because its linkage is `extern(C++)` +extern(C++) void immStruct(immutable(SPP)* a) {} + ^ +fail_compilation/fail16575.d(95): Error: function `fail16575.shaStruct` cannot have parameter of type `shared(SPP)*` because its linkage is `extern(C++)` +extern(C++) void shaStruct(shared(SPP)* a) {} + ^ +fail_compilation/fail16575.d(98): Error: function `fail16575.immClass` cannot have parameter of type `immutable(CPP)` because its linkage is `extern(C++)` +extern(C++) void immClass(immutable CPP a) {} + ^ +fail_compilation/fail16575.d(99): Error: function `fail16575.shaClass` cannot have parameter of type `shared(CPP)` because its linkage is `extern(C++)` +extern(C++) void shaClass(shared CPP a) {} + ^ +fail_compilation/fail16575.d(102): Error: function `fail16575.immEnum` cannot have parameter of type `immutable(EPP)*` because its linkage is `extern(C++)` +extern(C++) void immEnum(immutable(EPP)* a) {} + ^ +fail_compilation/fail16575.d(103): Error: function `fail16575.shaEnum` cannot have parameter of type `shared(EPP)*` because its linkage is `extern(C++)` +extern(C++) void shaEnum(shared(EPP)* a) {} + ^ +fail_compilation/fail16575.d(105): Error: function `fail16575.typeDArray` cannot have parameter of type `int[]` because its linkage is `extern(C++)` +extern(C++) void typeDArray(int[] a) {} + ^ +fail_compilation/fail16575.d(106): Error: function `fail16575.typeAArray` cannot have parameter of type `int[int]` because its linkage is `extern(C++)` +extern(C++) void typeAArray(int[int] a) {} + ^ +fail_compilation/fail16575.d(107): Error: function `fail16575.typeDelegate` cannot have parameter of type `extern (C++) int delegate()` because its linkage is `extern(C++)` +extern(C++) void typeDelegate(int delegate() a) {} + ^ --- */ -#line 10 +// Line 10 starts here extern(C++) void immNull(immutable(typeof(null))* a) {} extern(C++) void shaNull(shared(typeof(null))* a) {} -#line 20 +// Line 20 starts here extern(C++) void immNoReturn(immutable(typeof(*null))* a) {} extern(C++) void shaNoReturn(shared(typeof(*null))* a) {} -#line 30 +// Line 30 starts here extern(C++) void immBasic(immutable(int)* a) {} extern(C++) void shaBasic(shared(int)* a) {} -#line 40 +// Line 40 starts here extern(C++) void immVector(immutable(__vector(long[2]))* a) {} extern(C++) void shaVector(shared(__vector(long[2]))* a) {} -#line 50 +// Line 50 starts here extern(C++) void immSArray(immutable(long[2]) a) {} extern(C++) void shaSArray(shared(long[2]) a) {} -#line 60 +// Line 60 starts here extern(C++) void immPointer(immutable(int*) a) {} extern(C++) void shaPointer(shared(int*) a) {} -#line 70 +// Line 70 starts here extern(C++) struct SPP {} extern(C++) void immStruct(immutable(SPP)* a) {} extern(C++) void shaStruct(shared(SPP)* a) {} -#line 80 +// Line 80 starts here extern(C++) class CPP {} extern(C++) void immClass(immutable CPP a) {} extern(C++) void shaClass(shared CPP a) {} -#line 90 +// Line 90 starts here extern(C++) enum EPP {a} extern(C++) void immEnum(immutable(EPP)* a) {} extern(C++) void shaEnum(shared(EPP)* a) {} -# line 100 +// Line 100 starts here extern(C++) void typeDArray(int[] a) {} extern(C++) void typeAArray(int[int] a) {} extern(C++) void typeDelegate(int delegate() a) {} diff --git a/compiler/test/fail_compilation/fail16600.d b/compiler/test/fail_compilation/fail16600.d index 3bd600e507b8..79fbaf725e27 100644 --- a/compiler/test/fail_compilation/fail16600.d +++ b/compiler/test/fail_compilation/fail16600.d @@ -1,9 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail16600.d(22): Error: `fail16600.S.__ctor` called with argument types `(string) const` matches both: -fail_compilation/fail16600.d(16): `fail16600.S.this(string __param_0)` +fail_compilation/fail16600.d(24): Error: `fail16600.S.__ctor` called with argument types `(string) const` matches both: +fail_compilation/fail16600.d(18): `fail16600.S.this(string __param_0)` and: -fail_compilation/fail16600.d(17): `fail16600.S.this(string __param_0) immutable` +fail_compilation/fail16600.d(19): `fail16600.S.this(string __param_0) immutable` + auto a = const(S)("abc"); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail16689.d b/compiler/test/fail_compilation/fail16689.d index f8e0bae50d97..3384bb12a06a 100644 --- a/compiler/test/fail_compilation/fail16689.d +++ b/compiler/test/fail_compilation/fail16689.d @@ -1,11 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail16689.d(3): Error: static assert: "false" -fail_compilation/fail16689.d(6): instantiated from here: `Issue16689!()` +fail_compilation/fail16689.d(15): Error: static assert: "false" + static assert(false, "false"); + ^ +fail_compilation/fail16689.d(18): instantiated from here: `Issue16689!()` +mixin Issue16689!(); +^ --- */ -#line 1 +// Line 1 starts here mixin template Issue16689() { static assert(false, "false"); diff --git a/compiler/test/fail_compilation/fail16772.d b/compiler/test/fail_compilation/fail16772.d index 0bc97512c9ae..1681fdb8daaa 100644 --- a/compiler/test/fail_compilation/fail16772.d +++ b/compiler/test/fail_compilation/fail16772.d @@ -1,8 +1,10 @@ // https://issues.dlang.org/show_bug.cgi?id=16772 /* TEST_OUTPUT: --- -fail_compilation/fail16772.d(8): Error: function `fail16772.ice16772` cannot return type `ubyte[]` because its linkage is `extern(C++)` -fail_compilation/fail16772.d(8): slices are specific to D and do not have a counterpart representation in C++ +fail_compilation/fail16772.d(10): Error: function `fail16772.ice16772` cannot return type `ubyte[]` because its linkage is `extern(C++)` +extern(C++) ubyte[] ice16772() { return []; } + ^ +fail_compilation/fail16772.d(10): slices are specific to D and do not have a counterpart representation in C++ --- */ extern(C++) ubyte[] ice16772() { return []; } diff --git a/compiler/test/fail_compilation/fail169.d b/compiler/test/fail_compilation/fail169.d index a8ad1021ee88..48f47aec68b9 100644 --- a/compiler/test/fail_compilation/fail169.d +++ b/compiler/test/fail_compilation/fail169.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail169.d(8): Error: cannot have `const out` parameter of type `const(int)` +fail_compilation/fail169.d(10): Error: cannot have `const out` parameter of type `const(int)` +void foo(const out int x) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail16997.d b/compiler/test/fail_compilation/fail16997.d index 279d9da6dfc2..f1d140737b91 100644 --- a/compiler/test/fail_compilation/fail16997.d +++ b/compiler/test/fail_compilation/fail16997.d @@ -2,24 +2,60 @@ REQUIRED_ARGS: -de -revert=intpromote TEST_OUTPUT: --- -fail_compilation/fail16997.d(31): Deprecation: integral promotion not done for `~c`, remove '-revert=intpromote' switch or `~cast(int)(c)` -fail_compilation/fail16997.d(32): Deprecation: integral promotion not done for `-c`, remove '-revert=intpromote' switch or `-cast(int)(c)` -fail_compilation/fail16997.d(33): Deprecation: integral promotion not done for `+c`, remove '-revert=intpromote' switch or `+cast(int)(c)` -fail_compilation/fail16997.d(36): Deprecation: integral promotion not done for `~w`, remove '-revert=intpromote' switch or `~cast(int)(w)` -fail_compilation/fail16997.d(37): Deprecation: integral promotion not done for `-w`, remove '-revert=intpromote' switch or `-cast(int)(w)` -fail_compilation/fail16997.d(38): Deprecation: integral promotion not done for `+w`, remove '-revert=intpromote' switch or `+cast(int)(w)` -fail_compilation/fail16997.d(41): Deprecation: integral promotion not done for `~sb`, remove '-revert=intpromote' switch or `~cast(int)(sb)` -fail_compilation/fail16997.d(42): Deprecation: integral promotion not done for `-sb`, remove '-revert=intpromote' switch or `-cast(int)(sb)` -fail_compilation/fail16997.d(43): Deprecation: integral promotion not done for `+sb`, remove '-revert=intpromote' switch or `+cast(int)(sb)` -fail_compilation/fail16997.d(46): Deprecation: integral promotion not done for `~ub`, remove '-revert=intpromote' switch or `~cast(int)(ub)` -fail_compilation/fail16997.d(47): Deprecation: integral promotion not done for `-ub`, remove '-revert=intpromote' switch or `-cast(int)(ub)` -fail_compilation/fail16997.d(48): Deprecation: integral promotion not done for `+ub`, remove '-revert=intpromote' switch or `+cast(int)(ub)` -fail_compilation/fail16997.d(51): Deprecation: integral promotion not done for `~s`, remove '-revert=intpromote' switch or `~cast(int)(s)` -fail_compilation/fail16997.d(52): Deprecation: integral promotion not done for `-s`, remove '-revert=intpromote' switch or `-cast(int)(s)` -fail_compilation/fail16997.d(53): Deprecation: integral promotion not done for `+s`, remove '-revert=intpromote' switch or `+cast(int)(s)` -fail_compilation/fail16997.d(56): Deprecation: integral promotion not done for `~us`, remove '-revert=intpromote' switch or `~cast(int)(us)` -fail_compilation/fail16997.d(57): Deprecation: integral promotion not done for `-us`, remove '-revert=intpromote' switch or `-cast(int)(us)` -fail_compilation/fail16997.d(58): Deprecation: integral promotion not done for `+us`, remove '-revert=intpromote' switch or `+cast(int)(us)` +fail_compilation/fail16997.d(67): Deprecation: integral promotion not done for `~c`, remove '-revert=intpromote' switch or `~cast(int)(c)` + x = ~c; + ^ +fail_compilation/fail16997.d(68): Deprecation: integral promotion not done for `-c`, remove '-revert=intpromote' switch or `-cast(int)(c)` + x = -c; + ^ +fail_compilation/fail16997.d(69): Deprecation: integral promotion not done for `+c`, remove '-revert=intpromote' switch or `+cast(int)(c)` + x = +c; + ^ +fail_compilation/fail16997.d(72): Deprecation: integral promotion not done for `~w`, remove '-revert=intpromote' switch or `~cast(int)(w)` + x = ~w; + ^ +fail_compilation/fail16997.d(73): Deprecation: integral promotion not done for `-w`, remove '-revert=intpromote' switch or `-cast(int)(w)` + x = -w; + ^ +fail_compilation/fail16997.d(74): Deprecation: integral promotion not done for `+w`, remove '-revert=intpromote' switch or `+cast(int)(w)` + x = +w; + ^ +fail_compilation/fail16997.d(77): Deprecation: integral promotion not done for `~sb`, remove '-revert=intpromote' switch or `~cast(int)(sb)` + x = ~sb; + ^ +fail_compilation/fail16997.d(78): Deprecation: integral promotion not done for `-sb`, remove '-revert=intpromote' switch or `-cast(int)(sb)` + x = -sb; + ^ +fail_compilation/fail16997.d(79): Deprecation: integral promotion not done for `+sb`, remove '-revert=intpromote' switch or `+cast(int)(sb)` + x = +sb; + ^ +fail_compilation/fail16997.d(82): Deprecation: integral promotion not done for `~ub`, remove '-revert=intpromote' switch or `~cast(int)(ub)` + x = ~ub; + ^ +fail_compilation/fail16997.d(83): Deprecation: integral promotion not done for `-ub`, remove '-revert=intpromote' switch or `-cast(int)(ub)` + x = -ub; + ^ +fail_compilation/fail16997.d(84): Deprecation: integral promotion not done for `+ub`, remove '-revert=intpromote' switch or `+cast(int)(ub)` + x = +ub; + ^ +fail_compilation/fail16997.d(87): Deprecation: integral promotion not done for `~s`, remove '-revert=intpromote' switch or `~cast(int)(s)` + x = ~s; + ^ +fail_compilation/fail16997.d(88): Deprecation: integral promotion not done for `-s`, remove '-revert=intpromote' switch or `-cast(int)(s)` + x = -s; + ^ +fail_compilation/fail16997.d(89): Deprecation: integral promotion not done for `+s`, remove '-revert=intpromote' switch or `+cast(int)(s)` + x = +s; + ^ +fail_compilation/fail16997.d(92): Deprecation: integral promotion not done for `~us`, remove '-revert=intpromote' switch or `~cast(int)(us)` + x = ~us; + ^ +fail_compilation/fail16997.d(93): Deprecation: integral promotion not done for `-us`, remove '-revert=intpromote' switch or `-cast(int)(us)` + x = -us; + ^ +fail_compilation/fail16997.d(94): Deprecation: integral promotion not done for `+us`, remove '-revert=intpromote' switch or `+cast(int)(us)` + x = +us; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17.d b/compiler/test/fail_compilation/fail17.d index daec0f26d9c4..59ed5a0f7da5 100644 --- a/compiler/test/fail_compilation/fail17.d +++ b/compiler/test/fail_compilation/fail17.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17.d(11): Error: undefined identifier `B` -fail_compilation/fail17.d(11): Error: mixin `fail17.A!int.A.B!(T, A!T)` is not defined -fail_compilation/fail17.d(14): Error: template instance `fail17.A!int` error instantiating +fail_compilation/fail17.d(17): Error: undefined identifier `B` + mixin B!(T, A!(T)); + ^ +fail_compilation/fail17.d(17): Error: mixin `fail17.A!int.A.B!(T, A!T)` is not defined + mixin B!(T, A!(T)); + ^ +fail_compilation/fail17.d(20): Error: template instance `fail17.A!int` error instantiating +A!(int) x; +^ --- */ struct A(T) diff --git a/compiler/test/fail_compilation/fail170.d b/compiler/test/fail_compilation/fail170.d index 61c7ae6b0ad6..58003917be36 100644 --- a/compiler/test/fail_compilation/fail170.d +++ b/compiler/test/fail_compilation/fail170.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail170.d(8): Error: variable `fail170.foo.x` cannot be `final`, perhaps you meant `const`? +fail_compilation/fail170.d(10): Error: variable `fail170.foo.x` cannot be `final`, perhaps you meant `const`? +void foo(final out int x) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17105.d b/compiler/test/fail_compilation/fail17105.d index 407c40222c6f..2e80712d40c1 100644 --- a/compiler/test/fail_compilation/fail17105.d +++ b/compiler/test/fail_compilation/fail17105.d @@ -2,7 +2,9 @@ DISABLED: win32 linux32 osx32 freebsd32 openbsd32 TEST_OUTPUT: --- -fail_compilation/fail17105.d(20): Error: missing 4th parameter to `__simd()` +fail_compilation/fail17105.d(22): Error: missing 4th parameter to `__simd()` + value = cast(float4) __simd(XMM.DPPS, value, value); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail172.d b/compiler/test/fail_compilation/fail172.d index 9862fe8e6985..9fe1629f9bf9 100644 --- a/compiler/test/fail_compilation/fail172.d +++ b/compiler/test/fail_compilation/fail172.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail172.d(25): Error: cannot modify `const` expression `c1.x` -fail_compilation/fail172.d(26): Error: cannot modify `const` expression `c2.x` -fail_compilation/fail172.d(30): Error: cannot modify `const` expression `s1.x` -fail_compilation/fail172.d(31): Error: cannot modify `const` expression `s2.x` +fail_compilation/fail172.d(33): Error: cannot modify `const` expression `c1.x` + c1.x = 3; + ^ +fail_compilation/fail172.d(34): Error: cannot modify `const` expression `c2.x` + c2.x = 3; + ^ +fail_compilation/fail172.d(38): Error: cannot modify `const` expression `s1.x` + s1.x = 3; + ^ +fail_compilation/fail172.d(39): Error: cannot modify `const` expression `s2.x` + s2.x = 3; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17275.d b/compiler/test/fail_compilation/fail17275.d index 6ab31efabc30..c98e901e1198 100644 --- a/compiler/test/fail_compilation/fail17275.d +++ b/compiler/test/fail_compilation/fail17275.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17275.d(12): Error: undefined identifier `ModuleGroup`, did you mean function `moduleGroup`? -fail_compilation/fail17275.d(12): Error: `inout` on `return` means `inout` must be on a parameter as well for `inout(ModuleGroup)()` +fail_compilation/fail17275.d(16): Error: undefined identifier `ModuleGroup`, did you mean function `moduleGroup`? + inout(ModuleGroup) moduleGroup() { } + ^ +fail_compilation/fail17275.d(16): Error: `inout` on `return` means `inout` must be on a parameter as well for `inout(ModuleGroup)()` + inout(ModuleGroup) moduleGroup() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17354.d b/compiler/test/fail_compilation/fail17354.d index fd44e650f345..834c77cf404e 100644 --- a/compiler/test/fail_compilation/fail17354.d +++ b/compiler/test/fail_compilation/fail17354.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17354.d(12): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Foo.opEquals`; add `override` attribute -fail_compilation/fail17354.d(17): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Bar.opEquals`; add `override` attribute +fail_compilation/fail17354.d(16): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Foo.opEquals`; add `override` attribute + bool opEquals(const Object) const {return true;} + ^ +fail_compilation/fail17354.d(21): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Bar.opEquals`; add `override` attribute + bool opEquals(const Object) const {return true;} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17419.d b/compiler/test/fail_compilation/fail17419.d index 97ee3624839b..b3aa7aff9875 100644 --- a/compiler/test/fail_compilation/fail17419.d +++ b/compiler/test/fail_compilation/fail17419.d @@ -2,8 +2,12 @@ // https://issues.dlang.org/show_bug.cgi?id=17419 /* TEST_OUTPUT: --- -fail_compilation/fail17419.d(10): Error: argument to `__traits(getLinkage, 64)` is not a declaration -fail_compilation/fail17419.d(11): Error: expected 1 arguments for `getLinkage` but had 2 +fail_compilation/fail17419.d(14): Error: argument to `__traits(getLinkage, 64)` is not a declaration +enum s = __traits(getLinkage, 8 * 8); + ^ +fail_compilation/fail17419.d(15): Error: expected 1 arguments for `getLinkage` but had 2 +enum t = __traits(getLinkage, 8, 8); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17421.d b/compiler/test/fail_compilation/fail17421.d index f18193798de5..189893c925ff 100644 --- a/compiler/test/fail_compilation/fail17421.d +++ b/compiler/test/fail_compilation/fail17421.d @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17421.d(14): Error: argument to `__traits(getFunctionVariadicStyle, 1)` is not a function -fail_compilation/fail17421.d(14): while evaluating: `static assert(__traits(getFunctionVariadicStyle, 1) == "none")` -fail_compilation/fail17421.d(15): Error: argument to `__traits(getFunctionVariadicStyle, int*)` is not a function -fail_compilation/fail17421.d(15): while evaluating: `static assert(__traits(getFunctionVariadicStyle, int*) == "none")` +fail_compilation/fail17421.d(22): Error: argument to `__traits(getFunctionVariadicStyle, 1)` is not a function +static assert(__traits(getFunctionVariadicStyle, 1) == "none"); + ^ +fail_compilation/fail17421.d(22): while evaluating: `static assert(__traits(getFunctionVariadicStyle, 1) == "none")` +static assert(__traits(getFunctionVariadicStyle, 1) == "none"); +^ +fail_compilation/fail17421.d(23): Error: argument to `__traits(getFunctionVariadicStyle, int*)` is not a function +static assert(__traits(getFunctionVariadicStyle, x) == "none"); + ^ +fail_compilation/fail17421.d(23): while evaluating: `static assert(__traits(getFunctionVariadicStyle, int*) == "none")` +static assert(__traits(getFunctionVariadicStyle, x) == "none"); +^ --- */ diff --git a/compiler/test/fail_compilation/fail17491.d b/compiler/test/fail_compilation/fail17491.d index 718948c2832b..3c966be04e2a 100644 --- a/compiler/test/fail_compilation/fail17491.d +++ b/compiler/test/fail_compilation/fail17491.d @@ -1,13 +1,29 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17491.d(22): Error: cannot modify expression `(S17491).init` because it is not an lvalue -fail_compilation/fail17491.d(23): Error: cannot take address of expression `S17491(0)` because it is not an lvalue -fail_compilation/fail17491.d(25): Error: cannot modify expression `S17491(0).field` because it is not an lvalue -fail_compilation/fail17491.d(26): Error: cannot take address of expression `S17491(0).field` because it is not an lvalue -fail_compilation/fail17491.d(31): Error: cannot modify expression `S17491(0)` because it is not an lvalue -fail_compilation/fail17491.d(32): Error: cannot take address of expression `S17491(0)` because it is not an lvalue -fail_compilation/fail17491.d(34): Error: cannot modify expression `S17491(0).field` because it is not an lvalue -fail_compilation/fail17491.d(35): Error: cannot take address of expression `S17491(0).field` because it is not an lvalue +fail_compilation/fail17491.d(38): Error: cannot modify expression `(S17491).init` because it is not an lvalue + S17491.init = S17491(42); // NG + ^ +fail_compilation/fail17491.d(39): Error: cannot take address of expression `S17491(0)` because it is not an lvalue + *&S17491.init = S17491(42); // NG + ^ +fail_compilation/fail17491.d(41): Error: cannot modify expression `S17491(0).field` because it is not an lvalue + S17491.init.field = 42; // NG + ^ +fail_compilation/fail17491.d(42): Error: cannot take address of expression `S17491(0).field` because it is not an lvalue + *&S17491.init.field = 42; // NG + ^ +fail_compilation/fail17491.d(47): Error: cannot modify expression `S17491(0)` because it is not an lvalue + S17491(0) = S17491(42); // NG + ^ +fail_compilation/fail17491.d(48): Error: cannot take address of expression `S17491(0)` because it is not an lvalue + *&S17491(0) = S17491(42); // NG + ^ +fail_compilation/fail17491.d(50): Error: cannot modify expression `S17491(0).field` because it is not an lvalue + S17491(0).field = 42; // NG + ^ +fail_compilation/fail17491.d(51): Error: cannot take address of expression `S17491(0).field` because it is not an lvalue + *&S17491(0).field = 42; // NG + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=17491 diff --git a/compiler/test/fail_compilation/fail17492.d b/compiler/test/fail_compilation/fail17492.d index 7236c22a8bcf..e527afb6bfff 100644 --- a/compiler/test/fail_compilation/fail17492.d +++ b/compiler/test/fail_compilation/fail17492.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/fail17492.d(20): Error: function `fail17492.C.testE()` conflicts with previous declaration at fail_compilation/fail17492.d(13) -fail_compilation/fail17492.d(37): Error: function `fail17492.S.testE()` conflicts with previous declaration at fail_compilation/fail17492.d(30) +fail_compilation/fail17492.d(24): Error: function `fail17492.C.testE()` conflicts with previous declaration at fail_compilation/fail17492.d(17) + void testE() + ^ +fail_compilation/fail17492.d(41): Error: function `fail17492.S.testE()` conflicts with previous declaration at fail_compilation/fail17492.d(34) + void testE() + ^ --- https://issues.dlang.org/show_bug.cgi?id=17492 */ diff --git a/compiler/test/fail_compilation/fail17502.d b/compiler/test/fail_compilation/fail17502.d index 49db4fc98395..aaa06356b6ea 100644 --- a/compiler/test/fail_compilation/fail17502.d +++ b/compiler/test/fail_compilation/fail17502.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17502.d(13): Error: function `fail17502.Foo.foo` `void` functions have no result -fail_compilation/fail17502.d(13): Error: undefined identifier `res` -fail_compilation/fail17502.d(17): Error: function `fail17502.Foo.bar` `void` functions have no result -fail_compilation/fail17502.d(17): Error: undefined identifier `res` +fail_compilation/fail17502.d(21): Error: function `fail17502.Foo.foo` `void` functions have no result + out (res) { assert(res > 5); } + ^ +fail_compilation/fail17502.d(21): Error: undefined identifier `res` + out (res) { assert(res > 5); } + ^ +fail_compilation/fail17502.d(25): Error: function `fail17502.Foo.bar` `void` functions have no result + out (res) { assert (res > 5); } + ^ +fail_compilation/fail17502.d(25): Error: undefined identifier `res` + out (res) { assert (res > 5); } + ^ --- */ class Foo diff --git a/compiler/test/fail_compilation/fail17518.d b/compiler/test/fail_compilation/fail17518.d index cf2648db40bf..6fa1909813e6 100644 --- a/compiler/test/fail_compilation/fail17518.d +++ b/compiler/test/fail_compilation/fail17518.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17518.d(21): Error: constructor `fail17518.S.this(inout(Correct) __param_0) inout` is not callable using argument types `(Wrong)` -fail_compilation/fail17518.d(21): cannot pass argument `Wrong()` of type `Wrong` to parameter `inout(Correct) __param_0` +fail_compilation/fail17518.d(23): Error: constructor `fail17518.S.this(inout(Correct) __param_0) inout` is not callable using argument types `(Wrong)` + return S(Wrong()); + ^ +fail_compilation/fail17518.d(23): cannot pass argument `Wrong()` of type `Wrong` to parameter `inout(Correct) __param_0` --- */ diff --git a/compiler/test/fail_compilation/fail17570.d b/compiler/test/fail_compilation/fail17570.d index 9be7cd4b05fa..a9a021dc296f 100644 --- a/compiler/test/fail_compilation/fail17570.d +++ b/compiler/test/fail_compilation/fail17570.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17570.d(12): Error: cannot use function constraints for non-template functions. Use `static if` instead -fail_compilation/fail17570.d(12): Error: declaration expected, not `if` -fail_compilation/fail17570.d(15): Error: `}` expected following members in `struct` declaration -fail_compilation/fail17570.d(11): struct `S` starts here +fail_compilation/fail17570.d(18): Error: cannot use function constraints for non-template functions. Use `static if` instead + void func() if(isIntegral!T) + ^ +fail_compilation/fail17570.d(18): Error: declaration expected, not `if` + void func() if(isIntegral!T) + ^ +fail_compilation/fail17570.d(21): Error: `}` expected following members in `struct` declaration +fail_compilation/fail17570.d(17): struct `S` starts here +struct S(T) { +^ --- */ diff --git a/compiler/test/fail_compilation/fail176.d b/compiler/test/fail_compilation/fail176.d index 797407ed2c44..ad4a56e3dc0d 100644 --- a/compiler/test/fail_compilation/fail176.d +++ b/compiler/test/fail_compilation/fail176.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail176.d(13): Error: cannot modify `immutable` expression `a[1]` -fail_compilation/fail176.d(16): Error: cannot modify `immutable` expression `b[1]` -fail_compilation/fail176.d(19): Error: cannot modify `const` expression `c[1]` +fail_compilation/fail176.d(19): Error: cannot modify `immutable` expression `a[1]` + a[1] = 'd'; + ^ +fail_compilation/fail176.d(22): Error: cannot modify `immutable` expression `b[1]` + b[1] = 'd'; + ^ +fail_compilation/fail176.d(25): Error: cannot modify `const` expression `c[1]` + c[1] = 'd'; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17602.d b/compiler/test/fail_compilation/fail17602.d index 6423d1b34246..116a52d9721b 100644 --- a/compiler/test/fail_compilation/fail17602.d +++ b/compiler/test/fail_compilation/fail17602.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/imp17602.d TEST_OUTPUT: --- -fail_compilation/fail17602.d(17): Error: cannot implicitly convert expression `Status.on` of type `imports.imp17602.Status` to `fail17602.Status` +fail_compilation/fail17602.d(19): Error: cannot implicitly convert expression `Status.on` of type `imports.imp17602.Status` to `fail17602.Status` + Status status = imports.imp17602.Status.on; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17612.d b/compiler/test/fail_compilation/fail17612.d index a14e85935a63..c61a78186b87 100644 --- a/compiler/test/fail_compilation/fail17612.d +++ b/compiler/test/fail_compilation/fail17612.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17612.d(16): Error: undefined identifier `string` -fail_compilation/fail17612.d(19): Error: `TypeInfo` not found. object.d may be incorrectly installed or corrupt. -fail_compilation/fail17612.d(19): dmd might not be correctly installed. Run 'dmd -man' for installation instructions. -fail_compilation/fail17612.d(19): config file: not found +fail_compilation/fail17612.d(20): Error: undefined identifier `string` + string toString(); + ^ +fail_compilation/fail17612.d(23): Error: `TypeInfo` not found. object.d may be incorrectly installed or corrupt. +class TypeInfo {} +^ +fail_compilation/fail17612.d(23): dmd might not be correctly installed. Run 'dmd -man' for installation instructions. +fail_compilation/fail17612.d(23): config file: not found --- */ diff --git a/compiler/test/fail_compilation/fail17625.d b/compiler/test/fail_compilation/fail17625.d index bb69462f4859..f6b7de54cd1a 100644 --- a/compiler/test/fail_compilation/fail17625.d +++ b/compiler/test/fail_compilation/fail17625.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/a17625.d imports/b17625.d TEST_OUTPUT: --- -fail_compilation/fail17625.d(16): Error: undefined identifier `boo` +fail_compilation/fail17625.d(18): Error: undefined identifier `boo` + boo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17630.d b/compiler/test/fail_compilation/fail17630.d index 9b6ed82d4b34..d835208cce3d 100644 --- a/compiler/test/fail_compilation/fail17630.d +++ b/compiler/test/fail_compilation/fail17630.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17630.d(13): Error: module `a17630` import `Erase` not found, did you mean variable `b17630.Erase`? +fail_compilation/fail17630.d(15): Error: module `a17630` import `Erase` not found, did you mean variable `b17630.Erase`? + import imports.a17630 : Erase; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17646.d b/compiler/test/fail_compilation/fail17646.d index 2074b472a1ee..2ce883abf38a 100644 --- a/compiler/test/fail_compilation/fail17646.d +++ b/compiler/test/fail_compilation/fail17646.d @@ -4,8 +4,12 @@ EXTRA_FILES: imports/fail17646.d TEST_OUTPUT: --- fail_compilation/imports/fail17646.d(10): Error: found `}` instead of statement -fail_compilation/fail17646.d(15): Error: template instance `allTestData!Modules` template `allTestData` is not defined -fail_compilation/fail17646.d(18): Error: template instance `fail17646.runTests!""` error instantiating +fail_compilation/fail17646.d(19): Error: template instance `allTestData!Modules` template `allTestData` is not defined + allTestData!Modules; + ^ +fail_compilation/fail17646.d(22): Error: template instance `fail17646.runTests!""` error instantiating +alias fail = runTests!""; + ^ --- */ int runTests(Modules...)() diff --git a/compiler/test/fail_compilation/fail17689.d b/compiler/test/fail_compilation/fail17689.d index 512a6b56b501..de2514b9543a 100644 --- a/compiler/test/fail_compilation/fail17689.d +++ b/compiler/test/fail_compilation/fail17689.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17689.d(10): Error: undefined identifier `x` +fail_compilation/fail17689.d(12): Error: undefined identifier `x` + assert(x==3); + ^ --- */ void main(){ diff --git a/compiler/test/fail_compilation/fail177.d b/compiler/test/fail_compilation/fail177.d index 49edf4da40ca..93c39cad3a08 100644 --- a/compiler/test/fail_compilation/fail177.d +++ b/compiler/test/fail_compilation/fail177.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail177.d(22): Error: cannot modify `immutable` expression `j` -fail_compilation/fail177.d(24): Error: cannot modify `const` expression `i` -fail_compilation/fail177.d(26): Error: cannot modify `const` expression `s1.x` -fail_compilation/fail177.d(27): Error: cannot modify `const` expression `*s1.p` -fail_compilation/fail177.d(29): Error: cannot modify `const` expression `s2.x` -fail_compilation/fail177.d(30): Error: cannot modify `const` expression `*s2.p` +fail_compilation/fail177.d(34): Error: cannot modify `immutable` expression `j` + j = 4; + ^ +fail_compilation/fail177.d(36): Error: cannot modify `const` expression `i` + i = 4; + ^ +fail_compilation/fail177.d(38): Error: cannot modify `const` expression `s1.x` + s1.x = 3; + ^ +fail_compilation/fail177.d(39): Error: cannot modify `const` expression `*s1.p` + *s1.p = 4; + ^ +fail_compilation/fail177.d(41): Error: cannot modify `const` expression `s2.x` + s2.x = 3; + ^ +fail_compilation/fail177.d(42): Error: cannot modify `const` expression `*s2.p` + *s2.p = 4; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17722a.d b/compiler/test/fail_compilation/fail17722a.d index 7e0b9114deea..e1a245776bfe 100644 --- a/compiler/test/fail_compilation/fail17722a.d +++ b/compiler/test/fail_compilation/fail17722a.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17722a.d(12): Error: static assert: `__traits(compiles, a1 && a2)` is false +fail_compilation/fail17722a.d(14): Error: static assert: `__traits(compiles, a1 && a2)` is false + static assert(__traits(compiles, a1 && a2)); // diagnostic was (__error) && (__error) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17722b.d b/compiler/test/fail_compilation/fail17722b.d index 171c49fc5008..4c145dc96d29 100644 --- a/compiler/test/fail_compilation/fail17722b.d +++ b/compiler/test/fail_compilation/fail17722b.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17722b.d(12): Error: static assert: `__traits(compiles, a1 || a2)` is false +fail_compilation/fail17722b.d(14): Error: static assert: `__traits(compiles, a1 || a2)` is false + static assert(__traits(compiles, a1 || a2)); // diagnostic was (__error) || (__error) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17842.d b/compiler/test/fail_compilation/fail17842.d index 734f8d795e07..65a44d48108a 100644 --- a/compiler/test/fail_compilation/fail17842.d +++ b/compiler/test/fail_compilation/fail17842.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/fail17842.d(14): Error: scope variable `p` assigned to non-scope `*q` -fail_compilation/fail17842.d(23): Error: scope variable `obj` may not be copied into allocated memory +fail_compilation/fail17842.d(18): Error: scope variable `p` assigned to non-scope `*q` + *q = p; // error + ^ +fail_compilation/fail17842.d(27): Error: scope variable `obj` may not be copied into allocated memory + arr ~= obj; // error + ^ --- */ diff --git a/compiler/test/fail_compilation/fail179.d b/compiler/test/fail_compilation/fail179.d index 0c9c2489ab45..5f6c5d38af8d 100644 --- a/compiler/test/fail_compilation/fail179.d +++ b/compiler/test/fail_compilation/fail179.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail179.d(11): Error: variable `fail179.main.px` cannot be `final`, perhaps you meant `const`? +fail_compilation/fail179.d(13): Error: variable `fail179.main.px` cannot be `final`, perhaps you meant `const`? + final px = &x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17906.d b/compiler/test/fail_compilation/fail17906.d index 41f7465557fb..f97790337ac8 100644 --- a/compiler/test/fail_compilation/fail17906.d +++ b/compiler/test/fail_compilation/fail17906.d @@ -1,8 +1,10 @@ // REQUIRED_ARGS: -de /* TEST_OUTPUT: --- -fail_compilation/fail17906.d(12): Error: the `delete` keyword is obsolete -fail_compilation/fail17906.d(12): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail17906.d(14): Error: the `delete` keyword is obsolete + delete o; + ^ +fail_compilation/fail17906.d(14): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead --- */ // https://issues.dlang.org/show_bug.cgi?id=18647 diff --git a/compiler/test/fail_compilation/fail17927.d b/compiler/test/fail_compilation/fail17927.d index cf610ff8d973..d2aa12c3e0ed 100644 --- a/compiler/test/fail_compilation/fail17927.d +++ b/compiler/test/fail_compilation/fail17927.d @@ -1,10 +1,18 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/fail17927.d(13): Error: scope parameter `this` may not be returned -fail_compilation/fail17927.d(15): Error: scope parameter `this` may not be returned -fail_compilation/fail17927.d(21): Error: scope parameter `ptr` may not be returned -fail_compilation/fail17927.d(23): Error: scope parameter `ptr` may not be returned +fail_compilation/fail17927.d(21): Error: scope parameter `this` may not be returned + const(char)* mem1() const scope @safe { return ptr; } + ^ +fail_compilation/fail17927.d(23): Error: scope parameter `this` may not be returned + inout(char)* mem2() inout scope @safe { return ptr; } + ^ +fail_compilation/fail17927.d(29): Error: scope parameter `ptr` may not be returned +const(char)* foo1(scope const(char)* ptr) @safe { return ptr; } + ^ +fail_compilation/fail17927.d(31): Error: scope parameter `ptr` may not be returned +inout(char)* foo2(scope inout(char)* ptr) @safe { return ptr; } + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=17927 diff --git a/compiler/test/fail_compilation/fail17955.d b/compiler/test/fail_compilation/fail17955.d index 43ce5cc42fce..8d89746b6528 100644 --- a/compiler/test/fail_compilation/fail17955.d +++ b/compiler/test/fail_compilation/fail17955.d @@ -2,20 +2,48 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17955.d(82): Error: cannot create instance of abstract class `SimpleTimeZone` -fail_compilation/fail17955.d(76): class `SimpleTimeZone` is declared here -fail_compilation/fail17955.d(73): function `bool hasDST()` is not implemented -fail_compilation/fail17955.d(94): Error: template instance `fail17955.SimpleTimeZone.fromISOExtString!dstring` error instantiating -fail_compilation/fail17955.d(26): instantiated from here: `fromISOExtString!string` -fail_compilation/fail17955.d(57): instantiated from here: `isISOExtStringSerializable!(SysTime)` -fail_compilation/fail17955.d(50): instantiated from here: `toRedis!(SysTime)` -fail_compilation/fail17955.d(41): ... (2 instantiations, -v to show) ... -fail_compilation/fail17955.d(33): instantiated from here: `indicesOf!(isRedisType, resetCodeExpireTime)` -fail_compilation/fail17955.d(68): instantiated from here: `RedisStripped!(User, true)` -fail_compilation/fail17955.d(94): Error: calling non-static function `fromISOExtString` requires an instance of type `SimpleTimeZone` -fail_compilation/fail17955.d(96): Error: undefined identifier `DateTimeException` -fail_compilation/fail17955.d(26): Error: variable `fail17955.isISOExtStringSerializable!(SysTime).isISOExtStringSerializable` - type `void` is inferred from initializer `fromISOExtString("")`, and variables cannot be of type `void` -fail_compilation/fail17955.d(55): Error: function `fail17955.toRedis!(SysTime).toRedis` has no `return` statement, but is expected to return a value of type `string` +fail_compilation/fail17955.d(110): Error: cannot create instance of abstract class `SimpleTimeZone` + new SimpleTimeZone; + ^ +fail_compilation/fail17955.d(104): class `SimpleTimeZone` is declared here +class SimpleTimeZone : TimeZone +^ +fail_compilation/fail17955.d(101): function `bool hasDST()` is not implemented + abstract bool hasDST(); + ^ +fail_compilation/fail17955.d(122): Error: template instance `fail17955.SimpleTimeZone.fromISOExtString!dstring` error instantiating + SimpleTimeZone.fromISOExtString(zoneStr); + ^ +fail_compilation/fail17955.d(54): instantiated from here: `fromISOExtString!string` + enum isISOExtStringSerializable = T.fromISOExtString(""); + ^ +fail_compilation/fail17955.d(85): instantiated from here: `isISOExtStringSerializable!(SysTime)` + static if (isISOExtStringSerializable!T) + ^ +fail_compilation/fail17955.d(78): instantiated from here: `toRedis!(SysTime)` + enum isRedisType = toRedis!(typeof(F)); + ^ +fail_compilation/fail17955.d(69): ... (2 instantiations, -v to show) ... + static if (PRED!T) + ^ +fail_compilation/fail17955.d(61): instantiated from here: `indicesOf!(isRedisType, resetCodeExpireTime)` + alias unstrippedMemberIndices = indicesOf!(Select!(strip_id, + ^ +fail_compilation/fail17955.d(96): instantiated from here: `RedisStripped!(User, true)` + RedisObjectCollection!(RedisStripped!User) m_users; + ^ +fail_compilation/fail17955.d(122): Error: calling non-static function `fromISOExtString` requires an instance of type `SimpleTimeZone` + SimpleTimeZone.fromISOExtString(zoneStr); + ^ +fail_compilation/fail17955.d(124): Error: undefined identifier `DateTimeException` + catch (DateTimeException e) {} + ^ +fail_compilation/fail17955.d(54): Error: variable `fail17955.isISOExtStringSerializable!(SysTime).isISOExtStringSerializable` - type `void` is inferred from initializer `fromISOExtString("")`, and variables cannot be of type `void` + enum isISOExtStringSerializable = T.fromISOExtString(""); + ^ +fail_compilation/fail17955.d(83): Error: function `fail17955.toRedis!(SysTime).toRedis` has no `return` statement, but is expected to return a value of type `string` +string toRedis(T)() + ^ --- */ diff --git a/compiler/test/fail_compilation/fail17969.d b/compiler/test/fail_compilation/fail17969.d index 29bc3f448d83..5681b185114a 100644 --- a/compiler/test/fail_compilation/fail17969.d +++ b/compiler/test/fail_compilation/fail17969.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17969.d(10): Error: no property `sum` for type `fail17969.__lambda6!(int[]).__lambda6.MapResult2!((b) => b)` -fail_compilation/fail17969.d(16): struct `MapResult2` defined here +fail_compilation/fail17969.d(14): Error: no property `sum` for type `fail17969.__lambda6!(int[]).__lambda6.MapResult2!((b) => b)` +alias fun = a => MapResult2!(b => b).sum; + ^ +fail_compilation/fail17969.d(20): struct `MapResult2` defined here +struct MapResult2(alias fun) +^ --- * https://issues.dlang.org/show_bug.cgi?id=17969 */ diff --git a/compiler/test/fail_compilation/fail17976.d b/compiler/test/fail_compilation/fail17976.d index 4ecc092eae6b..c78fcd2a012c 100644 --- a/compiler/test/fail_compilation/fail17976.d +++ b/compiler/test/fail_compilation/fail17976.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail17976.d(11): Error: constructor `fail17976.S.this` parameter `this.a` is already defined -fail_compilation/fail17976.d(11): Error: constructor `fail17976.S.this` parameter `this.a` is already defined +fail_compilation/fail17976.d(15): Error: constructor `fail17976.S.this` parameter `this.a` is already defined + this(string a, string a, string a) + ^ +fail_compilation/fail17976.d(15): Error: constructor `fail17976.S.this` parameter `this.a` is already defined + this(string a, string a, string a) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18.d b/compiler/test/fail_compilation/fail18.d index 848b65116f16..08aa467f9140 100644 --- a/compiler/test/fail_compilation/fail18.d +++ b/compiler/test/fail_compilation/fail18.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18.d(14): Error: upper and lower bounds are needed to slice a pointer +fail_compilation/fail18.d(16): Error: upper and lower bounds are needed to slice a pointer + int[] a = (&x)[]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail180.d b/compiler/test/fail_compilation/fail180.d index ef4ffaa6088a..2e8ff0d2d51e 100644 --- a/compiler/test/fail_compilation/fail180.d +++ b/compiler/test/fail_compilation/fail180.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail180.d(23): Error: cannot modify `this.x` in `const` function -fail_compilation/fail180.d(24): Error: cannot modify `this.x` in `const` function -fail_compilation/fail180.d(38): Error: cannot modify `this.x` in `const` function -fail_compilation/fail180.d(39): Error: cannot modify `this.x` in `const` function -fail_compilation/fail180.d(50): Error: variable `fail180.main.t` cannot be `final`, perhaps you meant `const`? -fail_compilation/fail180.d(62): Error: variable `fail180.test.d` cannot be `final`, perhaps you meant `const`? +fail_compilation/fail180.d(35): Error: cannot modify `this.x` in `const` function + x = 4; + ^ +fail_compilation/fail180.d(36): Error: cannot modify `this.x` in `const` function + this.x = 5; + ^ +fail_compilation/fail180.d(50): Error: cannot modify `this.x` in `const` function + x = 4; + ^ +fail_compilation/fail180.d(51): Error: cannot modify `this.x` in `const` function + this.x = 5; + ^ +fail_compilation/fail180.d(62): Error: variable `fail180.main.t` cannot be `final`, perhaps you meant `const`? + final S59 t; + ^ +fail_compilation/fail180.d(74): Error: variable `fail180.test.d` cannot be `final`, perhaps you meant `const`? + final C d = new C; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18057.d b/compiler/test/fail_compilation/fail18057.d index 19e8eb475693..4f7e9a95591e 100644 --- a/compiler/test/fail_compilation/fail18057.d +++ b/compiler/test/fail_compilation/fail18057.d @@ -1,8 +1,12 @@ /** TEST_OUTPUT: --- -fail_compilation/fail18057.d(16): Error: template instance `RBNode!int` `RBNode` is not a template declaration, it is a struct -fail_compilation/fail18057.d(13): Error: variable `fail18057.RBNode.copy` recursive initialization of field +fail_compilation/fail18057.d(20): Error: template instance `RBNode!int` `RBNode` is not a template declaration, it is a struct +alias bug18057 = RBNode!int; + ^ +fail_compilation/fail18057.d(17): Error: variable `fail18057.RBNode.copy` recursive initialization of field + RBNode *copy = new RBNode; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18057b.d b/compiler/test/fail_compilation/fail18057b.d index 14abbfd346ff..a71227fe9e5b 100644 --- a/compiler/test/fail_compilation/fail18057b.d +++ b/compiler/test/fail_compilation/fail18057b.d @@ -1,7 +1,9 @@ /** TEST_OUTPUT: --- -fail_compilation/fail18057b.d(12): Error: variable `fail18057b.Recursive.field` recursive initialization of field +fail_compilation/fail18057b.d(14): Error: variable `fail18057b.Recursive.field` recursive initialization of field + int field = Recursive(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18093.d b/compiler/test/fail_compilation/fail18093.d index 4eb3663afc6d..6980622e2be5 100644 --- a/compiler/test/fail_compilation/fail18093.d +++ b/compiler/test/fail_compilation/fail18093.d @@ -1,8 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18093.d(19): Error: function `void fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen).visit()` does not override any function, did you mean to override `extern (C++) void fail18093.ParseTimeVisitor!(ASTCodegen).ParseTimeVisitor.visit()`? -fail_compilation/fail18093.d(24): Error: mixin `fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen)` error instantiating -fail_compilation/fail18093.d(27): Error: template instance `fail18093.GenericTransitiveVisitor!(ASTCodegen)` error instantiating +fail_compilation/fail18093.d(25): Error: function `void fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen).visit()` does not override any function, did you mean to override `extern (C++) void fail18093.ParseTimeVisitor!(ASTCodegen).ParseTimeVisitor.visit()`? + override void visit() {} + ^ +fail_compilation/fail18093.d(30): Error: mixin `fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen)` error instantiating + mixin ParseVisitMethods!AST; + ^ +fail_compilation/fail18093.d(33): Error: template instance `fail18093.GenericTransitiveVisitor!(ASTCodegen)` error instantiating +alias SemanticTimeTransitiveVisitor = GenericTransitiveVisitor!ASTCodegen; + ^ --- * https://issues.dlang.org/show_bug.cgi?id=18093 */ diff --git a/compiler/test/fail_compilation/fail18143.d b/compiler/test/fail_compilation/fail18143.d index 28df93a19975..6944b3e08060 100644 --- a/compiler/test/fail_compilation/fail18143.d +++ b/compiler/test/fail_compilation/fail18143.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18143.d(20): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract -fail_compilation/fail18143.d(21): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract -fail_compilation/fail18143.d(25): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract -fail_compilation/fail18143.d(26): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract -fail_compilation/fail18143.d(35): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract -fail_compilation/fail18143.d(36): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract -fail_compilation/fail18143.d(40): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract -fail_compilation/fail18143.d(41): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract +fail_compilation/fail18143.d(36): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract + in { a = n; } // error, modifying this.a in contract + ^ +fail_compilation/fail18143.d(37): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract + out { a = n; } // error, modifying this.a in contract + ^ +fail_compilation/fail18143.d(41): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract + in { a = n; } // error, modifying this.a in contract + ^ +fail_compilation/fail18143.d(42): Error: variable `fail18143.S.a` cannot modify parameter `this` in contract + out { a = n; } // error, modifying this.a in contract + ^ +fail_compilation/fail18143.d(51): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract + in { a = n; } // error, modifying this.a in contract + ^ +fail_compilation/fail18143.d(52): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract + out { a = n; } // error, modifying this.a in contract + ^ +fail_compilation/fail18143.d(56): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract + in { a = n; } // error, modifying this.a in contract + ^ +fail_compilation/fail18143.d(57): Error: variable `fail18143.C.a` cannot modify parameter `this` in contract + out { a = n; } // error, modifying this.a in contract + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18219.d b/compiler/test/fail_compilation/fail18219.d index bf4b189f6ebc..fc23d56e5d52 100644 --- a/compiler/test/fail_compilation/fail18219.d +++ b/compiler/test/fail_compilation/fail18219.d @@ -3,11 +3,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18219.d(17): Error: no property `Foobar` for type `AST`, did you mean `b18219.Foobar`? -fail_compilation/fail18219.d(18): Error: no property `Bar` for type `a18219.AST` +fail_compilation/fail18219.d(27): Error: no property `Foobar` for type `AST`, did you mean `b18219.Foobar`? + AST.Foobar t; + ^ +fail_compilation/fail18219.d(28): Error: no property `Bar` for type `a18219.AST` + AST.Bar l; + ^ fail_compilation/imports/a18219.d(3): struct `AST` defined here -fail_compilation/fail18219.d(19): Error: no property `fun` for type `AST`, did you mean `b18219.fun`? -fail_compilation/fail18219.d(20): Error: no property `Foobar` for type `AST`, did you mean `b18219.Foobar`? +struct AST +^ +fail_compilation/fail18219.d(29): Error: no property `fun` for type `AST`, did you mean `b18219.fun`? + AST.fun(); + ^ +fail_compilation/fail18219.d(30): Error: no property `Foobar` for type `AST`, did you mean `b18219.Foobar`? + AST.Foobar.smeth(); + ^ --- */ import imports.a18219; diff --git a/compiler/test/fail_compilation/fail18228.d b/compiler/test/fail_compilation/fail18228.d index 8da0b8d44374..967dcbc9754c 100644 --- a/compiler/test/fail_compilation/fail18228.d +++ b/compiler/test/fail_compilation/fail18228.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18228.d(12): Error: undefined identifier `this`, did you mean `typeof(this)`? -fail_compilation/fail18228.d(13): Error: undefined identifier `this`, did you mean `typeof(this)`? -fail_compilation/fail18228.d(14): Error: undefined identifier `super`, did you mean `typeof(super)`? +fail_compilation/fail18228.d(18): Error: undefined identifier `this`, did you mean `typeof(this)`? + this(this a) {} + ^ +fail_compilation/fail18228.d(19): Error: undefined identifier `this`, did you mean `typeof(this)`? + this(int a, this b) {} + ^ +fail_compilation/fail18228.d(20): Error: undefined identifier `super`, did you mean `typeof(super)`? + this(super a) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18236.d b/compiler/test/fail_compilation/fail18236.d index 5a696f38a4ff..72737e7094bb 100644 --- a/compiler/test/fail_compilation/fail18236.d +++ b/compiler/test/fail_compilation/fail18236.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18236.d(20): Error: cannot cast expression `V(12)` of type `V` to `int` +fail_compilation/fail18236.d(22): Error: cannot cast expression `V(12)` of type `V` to `int` + int b = cast(int)S.A; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18243.d b/compiler/test/fail_compilation/fail18243.d index 016fff9fcec6..13ddb2ee9bd9 100644 --- a/compiler/test/fail_compilation/fail18243.d +++ b/compiler/test/fail_compilation/fail18243.d @@ -2,9 +2,15 @@ EXTRA_FILES: imports/a18243.d imports/b18243.d TEST_OUTPUT: --- -fail_compilation/fail18243.d(17): Error: none of the overloads of `isNaN` are callable using argument types `!()(float)` +fail_compilation/fail18243.d(23): Error: none of the overloads of `isNaN` are callable using argument types `!()(float)` + bool b = isNaN(float.nan); + ^ fail_compilation/imports/b18243.d(3): Candidates are: `isNaN(T)(T x)` +bool isNaN(T)(T x) { return false; } + ^ fail_compilation/imports/a18243.d(5): `imports.a18243.isNaN()` +public bool isNaN() { return false; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail183.d b/compiler/test/fail_compilation/fail183.d index 362213c1f640..39b419c96fd2 100644 --- a/compiler/test/fail_compilation/fail183.d +++ b/compiler/test/fail_compilation/fail183.d @@ -1,16 +1,36 @@ /* TEST_OUTPUT: --- -fail_compilation/fail183.d(17): Error: attribute `const` is redundant with previously-applied `in` -fail_compilation/fail183.d(18): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead -fail_compilation/fail183.d(19): Error: attribute `const` is redundant with previously-applied `in` -fail_compilation/fail183.d(19): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead -fail_compilation/fail183.d(20): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead -fail_compilation/fail183.d(20): Error: attribute `const` is redundant with previously-applied `in` -fail_compilation/fail183.d(22): Error: attribute `in` cannot be added after `const`: remove `const` -fail_compilation/fail183.d(23): Error: attribute `in` cannot be added after `scope`: remove `scope` and use `-preview=in` -fail_compilation/fail183.d(24): Error: attribute `in` cannot be added after `const`: remove `const` -fail_compilation/fail183.d(25): Error: attribute `in` cannot be added after `const`: remove `const` +fail_compilation/fail183.d(37): Error: attribute `const` is redundant with previously-applied `in` +void f1(in const int x) {} + ^ +fail_compilation/fail183.d(38): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead +void f2(in scope int x) {} + ^ +fail_compilation/fail183.d(39): Error: attribute `const` is redundant with previously-applied `in` +void f3(in const scope int x) {} + ^ +fail_compilation/fail183.d(39): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead +void f3(in const scope int x) {} + ^ +fail_compilation/fail183.d(40): Error: attribute `scope` cannot be applied with `in`, use `-preview=in` instead +void f4(in scope const int x) {} + ^ +fail_compilation/fail183.d(40): Error: attribute `const` is redundant with previously-applied `in` +void f4(in scope const int x) {} + ^ +fail_compilation/fail183.d(42): Error: attribute `in` cannot be added after `const`: remove `const` +void f5(const in int x) {} + ^ +fail_compilation/fail183.d(43): Error: attribute `in` cannot be added after `scope`: remove `scope` and use `-preview=in` +void f6(scope in int x) {} + ^ +fail_compilation/fail183.d(44): Error: attribute `in` cannot be added after `const`: remove `const` +void f7(const scope in int x) {} + ^ +fail_compilation/fail183.d(45): Error: attribute `in` cannot be added after `const`: remove `const` +void f8(scope const in int x) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail184.d b/compiler/test/fail_compilation/fail184.d index 03477a84a691..ccfbea5fbd7c 100644 --- a/compiler/test/fail_compilation/fail184.d +++ b/compiler/test/fail_compilation/fail184.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail184.d(8): Error: redundant attribute `final` +fail_compilation/fail184.d(10): Error: redundant attribute `final` +final final int x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18417.d b/compiler/test/fail_compilation/fail18417.d index 7da7bd1d597f..624d385692fa 100644 --- a/compiler/test/fail_compilation/fail18417.d +++ b/compiler/test/fail_compilation/fail18417.d @@ -2,9 +2,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18417.d(11): Deprecation: `const` postblit is deprecated. Please use an unqualified postblit. -fail_compilation/fail18417.d(12): Deprecation: `immutable` postblit is deprecated. Please use an unqualified postblit. -fail_compilation/fail18417.d(13): Deprecation: `shared` postblit is deprecated. Please use an unqualified postblit. +fail_compilation/fail18417.d(17): Deprecation: `const` postblit is deprecated. Please use an unqualified postblit. +struct A { this(this) const {} } + ^ +fail_compilation/fail18417.d(18): Deprecation: `immutable` postblit is deprecated. Please use an unqualified postblit. +struct B { this(this) immutable {} } + ^ +fail_compilation/fail18417.d(19): Deprecation: `shared` postblit is deprecated. Please use an unqualified postblit. +struct C { this(this) shared {} } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail185.d b/compiler/test/fail_compilation/fail185.d index 8d3ffc9db84d..61577d6643f3 100644 --- a/compiler/test/fail_compilation/fail185.d +++ b/compiler/test/fail_compilation/fail185.d @@ -1,9 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail185.d(10): Error: static assert: "An error message +fail_compilation/fail185.d(12): Error: static assert: "An error message that spans multiple lines, and also contains such characters as a tab, \ and "." +static assert (false, +^ --- */ diff --git a/compiler/test/fail_compilation/fail18620.d b/compiler/test/fail_compilation/fail18620.d index ce202b884646..9f3e71d7a60f 100644 --- a/compiler/test/fail_compilation/fail18620.d +++ b/compiler/test/fail_compilation/fail18620.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18620.d(14): Error: `strlen` cannot be interpreted at compile time, because it has no available source code -fail_compilation/fail18620.d(19): compile time context created here -fail_compilation/fail18620.d(14): Error: `strlen` cannot be interpreted at compile time, because it has no available source code -fail_compilation/fail18620.d(20): compile time context created here +fail_compilation/fail18620.d(22): Error: `strlen` cannot be interpreted at compile time, because it has no available source code + auto a=strlen(s); + ^ +fail_compilation/fail18620.d(27): compile time context created here + static a = new A("a"); + ^ +fail_compilation/fail18620.d(22): Error: `strlen` cannot be interpreted at compile time, because it has no available source code + auto a=strlen(s); + ^ +fail_compilation/fail18620.d(28): compile time context created here + __gshared b = new A("b"); + ^ --- */ class A{ diff --git a/compiler/test/fail_compilation/fail187.d b/compiler/test/fail_compilation/fail187.d index b23a95d4dfd4..d192298ecc88 100644 --- a/compiler/test/fail_compilation/fail187.d +++ b/compiler/test/fail_compilation/fail187.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail187.d(16): Error: `catch` at fail_compilation/fail187.d(20) hides `catch` at fail_compilation/fail187.d(24) +fail_compilation/fail187.d(18): Error: `catch` at fail_compilation/fail187.d(22) hides `catch` at fail_compilation/fail187.d(26) + try + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18719.d b/compiler/test/fail_compilation/fail18719.d index 7ed513a3dfcb..25f4273edb04 100644 --- a/compiler/test/fail_compilation/fail18719.d +++ b/compiler/test/fail_compilation/fail18719.d @@ -3,8 +3,8 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18719.d(29): Error: immutable field `x` initialized multiple times - Previous initialization is here. +fail_compilation/fail18719.d(21): Error: declaration expected, not `^` +fail_compilation/fail18719.d(37): Error: unmatched closing brace --- */ @@ -17,7 +17,8 @@ struct S import core.stdc.stdio; printf("Ctor called with %d\n", y); } - void opAssign(int) immutable; + void opAssign(int) immutable; // Add `^` to trigger the error + ^ } class C @@ -32,6 +33,7 @@ class C { this.x = x; } +} // Add an extra brace to trigger the unmatched closing brace error } void main() diff --git a/compiler/test/fail_compilation/fail188.d b/compiler/test/fail_compilation/fail188.d index 6809e10087bb..195a3a78be26 100644 --- a/compiler/test/fail_compilation/fail188.d +++ b/compiler/test/fail_compilation/fail188.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail188.d(15): Error: function `fail188.Derived.foo` cannot override `final` function `fail188.Base.foo` +fail_compilation/fail188.d(17): Error: function `fail188.Derived.foo` cannot override `final` function `fail188.Base.foo` + void foo() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18892.d b/compiler/test/fail_compilation/fail18892.d index 381ef3c7ef55..ef2183ae086d 100644 --- a/compiler/test/fail_compilation/fail18892.d +++ b/compiler/test/fail_compilation/fail18892.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18892.d(22): Error: no property `foo` for `a` of type `fail18892.MT` -fail_compilation/fail18892.d(13): struct `MT` defined here -fail_compilation/fail18892.d(23): Error: no property `foo` for `MT` of type `fail18892.MT` -fail_compilation/fail18892.d(13): struct `MT` defined here +fail_compilation/fail18892.d(30): Error: no property `foo` for `a` of type `fail18892.MT` + a.foo = 3; + ^ +fail_compilation/fail18892.d(21): struct `MT` defined here +struct MT +^ +fail_compilation/fail18892.d(31): Error: no property `foo` for `MT` of type `fail18892.MT` + MT.foo = 3; + ^ +fail_compilation/fail18892.d(21): struct `MT` defined here +struct MT +^ --- */ diff --git a/compiler/test/fail_compilation/fail189.d b/compiler/test/fail_compilation/fail189.d index adc6f7e7fdf0..640e73030ebb 100644 --- a/compiler/test/fail_compilation/fail189.d +++ b/compiler/test/fail_compilation/fail189.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail189.d(10): Error: undefined identifier `foo` +fail_compilation/fail189.d(12): Error: undefined identifier `foo` + foo(); // should fail + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18938.d b/compiler/test/fail_compilation/fail18938.d index f7ece6daf809..3b39ed66b133 100644 --- a/compiler/test/fail_compilation/fail18938.d +++ b/compiler/test/fail_compilation/fail18938.d @@ -5,6 +5,8 @@ TEST_OUTPUT: --- fail_compilation/imports/test18938b/file.d(20): Error: undefined identifier `No` + return WriteOptions(No.lineBetweenGroups); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18970.d b/compiler/test/fail_compilation/fail18970.d index 9b1ec1d45896..df28287908ce 100644 --- a/compiler/test/fail_compilation/fail18970.d +++ b/compiler/test/fail_compilation/fail18970.d @@ -1,12 +1,20 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18970.d(26): Error: no property `y` for `S()` of type `fail18970.S` -fail_compilation/fail18970.d(26): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message -fail_compilation/fail18970.d(15): struct `S` defined here -fail_compilation/fail18970.d(33): Error: no property `yyy` for `this` of type `fail18970.S2` -fail_compilation/fail18970.d(33): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message -fail_compilation/fail18970.d(29): struct `S2` defined here +fail_compilation/fail18970.d(34): Error: no property `y` for `S()` of type `fail18970.S` + S().y(1); + ^ +fail_compilation/fail18970.d(34): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message +fail_compilation/fail18970.d(23): struct `S` defined here +struct S +^ +fail_compilation/fail18970.d(41): Error: no property `yyy` for `this` of type `fail18970.S2` + this.yyy; + ^ +fail_compilation/fail18970.d(41): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message +fail_compilation/fail18970.d(37): struct `S2` defined here +struct S2 +^ --- */ diff --git a/compiler/test/fail_compilation/fail18979.d b/compiler/test/fail_compilation/fail18979.d index 9b7c59acd5bc..463b7b1cc10e 100644 --- a/compiler/test/fail_compilation/fail18979.d +++ b/compiler/test/fail_compilation/fail18979.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18979.d(14): Error: no property `__ctor` for `Foo()` of type `imports.imp18979.Foo` +fail_compilation/fail18979.d(18): Error: no property `__ctor` for `Foo()` of type `imports.imp18979.Foo` + auto f = Foo(42); + ^ fail_compilation/imports/imp18979.d(3): struct `Foo` defined here +struct Foo +^ ---- */ diff --git a/compiler/test/fail_compilation/fail18985.d b/compiler/test/fail_compilation/fail18985.d index 830a6792ad2d..73e755980cc5 100644 --- a/compiler/test/fail_compilation/fail18985.d +++ b/compiler/test/fail_compilation/fail18985.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18985.d(16): Error: `foo` is not a scalar, it is a `object.Object` -fail_compilation/fail18985.d(17): Error: `bar` is not a scalar, it is a `shared(Object)` +fail_compilation/fail18985.d(20): Error: `foo` is not a scalar, it is a `object.Object` + foo += 1; + ^ +fail_compilation/fail18985.d(21): Error: `bar` is not a scalar, it is a `shared(Object)` + bar += 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail18994.d b/compiler/test/fail_compilation/fail18994.d index 14935a726716..7445a839c94d 100644 --- a/compiler/test/fail_compilation/fail18994.d +++ b/compiler/test/fail_compilation/fail18994.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail18994.d(19): Error: struct `fail18994.Type1` is not copyable because it has a disabled postblit +fail_compilation/fail18994.d(21): Error: struct `fail18994.Type1` is not copyable because it has a disabled postblit + foreach(b; Type2()) {} + ^ --- */ struct Type2 diff --git a/compiler/test/fail_compilation/fail190.d b/compiler/test/fail_compilation/fail190.d index 59e11d71dac5..4c6b09323250 100644 --- a/compiler/test/fail_compilation/fail190.d +++ b/compiler/test/fail_compilation/fail190.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail190.d(9): Error: cannot have pointer to `(int, int, int)` -fail_compilation/fail190.d(16): Error: template instance `fail190.f!(int, int, int)` error instantiating +fail_compilation/fail190.d(13): Error: cannot have pointer to `(int, int, int)` +T* f(T...)(T x) + ^ +fail_compilation/fail190.d(20): Error: template instance `fail190.f!(int, int, int)` error instantiating + auto x = f(2,3,4); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail1900.d b/compiler/test/fail_compilation/fail1900.d index 7e5f05692b5f..8ae6886e3d3c 100644 --- a/compiler/test/fail_compilation/fail1900.d +++ b/compiler/test/fail_compilation/fail1900.d @@ -2,10 +2,34 @@ EXTRA_FILES: imports/fail1900a.d imports/fail1900b.d TEST_OUTPUT: --- -fail_compilation/fail1900.d(27): Error: template `fail1900.Mix1a!().Foo` matches more than one template declaration: -fail_compilation/fail1900.d(14): `Foo(ubyte x)` +fail_compilation/fail1900.d(51): Error: template `fail1900.Mix1a!().Foo` matches more than one template declaration: + alias x = Foo!1; + ^ +fail_compilation/fail1900.d(38): `Foo(ubyte x)` and: -fail_compilation/fail1900.d(15): `Foo(byte x)` + template Foo(ubyte x) {} + ^ +fail_compilation/fail1900.d(39): `Foo(byte x)` + template Foo(byte x) {} + ^ +fail_compilation/fail1900.d(59): Error: `Bar` matches conflicting symbols: + enum x = Bar!1; + ^ +fail_compilation/imports/fail1900b.d(2): template `imports.fail1900b.Bar(short n)` +template Bar(short n) { enum Bar = n; } +^ +fail_compilation/imports/fail1900a.d(2): template `imports.fail1900a.Bar(int n)` +template Bar(int n) { enum Bar = n; } +^ +fail_compilation/fail1900.d(77): Error: `Baz` matches conflicting symbols: + alias x = Baz!1; + ^ +fail_compilation/fail1900.d(69): template `fail1900.Mix2b!().Baz(int x)` + template Baz(int x) {} + ^ +fail_compilation/fail1900.d(65): template `fail1900.Mix2a!().Baz(byte x)` + template Baz(byte x) {} + ^ --- */ @@ -27,15 +51,6 @@ void test1900a() alias x = Foo!1; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail1900.d(44): Error: `Bar` matches conflicting symbols: -fail_compilation/imports/fail1900b.d(2): template `imports.fail1900b.Bar(short n)` -fail_compilation/imports/fail1900a.d(2): template `imports.fail1900a.Bar(int n)` ---- -*/ - import imports.fail1900a; import imports.fail1900b; @@ -44,14 +59,6 @@ void test1900b() enum x = Bar!1; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail1900.d(70): Error: `Baz` matches conflicting symbols: -fail_compilation/fail1900.d(62): template `fail1900.Mix2b!().Baz(int x)` -fail_compilation/fail1900.d(58): template `fail1900.Mix2a!().Baz(byte x)` ---- -*/ template Mix2a() { diff --git a/compiler/test/fail_compilation/fail19038.d b/compiler/test/fail_compilation/fail19038.d index ef1a8b767e5b..25134ae1a722 100644 --- a/compiler/test/fail_compilation/fail19038.d +++ b/compiler/test/fail_compilation/fail19038.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19038.d(21): Error: cannot implicitly convert expression `a` of type `string[][]` to `const(string)[][]` -fail_compilation/fail19038.d(23): Error: cannot modify `const` expression `c[0]` +fail_compilation/fail19038.d(25): Error: cannot implicitly convert expression `a` of type `string[][]` to `const(string)[][]` + const(string)[][] b = a; // assume this works (and it should not) + ^ +fail_compilation/fail19038.d(27): Error: cannot modify `const` expression `c[0]` + c[0] = "Mordor"; // invalid, because c[0] is const(string) + ^ --- * Credit: yshui * https://github.com/dlang/dmd/pull/8413#issuecomment-401104961 diff --git a/compiler/test/fail_compilation/fail19076.d b/compiler/test/fail_compilation/fail19076.d index 05ae21bf6135..d0fc1bde81ad 100644 --- a/compiler/test/fail_compilation/fail19076.d +++ b/compiler/test/fail_compilation/fail19076.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19076.d(12): Error: no property `V` for type `fail19076.I` -fail_compilation/fail19076.d(11): interface `I` defined here -fail_compilation/fail19076.d(12): Error: `(I).V` cannot be resolved +fail_compilation/fail19076.d(18): Error: no property `V` for type `fail19076.I` +auto F = __traits(getVirtualMethods, I, "V"); + ^ +fail_compilation/fail19076.d(17): interface `I` defined here +interface I : P { } +^ +fail_compilation/fail19076.d(18): Error: `(I).V` cannot be resolved +auto F = __traits(getVirtualMethods, I, "V"); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19098.d b/compiler/test/fail_compilation/fail19098.d index c4f879f342d0..597bd7ba0655 100644 --- a/compiler/test/fail_compilation/fail19098.d +++ b/compiler/test/fail_compilation/fail19098.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19098.d(18): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members +fail_compilation/fail19098.d(20): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members + a = b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19099.d b/compiler/test/fail_compilation/fail19099.d index 6fbc61476d35..0ec3ea709cc0 100644 --- a/compiler/test/fail_compilation/fail19099.d +++ b/compiler/test/fail_compilation/fail19099.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19099.d(26): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members +fail_compilation/fail19099.d(28): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members + a = b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19103.d b/compiler/test/fail_compilation/fail19103.d index c1abd0df90af..57e03d74d291 100644 --- a/compiler/test/fail_compilation/fail19103.d +++ b/compiler/test/fail_compilation/fail19103.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19103.d(14): Error: no property `puts` for `new C` of type `fail19103.C` -fail_compilation/fail19103.d(26): class `C` defined here -fail_compilation/fail19103.d(16): Error: no property `puts` for `s1` of type `fail19103.S1` -fail_compilation/fail19103.d(30): struct `S1` defined here -fail_compilation/fail19103.d(18): Error: no property `puts` for type `S2`, did you mean `core.stdc.stdio.puts`? +fail_compilation/fail19103.d(24): Error: no property `puts` for `new C` of type `fail19103.C` + (new C).puts("OK."); // Error: no property puts for type test.C, did you mean core.stdc.stdio.puts(T...)(T args)? + ^ +fail_compilation/fail19103.d(36): class `C` defined here +class C +^ +fail_compilation/fail19103.d(26): Error: no property `puts` for `s1` of type `fail19103.S1` + s1.puts("Hey?"); // It can be compiled and runs! + ^ +fail_compilation/fail19103.d(40): struct `S1` defined here +struct S1 +^ +fail_compilation/fail19103.d(28): Error: no property `puts` for type `S2`, did you mean `core.stdc.stdio.puts`? + s2.puts("OK."); // Error: no property puts for type S2, did you mean core.stdc.stdio.puts(T...)(T args)? + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19181.d b/compiler/test/fail_compilation/fail19181.d index 873e2929efed..50c472926ade 100644 --- a/compiler/test/fail_compilation/fail19181.d +++ b/compiler/test/fail_compilation/fail19181.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19181.d(15): Error: undefined identifier `LanguageError` +fail_compilation/fail19181.d(17): Error: undefined identifier `LanguageError` + s.foo(LanguageError); + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/fail19182.d b/compiler/test/fail_compilation/fail19182.d index 388c4603f04b..b5b56e1fce7f 100644 --- a/compiler/test/fail_compilation/fail19182.d +++ b/compiler/test/fail_compilation/fail19182.d @@ -3,7 +3,9 @@ TEST_OUTPUT: --- gigi -fail_compilation/fail19182.d(12): Error: `pragma(msg)` is missing a terminating `;` +fail_compilation/fail19182.d(14): Error: `pragma(msg)` is missing a terminating `;` + pragma(msg, "gigi") // Here + ^ --- */ diff --git a/compiler/test/fail_compilation/fail192.d b/compiler/test/fail_compilation/fail192.d index 96232a5758b6..ebdec566a2e9 100644 --- a/compiler/test/fail_compilation/fail192.d +++ b/compiler/test/fail_compilation/fail192.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail192.d(15): Error: outer function context of `fail192.foo` is needed to `new` nested class `fail192.foo.DummyClass` -fail_compilation/fail192.d(26): Error: template instance `fail192.X!(DummyClass)` error instantiating +fail_compilation/fail192.d(19): Error: outer function context of `fail192.foo` is needed to `new` nested class `fail192.foo.DummyClass` + auto t = new T; + ^ +fail_compilation/fail192.d(30): Error: template instance `fail192.X!(DummyClass)` error instantiating + X!(DummyClass) x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19202.d b/compiler/test/fail_compilation/fail19202.d index f19bc181f411..7ef47d04dac1 100644 --- a/compiler/test/fail_compilation/fail19202.d +++ b/compiler/test/fail_compilation/fail19202.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19202.d(11): Deprecation: variable `fail19202.X!().X` is deprecated +fail_compilation/fail19202.d(13): Deprecation: variable `fail19202.X!().X` is deprecated + auto b = X!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19209.d b/compiler/test/fail_compilation/fail19209.d index 56b858151501..4a723636cf2e 100644 --- a/compiler/test/fail_compilation/fail19209.d +++ b/compiler/test/fail_compilation/fail19209.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19209.d(16): Error: function `fail19209.Spammer.method()` does not override any function, did you mean to override variable `fail19209.Spam.method`? -fail_compilation/fail19209.d(16): Functions are the only declarations that may be overridden +fail_compilation/fail19209.d(18): Error: function `fail19209.Spammer.method()` does not override any function, did you mean to override variable `fail19209.Spam.method`? + override method() {} + ^ +fail_compilation/fail19209.d(18): Functions are the only declarations that may be overridden --- */ diff --git a/compiler/test/fail_compilation/fail193.d b/compiler/test/fail_compilation/fail193.d index 9fcae5b9cb99..a35cb3e406a8 100644 --- a/compiler/test/fail_compilation/fail193.d +++ b/compiler/test/fail_compilation/fail193.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail193.d(14): Error: cannot infer type from overloaded function symbol `& foo` +fail_compilation/fail193.d(16): Error: cannot infer type from overloaded function symbol `& foo` + auto fp = &foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19319a.d b/compiler/test/fail_compilation/fail19319a.d index f3efe1f94f9c..418bae1f7f4e 100644 --- a/compiler/test/fail_compilation/fail19319a.d +++ b/compiler/test/fail_compilation/fail19319a.d @@ -3,8 +3,12 @@ DFLAGS: REQUIRED_ARGS: -conf= -Ifail_compilation/extra-files/minimal TEST_OUTPUT: --- -fail_compilation/fail19319a.d(16): Error: `7 ^^ g19319` requires `std.math` for `^^` operators -fail_compilation/fail19319a.d(17): Error: `g19319 ^^ 7` requires `std.math` for `^^` operators +fail_compilation/fail19319a.d(20): Error: `7 ^^ g19319` requires `std.math` for `^^` operators +__gshared int e19319 = 7 ^^ g19319; + ^ +fail_compilation/fail19319a.d(21): Error: `g19319 ^^ 7` requires `std.math` for `^^` operators +__gshared int a19319 = g19319 ^^= 7;; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19319b.d b/compiler/test/fail_compilation/fail19319b.d index 933dc16e01a5..c90878c007df 100644 --- a/compiler/test/fail_compilation/fail19319b.d +++ b/compiler/test/fail_compilation/fail19319b.d @@ -3,8 +3,12 @@ DFLAGS: REQUIRED_ARGS: -conf= -Ifail_compilation/extra-files/minimal TEST_OUTPUT: --- -fail_compilation/fail19319b.d(16): Error: `7 ^^ x` requires `std.math` for `^^` operators -fail_compilation/fail19319b.d(17): Error: `x ^^ 7` requires `std.math` for `^^` operators +fail_compilation/fail19319b.d(20): Error: `7 ^^ x` requires `std.math` for `^^` operators + int i = 7 ^^ x; + ^ +fail_compilation/fail19319b.d(21): Error: `x ^^ 7` requires `std.math` for `^^` operators + x ^^= 7; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19336.d b/compiler/test/fail_compilation/fail19336.d index fc15be5784f4..a2b440169eaa 100644 --- a/compiler/test/fail_compilation/fail19336.d +++ b/compiler/test/fail_compilation/fail19336.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19336.d(14): Error: template instance `Template!()` template `Template` is not defined -fail_compilation/fail19336.d(14): Error: circular reference to `fail19336.Foo.a` -fail_compilation/fail19336.d(17): Error: circular reference to `fail19336.b` +fail_compilation/fail19336.d(20): Error: template instance `Template!()` template `Template` is not defined + Template!() a(a.x); + ^ +fail_compilation/fail19336.d(20): Error: circular reference to `fail19336.Foo.a` + Template!() a(a.x); + ^ +fail_compilation/fail19336.d(23): Error: circular reference to `fail19336.b` +int b(b.x); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail194.d b/compiler/test/fail_compilation/fail194.d index f2270f110126..c2b4035c1897 100644 --- a/compiler/test/fail_compilation/fail194.d +++ b/compiler/test/fail_compilation/fail194.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail194.d(18): Error: function `& foo` is overloaded +fail_compilation/fail194.d(20): Error: function `& foo` is overloaded + bar(1, &foo); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19441.d b/compiler/test/fail_compilation/fail19441.d index 36611bbffd67..7e0ebdd3f131 100644 --- a/compiler/test/fail_compilation/fail19441.d +++ b/compiler/test/fail_compilation/fail19441.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19441.d(44): Error: cannot use `alias this` to partially initialize variable `wrap[0]` of type `Wrap10595`. Use `wrap[0].i` +fail_compilation/fail19441.d(46): Error: cannot use `alias this` to partially initialize variable `wrap[0]` of type `Wrap10595`. Use `wrap[0].i` + wrap[0] = 0; // note: using 'alias this' to assign + ^ --- */ diff --git a/compiler/test/fail_compilation/fail195.d b/compiler/test/fail_compilation/fail195.d index 5f067a9e932f..55bd9cd0cf41 100644 --- a/compiler/test/fail_compilation/fail195.d +++ b/compiler/test/fail_compilation/fail195.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail195.d(22): Error: struct `Foo` does not overload () +fail_compilation/fail195.d(24): Error: struct `Foo` does not overload () + next(); // Error: structliteral has no effect in expression (Foo(0)) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19520.d b/compiler/test/fail_compilation/fail19520.d index 305e05554897..4864ca4bedc0 100644 --- a/compiler/test/fail_compilation/fail19520.d +++ b/compiler/test/fail_compilation/fail19520.d @@ -1,12 +1,24 @@ /* https://issues.dlang.org/show_bug.cgi?id=19520 TEST_OUTPUT: --- -fail_compilation/fail19520.d(17): Error: incompatible types for `(Empty) is (Empty)`: cannot use `is` with types -fail_compilation/fail19520.d(17): while evaluating: `static assert((Empty) is (Empty))` -fail_compilation/fail19520.d(18): Error: incompatible types for `(WithSym) is (WithSym)`: cannot use `is` with types -fail_compilation/fail19520.d(18): while evaluating: `static assert((WithSym) is (WithSym))` -fail_compilation/fail19520.d(19): Error: incompatible types for `(Empty) is (Empty)`: cannot use `is` with types -fail_compilation/fail19520.d(20): Error: incompatible types for `(WithSym) is (WithSym)`: cannot use `is` with types +fail_compilation/fail19520.d(29): Error: incompatible types for `(Empty) is (Empty)`: cannot use `is` with types + static assert(Empty is Empty); + ^ +fail_compilation/fail19520.d(29): while evaluating: `static assert((Empty) is (Empty))` + static assert(Empty is Empty); + ^ +fail_compilation/fail19520.d(30): Error: incompatible types for `(WithSym) is (WithSym)`: cannot use `is` with types + static assert(WithSym is WithSym); + ^ +fail_compilation/fail19520.d(30): while evaluating: `static assert((WithSym) is (WithSym))` + static assert(WithSym is WithSym); + ^ +fail_compilation/fail19520.d(31): Error: incompatible types for `(Empty) is (Empty)`: cannot use `is` with types + assert(Empty is Empty); + ^ +fail_compilation/fail19520.d(32): Error: incompatible types for `(WithSym) is (WithSym)`: cannot use `is` with types + assert(WithSym is WithSym); + ^ --- */ struct Empty { } diff --git a/compiler/test/fail_compilation/fail196.d b/compiler/test/fail_compilation/fail196.d index 78c596390b56..e213955221a7 100644 --- a/compiler/test/fail_compilation/fail196.d +++ b/compiler/test/fail_compilation/fail196.d @@ -1,35 +1,85 @@ /* TEST_OUTPUT: --- -fail_compilation/fail196.d(38): Error: delimited string must end in `)"` -fail_compilation/fail196.d(38): Error: implicit string concatenation is error-prone and disallowed in D -fail_compilation/fail196.d(38): Use the explicit syntax instead (concatenating literals is `@nogc`): "foo(xxx)" ~ ";\n assert(s == " -fail_compilation/fail196.d(39): Error: semicolon needed to end declaration of `s`, instead of `foo` -fail_compilation/fail196.d(38): `s` declared here -fail_compilation/fail196.d(39): Error: found `");\n\n s = q"` when expecting `;` following expression -fail_compilation/fail196.d(39): expression: `foo(xxx)` -fail_compilation/fail196.d(41): Error: found `";\n assert(s == "` when expecting `;` following expression -fail_compilation/fail196.d(41): expression: `[foo[xxx]]` -fail_compilation/fail196.d(42): Error: found `");\n\n s = q"` when expecting `;` following expression -fail_compilation/fail196.d(42): expression: `foo[xxx]` -fail_compilation/fail196.d(44): Error: found `{` when expecting `;` following expression -fail_compilation/fail196.d(44): expression: `foo` -fail_compilation/fail196.d(44): Error: found `}` when expecting `;` following expression -fail_compilation/fail196.d(44): expression: `xxx` -fail_compilation/fail196.d(45): Error: found `foo` when expecting `;` following expression -fail_compilation/fail196.d(44): expression: `";\n assert(s == "` -fail_compilation/fail196.d(45): Error: found `}` when expecting `;` following expression -fail_compilation/fail196.d(45): expression: `xxx` -fail_compilation/fail196.d(47): Error: found `<` when expecting `;` following expression -fail_compilation/fail196.d(45): expression: `");\n\n s = q" < foo` -fail_compilation/fail196.d(48): Error: found `foo` when expecting `;` following expression -fail_compilation/fail196.d(47): expression: `xxx >> ";\n assert(s == "` -fail_compilation/fail196.d(48): Error: found `<` instead of statement -fail_compilation/fail196.d(54): Error: unterminated string constant starting at fail_compilation/fail196.d(54) -fail_compilation/fail196.d(56): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/fail196.d(45): unmatched `{` -fail_compilation/fail196.d(56): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/fail196.d(37): unmatched `{` +fail_compilation/fail196.d(88): Error: delimited string must end in `)"` + string s = q"(foo(xxx)) "; + ^ +fail_compilation/fail196.d(88): Error: implicit string concatenation is error-prone and disallowed in D + string s = q"(foo(xxx)) "; + ^ +fail_compilation/fail196.d(88): Use the explicit syntax instead (concatenating literals is `@nogc`): "foo(xxx)" ~ ";\n assert(s == " +fail_compilation/fail196.d(89): Error: semicolon needed to end declaration of `s`, instead of `foo` + assert(s == "foo(xxx)"); + ^ +fail_compilation/fail196.d(88): `s` declared here + string s = q"(foo(xxx)) "; + ^ +fail_compilation/fail196.d(89): Error: found `");\n\n s = q"` when expecting `;` following expression + assert(s == "foo(xxx)"); + ^ +fail_compilation/fail196.d(89): expression: `foo(xxx)` + assert(s == "foo(xxx)"); + ^ +fail_compilation/fail196.d(91): Error: found `";\n assert(s == "` when expecting `;` following expression + s = q"[foo[xxx]]"; + ^ +fail_compilation/fail196.d(91): expression: `[foo[xxx]]` + s = q"[foo[xxx]]"; + ^ +fail_compilation/fail196.d(92): Error: found `");\n\n s = q"` when expecting `;` following expression + assert(s == "foo[xxx]"); + ^ +fail_compilation/fail196.d(92): expression: `foo[xxx]` + assert(s == "foo[xxx]"); + ^ +fail_compilation/fail196.d(94): Error: found `{` when expecting `;` following expression + s = q"{foo{xxx}}"; + ^ +fail_compilation/fail196.d(94): expression: `foo` + s = q"{foo{xxx}}"; + ^ +fail_compilation/fail196.d(94): Error: found `}` when expecting `;` following expression + s = q"{foo{xxx}}"; + ^ +fail_compilation/fail196.d(94): expression: `xxx` + s = q"{foo{xxx}}"; + ^ +fail_compilation/fail196.d(95): Error: found `foo` when expecting `;` following expression + assert(s == "foo{xxx}"); + ^ +fail_compilation/fail196.d(94): expression: `";\n assert(s == "` + s = q"{foo{xxx}}"; + ^ +fail_compilation/fail196.d(95): Error: found `}` when expecting `;` following expression + assert(s == "foo{xxx}"); + ^ +fail_compilation/fail196.d(95): expression: `xxx` + assert(s == "foo{xxx}"); + ^ +fail_compilation/fail196.d(97): Error: found `<` when expecting `;` following expression + s = q">"; + ^ +fail_compilation/fail196.d(95): expression: `");\n\n s = q" < foo` + assert(s == "foo{xxx}"); + ^ +fail_compilation/fail196.d(98): Error: found `foo` when expecting `;` following expression + assert(s == "foo"); + ^ +fail_compilation/fail196.d(97): expression: `xxx >> ";\n assert(s == "` + s = q">"; + ^ +fail_compilation/fail196.d(98): Error: found `<` instead of statement + assert(s == "foo"); + ^ +fail_compilation/fail196.d(104): Error: unterminated string constant starting at fail_compilation/fail196.d(104) + assert(s == "foo]"); + ^ +fail_compilation/fail196.d(106): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/fail196.d(95): unmatched `{` + assert(s == "foo{xxx}"); + ^ +fail_compilation/fail196.d(106): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/fail196.d(87): unmatched `{` --- */ diff --git a/compiler/test/fail_compilation/fail19609.d b/compiler/test/fail_compilation/fail19609.d index d2e146c79eed..5ad532e4c882 100644 --- a/compiler/test/fail_compilation/fail19609.d +++ b/compiler/test/fail_compilation/fail19609.d @@ -4,13 +4,29 @@ EXTRA_FILES: imports/fail19609a.d imports/fail19609b.d imports/fail19609c.d impo TEST_OUTPUT: --- fail_compilation/imports/fail19609a.d(1): Error: `string` expected for deprecation message, not `([""])` of type `string[]` -fail_compilation/fail19609.d(16): Deprecation: module `imports.fail19609a` is deprecated +deprecated([""]) module imports.fail19609a; + ^ +fail_compilation/fail19609.d(32): Deprecation: module `imports.fail19609a` is deprecated +import imports.fail19609a; + ^ fail_compilation/imports/fail19609b.d(1): Error: `string` expected for deprecation message, not `([1])` of type `int[]` -fail_compilation/fail19609.d(17): Deprecation: module `imports.fail19609b` is deprecated +deprecated([1]) module imports.fail19609b; + ^ +fail_compilation/fail19609.d(33): Deprecation: module `imports.fail19609b` is deprecated +import imports.fail19609b; + ^ fail_compilation/imports/fail19609c.d(1): Error: `string` expected for deprecation message, not `(123.4F)` of type `float` -fail_compilation/fail19609.d(18): Deprecation: module `imports.fail19609c` is deprecated +deprecated(123.4f) module imports.fail19609c; + ^ +fail_compilation/fail19609.d(34): Deprecation: module `imports.fail19609c` is deprecated +import imports.fail19609c; + ^ fail_compilation/imports/fail19609d.d(1): Error: undefined identifier `msg` -fail_compilation/fail19609.d(20): Deprecation: module `imports.fail19609d` is deprecated +deprecated(msg) module imports.fail19609d; + ^ +fail_compilation/fail19609.d(36): Deprecation: module `imports.fail19609d` is deprecated +import imports.fail19609d; + ^ --- */ import imports.fail19609a; diff --git a/compiler/test/fail_compilation/fail19687.d b/compiler/test/fail_compilation/fail19687.d index 0076091b8a1c..dcbe0bda565f 100644 --- a/compiler/test/fail_compilation/fail19687.d +++ b/compiler/test/fail_compilation/fail19687.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19687.d(17): Error: no property `nonexisting` for `""` of type `string` +fail_compilation/fail19687.d(19): Error: no property `nonexisting` for `""` of type `string` + n.foo = "".nonexisting(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19729.d b/compiler/test/fail_compilation/fail19729.d index 5943d086872f..979921625fc4 100644 --- a/compiler/test/fail_compilation/fail19729.d +++ b/compiler/test/fail_compilation/fail19729.d @@ -1,14 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19729.d(35): Error: `fail19729.C.__ctor` called with argument types `(string)` matches both: -fail_compilation/fail19729.d(18): `fail19729.C.Templ!string.this(string t)` +fail_compilation/fail19729.d(39): Error: `fail19729.C.__ctor` called with argument types `(string)` matches both: +fail_compilation/fail19729.d(22): `fail19729.C.Templ!string.this(string t)` and: -fail_compilation/fail19729.d(18): `fail19729.C.Templ!string.this(string t)` -fail_compilation/fail19729.d(36): Error: `fail19729.D.__ctor` called with argument types `(string)` matches both: -fail_compilation/fail19729.d(18): `fail19729.D.Templ!(const(char)[]).this(const(char)[] t)` +fail_compilation/fail19729.d(22): `fail19729.C.Templ!string.this(string t)` + new C("conflict"); + ^ +fail_compilation/fail19729.d(40): Error: `fail19729.D.__ctor` called with argument types `(string)` matches both: +fail_compilation/fail19729.d(22): `fail19729.D.Templ!(const(char)[]).this(const(char)[] t)` and: -fail_compilation/fail19729.d(18): `fail19729.D.Templ!(const(char)*).this(const(char)* t)` +fail_compilation/fail19729.d(22): `fail19729.D.Templ!(const(char)*).this(const(char)* t)` + new D("conflict"); + ^ --- */ module fail19729; diff --git a/compiler/test/fail_compilation/fail19744.d b/compiler/test/fail_compilation/fail19744.d index abc4fea2e99b..5625cb18e929 100644 --- a/compiler/test/fail_compilation/fail19744.d +++ b/compiler/test/fail_compilation/fail19744.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19744.d(8): Error: top-level function `test` has no `this` to which `return` can apply +fail_compilation/fail19744.d(10): Error: top-level function `test` has no `this` to which `return` can apply +int* test(return scope int* n) return + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19757_m32.d b/compiler/test/fail_compilation/fail19757_m32.d index 6ddb456d5646..5750ed273fc6 100644 --- a/compiler/test/fail_compilation/fail19757_m32.d +++ b/compiler/test/fail_compilation/fail19757_m32.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19757_m32.d(9): Error: cannot implicitly convert expression `"oops"` of type `string` to `uint` +fail_compilation/fail19757_m32.d(11): Error: cannot implicitly convert expression `"oops"` of type `string` to `uint` +auto s = new string("oops"); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19757_m64.d b/compiler/test/fail_compilation/fail19757_m64.d index e1f9afc34c2c..b0ff2f94f87b 100644 --- a/compiler/test/fail_compilation/fail19757_m64.d +++ b/compiler/test/fail_compilation/fail19757_m64.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19757_m64.d(9): Error: cannot implicitly convert expression `"oops"` of type `string` to `ulong` +fail_compilation/fail19757_m64.d(11): Error: cannot implicitly convert expression `"oops"` of type `string` to `ulong` +auto s = new string("oops"); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19759.d b/compiler/test/fail_compilation/fail19759.d index cdb65ae0c801..d9cb2c67c168 100644 --- a/compiler/test/fail_compilation/fail19759.d +++ b/compiler/test/fail_compilation/fail19759.d @@ -1,8 +1,10 @@ // https://issues.dlang.org/show_bug.cgi?id=19759 /* TEST_OUTPUT: --- -fail_compilation/fail19759.d(8): Error: function `fail19759.fail19759` cannot have parameter of type `float[4]` because its linkage is `extern(C++)` -fail_compilation/fail19759.d(8): perhaps use a `float*` type instead +fail_compilation/fail19759.d(10): Error: function `fail19759.fail19759` cannot have parameter of type `float[4]` because its linkage is `extern(C++)` +extern(C++) bool fail19759(float[4] col); + ^ +fail_compilation/fail19759.d(10): perhaps use a `float*` type instead --- */ extern(C++) bool fail19759(float[4] col); diff --git a/compiler/test/fail_compilation/fail198.d b/compiler/test/fail_compilation/fail198.d index 1a096f4c3865..717f670cdb09 100644 --- a/compiler/test/fail_compilation/fail198.d +++ b/compiler/test/fail_compilation/fail198.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail198.d(8): Error: template instance `test!42` template `test` is not defined +fail_compilation/fail198.d(10): Error: template instance `test!42` template `test` is not defined +int x = test!(42); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19871.d b/compiler/test/fail_compilation/fail19871.d index ad458df20019..18d5e217a300 100644 --- a/compiler/test/fail_compilation/fail19871.d +++ b/compiler/test/fail_compilation/fail19871.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19871.d(10): Error: `struct Struct` may not define both a rvalue constructor and a copy constructor -fail_compilation/fail19871.d(19): rvalue constructor defined here -fail_compilation/fail19871.d(13): copy constructor defined here +fail_compilation/fail19871.d(16): Error: `struct Struct` may not define both a rvalue constructor and a copy constructor +struct Struct +^ +fail_compilation/fail19871.d(25): rvalue constructor defined here + this(Struct) {} + ^ +fail_compilation/fail19871.d(19): copy constructor defined here + this(ref Struct other) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19881.d b/compiler/test/fail_compilation/fail19881.d index 62f3dc431001..81d272e1e5a7 100644 --- a/compiler/test/fail_compilation/fail19881.d +++ b/compiler/test/fail_compilation/fail19881.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/fail19881.d(13): Error: address of local variable `local` assigned to return scope `input` -fail_compilation/fail19881.d(13): Error: address of variable `local` assigned to `input` with longer lifetime +fail_compilation/fail19881.d(17): Error: address of local variable `local` assigned to return scope `input` + input = &local; + ^ +fail_compilation/fail19881.d(17): Error: address of variable `local` assigned to `input` with longer lifetime + input = &local; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19890a.d b/compiler/test/fail_compilation/fail19890a.d index 2e8e4e6ae9cc..78e9d8a84fcd 100644 --- a/compiler/test/fail_compilation/fail19890a.d +++ b/compiler/test/fail_compilation/fail19890a.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -m32 TEST_OUTPUT: --- -fail_compilation/fail19890a.d(8): Error: `void[cast(size_t)4294967295]` size 1 * 4294967295 exceeds 0x7fffffff size limit for static array +fail_compilation/fail19890a.d(10): Error: `void[cast(size_t)4294967295]` size 1 * 4294967295 exceeds 0x7fffffff size limit for static array +void[] f = cast(void[-1]) "a"; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19890b.d b/compiler/test/fail_compilation/fail19890b.d index f9cfb45d533b..f63f81347836 100644 --- a/compiler/test/fail_compilation/fail19890b.d +++ b/compiler/test/fail_compilation/fail19890b.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -m32 TEST_OUTPUT: --- -fail_compilation/fail19890b.d(8): Error: `void[cast(size_t)4294967294]` size 1 * 4294967294 exceeds 0x7fffffff size limit for static array +fail_compilation/fail19890b.d(10): Error: `void[cast(size_t)4294967294]` size 1 * 4294967294 exceeds 0x7fffffff size limit for static array +void[] f = cast(void[-2]) "a"; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19897.d b/compiler/test/fail_compilation/fail19897.d index 49df47067775..5e481f4604d5 100644 --- a/compiler/test/fail_compilation/fail19897.d +++ b/compiler/test/fail_compilation/fail19897.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19897.d(12): Error: cannot implicitly convert expression `a.x` of type `const(char[0])` to `const(char)` +fail_compilation/fail19897.d(14): Error: cannot implicitly convert expression `a.x` of type `const(char[0])` to `const(char)` +const char c = a.x; + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/fail19898a.d b/compiler/test/fail_compilation/fail19898a.d index e23ed04305f0..33090be24247 100644 --- a/compiler/test/fail_compilation/fail19898a.d +++ b/compiler/test/fail_compilation/fail19898a.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/fail19898a.d(10): Error: expression `__key2 < __limit3` of type `__vector(int[4])` does not have a boolean value +fail_compilation/fail19898a.d(12): Error: expression `__key2 < __limit3` of type `__vector(int[4])` does not have a boolean value + foreach (i; 0 .. n) + ^ --- */ void f (__vector(int[4]) n) diff --git a/compiler/test/fail_compilation/fail19898b.d b/compiler/test/fail_compilation/fail19898b.d index 5101da5617b9..6dbef574d8d2 100644 --- a/compiler/test/fail_compilation/fail19898b.d +++ b/compiler/test/fail_compilation/fail19898b.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/fail19898b.d(17): Error: cannot implicitly convert expression `m` of type `S` to `__vector(int[4])` -fail_compilation/fail19898b.d(17): Error: expression `__key2 != __limit3` of type `__vector(int[4])` does not have a boolean value -fail_compilation/fail19898b.d(17): Error: cannot cast expression `__key2` of type `__vector(int[4])` to `S` +fail_compilation/fail19898b.d(23): Error: cannot implicitly convert expression `m` of type `S` to `__vector(int[4])` + foreach (i; m .. n) + ^ +fail_compilation/fail19898b.d(23): Error: expression `__key2 != __limit3` of type `__vector(int[4])` does not have a boolean value + foreach (i; m .. n) + ^ +fail_compilation/fail19898b.d(23): Error: cannot cast expression `__key2` of type `__vector(int[4])` to `S` + foreach (i; m .. n) + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/fail199.d b/compiler/test/fail_compilation/fail199.d index 9cb14b801c90..7d552e55f0cc 100644 --- a/compiler/test/fail_compilation/fail199.d +++ b/compiler/test/fail_compilation/fail199.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail199.d(20): Deprecation: class `fail199.DepClass` is deprecated -fail_compilation/fail199.d(20): Deprecation: class `fail199.DepClass` is deprecated +fail_compilation/fail199.d(24): Deprecation: class `fail199.DepClass` is deprecated +class Derived : DepClass {} +^ +fail_compilation/fail199.d(24): Deprecation: class `fail199.DepClass` is deprecated +class Derived : DepClass {} +^ --- */ diff --git a/compiler/test/fail_compilation/fail19911a.d b/compiler/test/fail_compilation/fail19911a.d index 672db305223a..41b30c4d2380 100644 --- a/compiler/test/fail_compilation/fail19911a.d +++ b/compiler/test/fail_compilation/fail19911a.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -betterC TEST_OUTPUT: --- -fail_compilation/fail19911a.d(9): Error: function `fail19911a.fun` D-style variadic functions cannot be used with -betterC +fail_compilation/fail19911a.d(11): Error: function `fail19911a.fun` D-style variadic functions cannot be used with -betterC +void fun(...) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19911b.d b/compiler/test/fail_compilation/fail19911b.d index 9f2dbbb81abc..963dca53e5bc 100644 --- a/compiler/test/fail_compilation/fail19911b.d +++ b/compiler/test/fail_compilation/fail19911b.d @@ -3,7 +3,9 @@ DFLAGS: EXTRA_SOURCES: extra-files/minimal/object.d TEST_OUTPUT: --- -fail_compilation/fail19911b.d(10): Error: function `fail19911b.fun` `object.TypeInfo_Tuple` could not be found, but is implicitly used in D-style variadic functions +fail_compilation/fail19911b.d(12): Error: function `fail19911b.fun` `object.TypeInfo_Tuple` could not be found, but is implicitly used in D-style variadic functions +void fun(...) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19911c.d b/compiler/test/fail_compilation/fail19911c.d index c1c654942c63..4cd879782096 100644 --- a/compiler/test/fail_compilation/fail19911c.d +++ b/compiler/test/fail_compilation/fail19911c.d @@ -2,7 +2,9 @@ DFLAGS: TEST_OUTPUT: --- -fail_compilation/fail19911c.d(14): Error: function `object.fun` `object.TypeInfo` could not be found, but is implicitly used in D-style variadic functions +fail_compilation/fail19911c.d(16): Error: function `object.fun` `object.TypeInfo` could not be found, but is implicitly used in D-style variadic functions +void fun(...) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19912a.d b/compiler/test/fail_compilation/fail19912a.d index 31a508a49540..ac819d2b1729 100644 --- a/compiler/test/fail_compilation/fail19912a.d +++ b/compiler/test/fail_compilation/fail19912a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19912a.d(7): Error: struct `fail19912a.object` conflicts with import `fail19912a.object` at fail_compilation/fail19912a.d +fail_compilation/fail19912a.d(9): Error: struct `fail19912a.object` conflicts with import `fail19912a.object` at fail_compilation/fail19912a.d +struct object { } +^ --- */ struct object { } diff --git a/compiler/test/fail_compilation/fail19912b.d b/compiler/test/fail_compilation/fail19912b.d index 1e5281400320..5ae5fa2991f4 100644 --- a/compiler/test/fail_compilation/fail19912b.d +++ b/compiler/test/fail_compilation/fail19912b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19912b.d(7): Error: class `fail19912b.object` conflicts with import `fail19912b.object` at fail_compilation/fail19912b.d +fail_compilation/fail19912b.d(9): Error: class `fail19912b.object` conflicts with import `fail19912b.object` at fail_compilation/fail19912b.d +class object { } +^ --- */ class object { } diff --git a/compiler/test/fail_compilation/fail19912c.d b/compiler/test/fail_compilation/fail19912c.d index 38d7a5aba1ec..69578cac1b27 100644 --- a/compiler/test/fail_compilation/fail19912c.d +++ b/compiler/test/fail_compilation/fail19912c.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19912c.d(7): Error: alias `fail19912c.object` conflicts with import `fail19912c.object` at fail_compilation/fail19912c.d +fail_compilation/fail19912c.d(9): Error: alias `fail19912c.object` conflicts with import `fail19912c.object` at fail_compilation/fail19912c.d +alias object = int; +^ --- */ alias object = int; diff --git a/compiler/test/fail_compilation/fail19912d.d b/compiler/test/fail_compilation/fail19912d.d index c0fe48998106..76eaeaa85faa 100644 --- a/compiler/test/fail_compilation/fail19912d.d +++ b/compiler/test/fail_compilation/fail19912d.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19912d.d(7): Error: enum `fail19912d.object` conflicts with import `fail19912d.object` at fail_compilation/fail19912d.d +fail_compilation/fail19912d.d(9): Error: enum `fail19912d.object` conflicts with import `fail19912d.object` at fail_compilation/fail19912d.d +enum object { } +^ --- */ enum object { } diff --git a/compiler/test/fail_compilation/fail19912e.d b/compiler/test/fail_compilation/fail19912e.d index 0aa343319dd9..0b40ea838bbb 100644 --- a/compiler/test/fail_compilation/fail19912e.d +++ b/compiler/test/fail_compilation/fail19912e.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19912e.d(7): Error: function `fail19912e.object` conflicts with import `fail19912e.object` at fail_compilation/fail19912e.d +fail_compilation/fail19912e.d(9): Error: function `fail19912e.object` conflicts with import `fail19912e.object` at fail_compilation/fail19912e.d +void object() { } + ^ --- */ void object() { } diff --git a/compiler/test/fail_compilation/fail19913.d b/compiler/test/fail_compilation/fail19913.d index c880923ae407..669f824dff83 100644 --- a/compiler/test/fail_compilation/fail19913.d +++ b/compiler/test/fail_compilation/fail19913.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19913.d(11): Error: no property `b` for `a` of type `int` -fail_compilation/fail19913.d(11): Error: mixin `fail19913.S.b!()` is not defined +fail_compilation/fail19913.d(15): Error: no property `b` for `a` of type `int` + mixin a.b; + ^ +fail_compilation/fail19913.d(15): Error: mixin `fail19913.S.b!()` is not defined + mixin a.b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19914.d b/compiler/test/fail_compilation/fail19914.d index 2fd3da755408..15d93aca02f0 100644 --- a/compiler/test/fail_compilation/fail19914.d +++ b/compiler/test/fail_compilation/fail19914.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19914.d(8): Error: undefined identifier `c` in module `fail19914` -fail_compilation/fail19914.d(9): Error: mixin `fail19914.a!string` error instantiating +fail_compilation/fail19914.d(12): Error: undefined identifier `c` in module `fail19914` +class a(b) { align.c d; } + ^ +fail_compilation/fail19914.d(13): Error: mixin `fail19914.a!string` error instantiating +mixin a!(string); +^ --- */ class a(b) { align.c d; } diff --git a/compiler/test/fail_compilation/fail19915.d b/compiler/test/fail_compilation/fail19915.d index e12fe0f08ccd..b7fa29f779d0 100644 --- a/compiler/test/fail_compilation/fail19915.d +++ b/compiler/test/fail_compilation/fail19915.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19915.d(8): Error: undefined identifier `c` in module `fail19915` -fail_compilation/fail19915.d(9): Error: template instance `fail19915.a!int` error instantiating +fail_compilation/fail19915.d(12): Error: undefined identifier `c` in module `fail19915` +class a (b) { align.c d; } + ^ +fail_compilation/fail19915.d(13): Error: template instance `fail19915.a!int` error instantiating +alias a!(int) e; + ^ --- */ class a (b) { align.c d; } diff --git a/compiler/test/fail_compilation/fail19917.d b/compiler/test/fail_compilation/fail19917.d index c6ad83b89a76..b441adf507fe 100644 --- a/compiler/test/fail_compilation/fail19917.d +++ b/compiler/test/fail_compilation/fail19917.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19917.d(22): Error: overlapping default initialization for field `c` and `a` -fail_compilation/fail19917.d(22): Error: overlapping default initialization for field `d` and `b` -fail_compilation/fail19917.d(39): Error: overlapping default initialization for field `b` and `a` +fail_compilation/fail19917.d(28): Error: overlapping default initialization for field `c` and `a` +struct X +^ +fail_compilation/fail19917.d(28): Error: overlapping default initialization for field `d` and `b` +struct X +^ +fail_compilation/fail19917.d(45): Error: overlapping default initialization for field `b` and `a` +struct Y +^ --- */ diff --git a/compiler/test/fail_compilation/fail19919.d b/compiler/test/fail_compilation/fail19919.d index 3c65cbf2f405..ffdb6d0cbeb9 100644 --- a/compiler/test/fail_compilation/fail19919.d +++ b/compiler/test/fail_compilation/fail19919.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19919.d(16): Error: union field `f` with default initialization `3.14F` must be before field `n` -fail_compilation/fail19919.d(23): Error: union field `f` with default initialization `3.14F` must be before field `n` +fail_compilation/fail19919.d(20): Error: union field `f` with default initialization `3.14F` must be before field `n` + float f = 3.14f; + ^ +fail_compilation/fail19919.d(27): Error: union field `f` with default initialization `3.14F` must be before field `n` + float f = 3.14f; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19922.d b/compiler/test/fail_compilation/fail19922.d index a7309fecc718..9d02dd9b0807 100644 --- a/compiler/test/fail_compilation/fail19922.d +++ b/compiler/test/fail_compilation/fail19922.d @@ -2,7 +2,9 @@ DFLAGS: TEST_OUTPUT: --- -fail_compilation/fail19922.d(16): Error: `object.TypeInfo_Class` could not be found, but is implicitly used +fail_compilation/fail19922.d(18): Error: `object.TypeInfo_Class` could not be found, but is implicitly used + auto ti = typeid(o); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19923.d b/compiler/test/fail_compilation/fail19923.d index e118d3d61e39..459f6b083a77 100644 --- a/compiler/test/fail_compilation/fail19923.d +++ b/compiler/test/fail_compilation/fail19923.d @@ -2,7 +2,9 @@ DFLAGS: TEST_OUTPUT: --- -fail_compilation/fail19923.d(16): Error: `object.TypeInfo_Class` could not be found, but is implicitly used +fail_compilation/fail19923.d(18): Error: `object.TypeInfo_Class` could not be found, but is implicitly used + auto ti = o.classinfo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19931.d b/compiler/test/fail_compilation/fail19931.d index 940a1faee028..00d763b528a7 100644 --- a/compiler/test/fail_compilation/fail19931.d +++ b/compiler/test/fail_compilation/fail19931.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19931.d(10): Error: `struct S` may not define both a rvalue constructor and a copy constructor -fail_compilation/fail19931.d(12): rvalue constructor defined here -fail_compilation/fail19931.d(13): copy constructor defined here +fail_compilation/fail19931.d(16): Error: `struct S` may not define both a rvalue constructor and a copy constructor +struct S +^ +fail_compilation/fail19931.d(18): rvalue constructor defined here + this(S s) {} + ^ +fail_compilation/fail19931.d(19): copy constructor defined here + this(ref S s) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail19948.d b/compiler/test/fail_compilation/fail19948.d index 09737e5b25f4..3a49825f7e24 100644 --- a/compiler/test/fail_compilation/fail19948.d +++ b/compiler/test/fail_compilation/fail19948.d @@ -3,9 +3,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19948.d(16): Error: function `func` is not callable using argument types `(X)` -fail_compilation/fail19948.d(16): cannot pass argument `X()` of type `fail19948.main.X` to parameter `const(fail19948.X)` -fail_compilation/fail19948.d(19): `fail19948.func(const(X))` declared here +fail_compilation/fail19948.d(20): Error: function `func` is not callable using argument types `(X)` + func(X()); + ^ +fail_compilation/fail19948.d(20): cannot pass argument `X()` of type `fail19948.main.X` to parameter `const(fail19948.X)` +fail_compilation/fail19948.d(23): `fail19948.func(const(X))` declared here +void func(const(X)) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail1995.d b/compiler/test/fail_compilation/fail1995.d index 7dfddec32641..75ff5edc3af5 100644 --- a/compiler/test/fail_compilation/fail1995.d +++ b/compiler/test/fail_compilation/fail1995.d @@ -2,11 +2,13 @@ REQUIRED_ARGS: -Jdoes_not_exists -Jfail_compilation/fail1995.d -Jfail_compilation/ TEST_OUTPUT: --- -fail_compilation/fail1995.d(12): Error: file `"SomeFile.txt"` cannot be found or not in a path specified with `-J` -fail_compilation/fail1995.d(12): Path(s) searched (as provided by `-J`): -fail_compilation/fail1995.d(12): [0]: `does_not_exists` (path not found) -fail_compilation/fail1995.d(12): [1]: `fail_compilation/fail1995.d` (not a directory) -fail_compilation/fail1995.d(12): [2]: `fail_compilation/` +fail_compilation/fail1995.d(14): Error: file `"SomeFile.txt"` cannot be found or not in a path specified with `-J` +immutable string Var = import("SomeFile.txt"); + ^ +fail_compilation/fail1995.d(14): Path(s) searched (as provided by `-J`): +fail_compilation/fail1995.d(14): [0]: `does_not_exists` (path not found) +fail_compilation/fail1995.d(14): [1]: `fail_compilation/fail1995.d` (not a directory) +fail_compilation/fail1995.d(14): [2]: `fail_compilation/` --- */ immutable string Var = import("SomeFile.txt"); diff --git a/compiler/test/fail_compilation/fail19955.d b/compiler/test/fail_compilation/fail19955.d index e2af71f2d91a..06a88619eeb0 100644 --- a/compiler/test/fail_compilation/fail19955.d +++ b/compiler/test/fail_compilation/fail19955.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail19955.d(7): Error: `switch` statement without a `default`; use `final switch` or add `default: assert(0);` or add `default: break;` +fail_compilation/fail19955.d(9): Error: `switch` statement without a `default`; use `final switch` or add `default: assert(0);` or add `default: break;` +void f() { switch(1) static assert(1); } + ^ --- */ void f() { switch(1) static assert(1); } diff --git a/compiler/test/fail_compilation/fail19965.d b/compiler/test/fail_compilation/fail19965.d index b76a3a08c091..084bc7a9f891 100644 --- a/compiler/test/fail_compilation/fail19965.d +++ b/compiler/test/fail_compilation/fail19965.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fail19965.d(36): Error: address of variable `f` assigned to `a` with longer lifetime +fail_compilation/fail19965.d(38): Error: address of variable `f` assigned to `a` with longer lifetime + a = f.toArray; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail20.d b/compiler/test/fail_compilation/fail20.d index 4528d365da87..7ddef1a89f63 100644 --- a/compiler/test/fail_compilation/fail20.d +++ b/compiler/test/fail_compilation/fail20.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20.d(16): Error: need member function `opCmp()` for struct `FOO` to compare +fail_compilation/fail20.d(18): Error: need member function `opCmp()` for struct `FOO` to compare + if (one < two){} // This should tell me that there + ^ --- */ diff --git a/compiler/test/fail_compilation/fail200.d b/compiler/test/fail_compilation/fail200.d index 9d804a916b38..354a8ad52d01 100644 --- a/compiler/test/fail_compilation/fail200.d +++ b/compiler/test/fail_compilation/fail200.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail200.d(17): Deprecation: interface `fail200.DepClass` is deprecated -fail_compilation/fail200.d(17): Deprecation: interface `fail200.DepClass` is deprecated +fail_compilation/fail200.d(21): Deprecation: interface `fail200.DepClass` is deprecated +class Derived : DepClass +^ +fail_compilation/fail200.d(21): Deprecation: interface `fail200.DepClass` is deprecated +class Derived : DepClass +^ --- */ diff --git a/compiler/test/fail_compilation/fail20000.d b/compiler/test/fail_compilation/fail20000.d index a049dacb2e6d..3ca55a762877 100644 --- a/compiler/test/fail_compilation/fail20000.d +++ b/compiler/test/fail_compilation/fail20000.d @@ -1,30 +1,54 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20000.d(37): Error: cast from `fail20000.DClass` to `fail20000.CppClass` not allowed in safe code -fail_compilation/fail20000.d(37): Source object type is incompatible with target type -fail_compilation/fail20000.d(38): Error: cast from `fail20000.DInterface` to `fail20000.CppClass` not allowed in safe code -fail_compilation/fail20000.d(38): Source object type is incompatible with target type -fail_compilation/fail20000.d(39): Error: cast from `fail20000.CppClass2` to `fail20000.CppClass` not allowed in safe code -fail_compilation/fail20000.d(39): Source object type is incompatible with target type -fail_compilation/fail20000.d(40): Error: cast from `fail20000.CppInterface2` to `fail20000.CppClass` not allowed in safe code -fail_compilation/fail20000.d(40): Source object type is incompatible with target type -fail_compilation/fail20000.d(42): Error: cast from `fail20000.DClass` to `fail20000.CppInterface` not allowed in safe code -fail_compilation/fail20000.d(42): Source object type is incompatible with target type -fail_compilation/fail20000.d(43): Error: cast from `fail20000.DInterface` to `fail20000.CppInterface` not allowed in safe code -fail_compilation/fail20000.d(43): Source object type is incompatible with target type -fail_compilation/fail20000.d(44): Error: cast from `fail20000.CppClass2` to `fail20000.CppInterface` not allowed in safe code -fail_compilation/fail20000.d(44): Source object type is incompatible with target type -fail_compilation/fail20000.d(45): Error: cast from `fail20000.CppInterface2` to `fail20000.CppInterface` not allowed in safe code -fail_compilation/fail20000.d(45): Source object type is incompatible with target type -fail_compilation/fail20000.d(47): Error: cast from `fail20000.CppClass` to `fail20000.DClass` not allowed in safe code -fail_compilation/fail20000.d(47): Source object type is incompatible with target type -fail_compilation/fail20000.d(48): Error: cast from `fail20000.CppInterface` to `fail20000.DClass` not allowed in safe code -fail_compilation/fail20000.d(48): Source object type is incompatible with target type -fail_compilation/fail20000.d(50): Error: cast from `fail20000.CppClass` to `fail20000.DInterface` not allowed in safe code -fail_compilation/fail20000.d(50): Source object type is incompatible with target type -fail_compilation/fail20000.d(51): Error: cast from `fail20000.CppInterface` to `fail20000.DInterface` not allowed in safe code -fail_compilation/fail20000.d(51): Source object type is incompatible with target type +fail_compilation/fail20000.d(61): Error: cast from `fail20000.DClass` to `fail20000.CppClass` not allowed in safe code +bool isCppClass(DClass a) @safe { return cast(CppClass) a !is null; } + ^ +fail_compilation/fail20000.d(61): Source object type is incompatible with target type +fail_compilation/fail20000.d(62): Error: cast from `fail20000.DInterface` to `fail20000.CppClass` not allowed in safe code +bool isCppClass(DInterface a) @safe { return cast(CppClass) a !is null; } + ^ +fail_compilation/fail20000.d(62): Source object type is incompatible with target type +fail_compilation/fail20000.d(63): Error: cast from `fail20000.CppClass2` to `fail20000.CppClass` not allowed in safe code +bool isCppClass(CppClass2 a) @safe { return cast(CppClass) a !is null; } + ^ +fail_compilation/fail20000.d(63): Source object type is incompatible with target type +fail_compilation/fail20000.d(64): Error: cast from `fail20000.CppInterface2` to `fail20000.CppClass` not allowed in safe code +bool isCppClass(CppInterface2 a) @safe { return cast(CppClass) a !is null; } + ^ +fail_compilation/fail20000.d(64): Source object type is incompatible with target type +fail_compilation/fail20000.d(66): Error: cast from `fail20000.DClass` to `fail20000.CppInterface` not allowed in safe code +bool isCppInterface(DClass a) @safe { return cast(CppInterface) a !is null; } + ^ +fail_compilation/fail20000.d(66): Source object type is incompatible with target type +fail_compilation/fail20000.d(67): Error: cast from `fail20000.DInterface` to `fail20000.CppInterface` not allowed in safe code +bool isCppInterface(DInterface a) @safe { return cast(CppInterface) a !is null; } + ^ +fail_compilation/fail20000.d(67): Source object type is incompatible with target type +fail_compilation/fail20000.d(68): Error: cast from `fail20000.CppClass2` to `fail20000.CppInterface` not allowed in safe code +bool isCppInterface(CppClass2 a) @safe { return cast(CppInterface) a !is null; } + ^ +fail_compilation/fail20000.d(68): Source object type is incompatible with target type +fail_compilation/fail20000.d(69): Error: cast from `fail20000.CppInterface2` to `fail20000.CppInterface` not allowed in safe code +bool isCppInterface(CppInterface2 a) @safe { return cast(CppInterface) a !is null; } + ^ +fail_compilation/fail20000.d(69): Source object type is incompatible with target type +fail_compilation/fail20000.d(71): Error: cast from `fail20000.CppClass` to `fail20000.DClass` not allowed in safe code +bool isDClass(CppClass a) @safe { return cast(DClass) a !is null; } + ^ +fail_compilation/fail20000.d(71): Source object type is incompatible with target type +fail_compilation/fail20000.d(72): Error: cast from `fail20000.CppInterface` to `fail20000.DClass` not allowed in safe code +bool isDClass(CppInterface a) @safe { return cast(DClass) a !is null; } + ^ +fail_compilation/fail20000.d(72): Source object type is incompatible with target type +fail_compilation/fail20000.d(74): Error: cast from `fail20000.CppClass` to `fail20000.DInterface` not allowed in safe code +bool isDInterface(CppClass a) @safe { return cast(DInterface) a !is null; } + ^ +fail_compilation/fail20000.d(74): Source object type is incompatible with target type +fail_compilation/fail20000.d(75): Error: cast from `fail20000.CppInterface` to `fail20000.DInterface` not allowed in safe code +bool isDInterface(CppInterface a) @safe { return cast(DInterface) a !is null; } + ^ +fail_compilation/fail20000.d(75): Source object type is incompatible with target type --- */ extern(C++) class CppClass { int a; } diff --git a/compiler/test/fail_compilation/fail20033.d b/compiler/test/fail_compilation/fail20033.d index f641469c3dcd..aff50ad6d229 100644 --- a/compiler/test/fail_compilation/fail20033.d +++ b/compiler/test/fail_compilation/fail20033.d @@ -4,7 +4,11 @@ TEST_OUTPUT: --- fail_compilation/fail20033.d(38): Deprecation: `alias byKeyValue this` is deprecated - This was a bad idea fail_compilation/fail20033.d(39): Deprecation: `alias byKeyValue this` is deprecated + bool empty () { return false; } + ^ fail_compilation/fail20033.d(41): Deprecation: `alias byKeyValue this` is deprecated - This was a bad idea + void popFront() {} + ^ fail_compilation/fail20033.d(42): Deprecation: `alias byKeyValue this` is deprecated --- */ diff --git a/compiler/test/fail_compilation/fail20040.d b/compiler/test/fail_compilation/fail20040.d index 67bdd3174310..b9836ba0a88e 100644 --- a/compiler/test/fail_compilation/fail20040.d +++ b/compiler/test/fail_compilation/fail20040.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: --- -fail_compilation/fail20040.d(13): Error: no property `joiner` for type `string[]`, perhaps `import std.algorithm;` is needed? -fail_compilation/fail20040.d(14): Error: no property `split` for type `string[]`, perhaps `import std.array;` is needed? -fail_compilation/fail20040.d(15): Error: no property `startsWith` for type `string[]`, perhaps `import std.algorithm;` is needed? +fail_compilation/fail20040.d(19): Error: no property `joiner` for type `string[]`, perhaps `import std.algorithm;` is needed? + x.joiner(); + ^ +fail_compilation/fail20040.d(20): Error: no property `split` for type `string[]`, perhaps `import std.array;` is needed? + x.split(); + ^ +fail_compilation/fail20040.d(21): Error: no property `startsWith` for type `string[]`, perhaps `import std.algorithm;` is needed? + x.startsWith; + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail20073.d b/compiler/test/fail_compilation/fail20073.d index 01a9ede4622c..c13c3959125c 100644 --- a/compiler/test/fail_compilation/fail20073.d +++ b/compiler/test/fail_compilation/fail20073.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20073.d(20): Error: cannot implicitly convert expression `s` of type `S` to `string` -fail_compilation/fail20073.d(21): Error: cannot implicitly convert expression `s` of type `S` to `string` +fail_compilation/fail20073.d(24): Error: cannot implicitly convert expression `s` of type `S` to `string` + string str = s; // cannot implicitly convert expression `s` of type `S` to `string` + ^ +fail_compilation/fail20073.d(25): Error: cannot implicitly convert expression `s` of type `S` to `string` + return s; // and suddenly we can! + ^ --- */ diff --git a/compiler/test/fail_compilation/fail201.d b/compiler/test/fail_compilation/fail201.d index 6e51706adde8..16cd7cc9d7f7 100644 --- a/compiler/test/fail_compilation/fail201.d +++ b/compiler/test/fail_compilation/fail201.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail201.d(10): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail201.d(10): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail201.d(14): Error: shift by 33 is outside the range `0..31` + c = c >>> 33; + ^ +fail_compilation/fail201.d(14): Error: shift by 33 is outside the range `0..31` + c = c >>> 33; + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/fail20108.d b/compiler/test/fail_compilation/fail20108.d index 15845e1d2fcc..80fbfcca37dd 100644 --- a/compiler/test/fail_compilation/fail20108.d +++ b/compiler/test/fail_compilation/fail20108.d @@ -2,10 +2,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20108.d(15): Error: address of variable `y` assigned to `x` with longer lifetime -fail_compilation/fail20108.d(16): Error: scope parameter `x` may not be returned fail_compilation/fail20108.d(23): Error: address of variable `y` assigned to `x` with longer lifetime -fail_compilation/fail20108.d(24): Error: scope variable `x` may not be returned + x = &y; //bad + ^ +fail_compilation/fail20108.d(24): Error: scope parameter `x` may not be returned + return x; + ^ +fail_compilation/fail20108.d(31): Error: address of variable `y` assigned to `x` with longer lifetime + x = &y; //bad + ^ +fail_compilation/fail20108.d(32): Error: scope variable `x` may not be returned + return x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail20164.d b/compiler/test/fail_compilation/fail20164.d index c70947c7f1e2..575623a233fe 100644 --- a/compiler/test/fail_compilation/fail20164.d +++ b/compiler/test/fail_compilation/fail20164.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20164.d(13): Deprecation: module `imports.fail20164` is deprecated +fail_compilation/fail20164.d(15): Deprecation: module `imports.fail20164` is deprecated + import imports.fail20164; + ^ --- */ module fail20164; diff --git a/compiler/test/fail_compilation/fail202.d b/compiler/test/fail_compilation/fail202.d index ebd806052366..0e28668eed7e 100644 --- a/compiler/test/fail_compilation/fail202.d +++ b/compiler/test/fail_compilation/fail202.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail202.d(10): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail202.d(10): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail202.d(14): Error: shift by 33 is outside the range `0..31` + c = c >> 33; + ^ +fail_compilation/fail202.d(14): Error: shift by 33 is outside the range `0..31` + c = c >> 33; + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/fail203.d b/compiler/test/fail_compilation/fail203.d index ecbe5952992a..db56759449c3 100644 --- a/compiler/test/fail_compilation/fail203.d +++ b/compiler/test/fail_compilation/fail203.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail203.d(10): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail203.d(10): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail203.d(14): Error: shift by 33 is outside the range `0..31` + c = c << 33; + ^ +fail_compilation/fail203.d(14): Error: shift by 33 is outside the range `0..31` + c = c << 33; + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/fail20376.d b/compiler/test/fail_compilation/fail20376.d index 8410af535e2f..fcd658fb8232 100644 --- a/compiler/test/fail_compilation/fail20376.d +++ b/compiler/test/fail_compilation/fail20376.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20376.d(17): Error: cannot implicitly convert expression `Foo()` of type `Foo` to `ubyte` +fail_compilation/fail20376.d(19): Error: cannot implicitly convert expression `Foo()` of type `Foo` to `ubyte` + return Foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail204.d b/compiler/test/fail_compilation/fail204.d index 79a8206cfd05..c6541368efb2 100644 --- a/compiler/test/fail_compilation/fail204.d +++ b/compiler/test/fail_compilation/fail204.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail204.d(9): Error: shift assign by 65 is outside the range `0..63` +fail_compilation/fail204.d(11): Error: shift assign by 65 is outside the range `0..63` + c >>= 65; + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/fail20448.d b/compiler/test/fail_compilation/fail20448.d index 916ee8bbc077..51dee66a5242 100644 --- a/compiler/test/fail_compilation/fail20448.d +++ b/compiler/test/fail_compilation/fail20448.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20448.d(16): Error: returning `p.x` escapes a reference to parameter `p` -fail_compilation/fail20448.d(22): Error: template instance `fail20448.member!"x"` error instantiating +fail_compilation/fail20448.d(20): Error: returning `p.x` escapes a reference to parameter `p` + return p.x; + ^ +fail_compilation/fail20448.d(26): Error: template instance `fail20448.member!"x"` error instantiating + p.member!"x" = 2; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail205.d b/compiler/test/fail_compilation/fail205.d index 2e8a6262fa27..3b71906a1687 100644 --- a/compiler/test/fail_compilation/fail205.d +++ b/compiler/test/fail_compilation/fail205.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail205.d(9): Error: shift assign by 65 is outside the range `0..63` +fail_compilation/fail205.d(11): Error: shift assign by 65 is outside the range `0..63` + c <<= 65; + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/fail20538.d b/compiler/test/fail_compilation/fail20538.d index e07af6cf1657..b446c3aea7b7 100644 --- a/compiler/test/fail_compilation/fail20538.d +++ b/compiler/test/fail_compilation/fail20538.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20538.d(13): Error: found `=` when expecting `identifier` -fail_compilation/fail20538.d(13): Error: found `1` when expecting `identifier` -fail_compilation/fail20538.d(14): Error: named enum cannot declare member with type +fail_compilation/fail20538.d(19): Error: found `=` when expecting `identifier` + = 1, + ^ +fail_compilation/fail20538.d(19): Error: found `1` when expecting `identifier` + = 1, + ^ +fail_compilation/fail20538.d(20): Error: named enum cannot declare member with type + int x = 1, + ^ --- */ diff --git a/compiler/test/fail_compilation/fail20551.d b/compiler/test/fail_compilation/fail20551.d index 633be0a596d2..6e573344d398 100644 --- a/compiler/test/fail_compilation/fail20551.d +++ b/compiler/test/fail_compilation/fail20551.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20551.d(15): Error: cannot take address of lazy parameter `e` in `@safe` function `opAssign` -fail_compilation/fail20551.d(26): Error: template instance `fail20551.LazyStore!int.LazyStore.opAssign!int` error instantiating +fail_compilation/fail20551.d(19): Error: cannot take address of lazy parameter `e` in `@safe` function `opAssign` + dg = cast(typeof(dg)) &e; + ^ +fail_compilation/fail20551.d(30): Error: template instance `fail20551.LazyStore!int.LazyStore.opAssign!int` error instantiating + f = x + x + 20 + x * 20; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail206.d b/compiler/test/fail_compilation/fail206.d index 88c90cb7ee01..e33de7a88098 100644 --- a/compiler/test/fail_compilation/fail206.d +++ b/compiler/test/fail_compilation/fail206.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail206.d(9): Error: shift assign by 65 is outside the range `0..63` +fail_compilation/fail206.d(11): Error: shift assign by 65 is outside the range `0..63` + c >>>= 65; + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/fail20609.d b/compiler/test/fail_compilation/fail20609.d index 80a5d4615741..62f50f7602ed 100644 --- a/compiler/test/fail_compilation/fail20609.d +++ b/compiler/test/fail_compilation/fail20609.d @@ -1,16 +1,34 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20609.d(26): Error: none of the overloads of `this` are callable using argument types `(int)` -fail_compilation/fail20609.d(23): Candidate is: `fail20609.Foo.this(string[] args)` -fail_compilation/fail20609.d(27): Error: none of the overloads of `this` are callable using argument types `(int)` -fail_compilation/fail20609.d(22): Candidates are: `fail20609.Foo.this(Object __param_0)` -fail_compilation/fail20609.d(23): `fail20609.Foo.this(string[] args)` -fail_compilation/fail20609.d(37): Error: none of the overloads of `this` are callable using argument types `(int)` -fail_compilation/fail20609.d(37): All possible candidates are marked as `deprecated` or `@disable` -fail_compilation/fail20609.d(43): Error: undefined identifier `deprecatedTypo_` -fail_compilation/fail20609.d(44): Error: undefined identifier `deprecatedTypo_`, did you mean function `deprecatedTypo`? -fail_compilation/fail20609.d(45): Error: undefined identifier `disabledTypo_` +fail_compilation/fail20609.d(44): Error: none of the overloads of `this` are callable using argument types `(int)` +void test1() { auto f = Foo(42); } + ^ +fail_compilation/fail20609.d(41): Candidate is: `fail20609.Foo.this(string[] args)` + this(string[] args) {} + ^ +fail_compilation/fail20609.d(45): Error: none of the overloads of `this` are callable using argument types `(int)` +deprecated void test2() { auto f = Foo(42); } + ^ +fail_compilation/fail20609.d(40): Candidates are: `fail20609.Foo.this(Object __param_0)` + deprecated this(Object) {} + ^ +fail_compilation/fail20609.d(41): `fail20609.Foo.this(string[] args)` + this(string[] args) {} + ^ +fail_compilation/fail20609.d(55): Error: none of the overloads of `this` are callable using argument types `(int)` +void test3() { auto f = WhoDoesThat(42); } + ^ +fail_compilation/fail20609.d(55): All possible candidates are marked as `deprecated` or `@disable` +fail_compilation/fail20609.d(61): Error: undefined identifier `deprecatedTypo_` +void test4 () { deprecatedTypo_("42"); } + ^ +fail_compilation/fail20609.d(62): Error: undefined identifier `deprecatedTypo_`, did you mean function `deprecatedTypo`? +deprecated void test5 () { deprecatedTypo_("42"); } + ^ +fail_compilation/fail20609.d(63): Error: undefined identifier `disabledTypo_` +void test6 () { disabledTypo_("42"); } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail20616.d b/compiler/test/fail_compilation/fail20616.d index 0f76e315ac74..a132e6502225 100644 --- a/compiler/test/fail_compilation/fail20616.d +++ b/compiler/test/fail_compilation/fail20616.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20616.d(16): Error: undefined identifier `$` -fail_compilation/fail20616.d(16): Aggregate declaration 'X()' does not define 'opDollar' -fail_compilation/fail20616.d(18): Error: undefined identifier `$` -fail_compilation/fail20616.d(18): Aggregate declaration 'b' does not define 'opDollar' +fail_compilation/fail20616.d(24): Error: undefined identifier `$` + auto x = X()[0 .. $]; + ^ +fail_compilation/fail20616.d(24): Aggregate declaration 'X()' does not define 'opDollar' + auto x = X()[0 .. $]; + ^ +fail_compilation/fail20616.d(26): Error: undefined identifier `$` + auto c = b[0 .. $ - 1]; + ^ +fail_compilation/fail20616.d(26): Aggregate declaration 'b' does not define 'opDollar' + auto c = b[0 .. $ - 1]; + ^ --- */ module fail20616; diff --git a/compiler/test/fail_compilation/fail20637.d b/compiler/test/fail_compilation/fail20637.d index dd0a5f52b87b..15970dd828b1 100644 --- a/compiler/test/fail_compilation/fail20637.d +++ b/compiler/test/fail_compilation/fail20637.d @@ -2,8 +2,12 @@ EXTRA_FILES: imports/fail20637b.d TEST_OUTPUT: --- -fail_compilation/fail20637.d(13): Error: no property `foo` for type `imports.fail20637b.A` +fail_compilation/fail20637.d(17): Error: no property `foo` for type `imports.fail20637b.A` +void main() { A.foo; } + ^ fail_compilation/imports/fail20637b.d(3): class `A` defined here +class A { private static void foo() { } } +^ --- */ module fail20637; diff --git a/compiler/test/fail_compilation/fail20638.d b/compiler/test/fail_compilation/fail20638.d index 9954d37c2331..3a88aefd463e 100644 --- a/compiler/test/fail_compilation/fail20638.d +++ b/compiler/test/fail_compilation/fail20638.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/fail20638b.d TEST_OUTPUT: --- -fail_compilation/fail20638.d(13): Error: undefined identifier `foo` in module `imports.fail20638b` +fail_compilation/fail20638.d(15): Error: undefined identifier `foo` in module `imports.fail20638b` + imports.fail20638b.foo; + ^ --- */ module fail20638; diff --git a/compiler/test/fail_compilation/fail20658.d b/compiler/test/fail_compilation/fail20658.d index fd422aaa1684..cd2f3455cf02 100644 --- a/compiler/test/fail_compilation/fail20658.d +++ b/compiler/test/fail_compilation/fail20658.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20658.d(14): Error: field `U.m` cannot modify fields in `@safe` code that overlap fields with other storage classes +fail_compilation/fail20658.d(16): Error: field `U.m` cannot modify fields in `@safe` code that overlap fields with other storage classes +enum e = () @safe { u.m = 13; }; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail207.d b/compiler/test/fail_compilation/fail207.d index 2fec197c04bf..f25ad151dcd9 100644 --- a/compiler/test/fail_compilation/fail207.d +++ b/compiler/test/fail_compilation/fail207.d @@ -1,9 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail207.d(11): Error: found end of file instead of initializer -fail_compilation/fail207.d(11): Error: semicolon needed to end declaration of `x`, instead of `End of File` -fail_compilation/fail207.d(10): `x` declared here +fail_compilation/fail207.d(13): Error: found end of file instead of initializer +fail_compilation/fail207.d(13): Error: semicolon needed to end declaration of `x`, instead of `End of File` +fail_compilation/fail207.d(12): `x` declared here +int x = { + ^ --- */ diff --git a/compiler/test/fail_compilation/fail20714.d b/compiler/test/fail_compilation/fail20714.d index 6bf6b07853e3..8ce49ced7b23 100644 --- a/compiler/test/fail_compilation/fail20714.d +++ b/compiler/test/fail_compilation/fail20714.d @@ -3,9 +3,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20714.d(19): Deprecation: `struct Adder` implicitly-generated postblit hides copy constructor. -fail_compilation/fail20714.d(19): The field postblit will have priority over the copy constructor. -fail_compilation/fail20714.d(19): To change this, the postblit should be disabled for `struct Adder` +fail_compilation/fail20714.d(21): Deprecation: `struct Adder` implicitly-generated postblit hides copy constructor. +struct Adder +^ +fail_compilation/fail20714.d(21): The field postblit will have priority over the copy constructor. +fail_compilation/fail20714.d(21): To change this, the postblit should be disabled for `struct Adder` --- */ diff --git a/compiler/test/fail_compilation/fail20730a.d b/compiler/test/fail_compilation/fail20730a.d index dcf8960c62c2..46a24255f274 100644 --- a/compiler/test/fail_compilation/fail20730a.d +++ b/compiler/test/fail_compilation/fail20730a.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: --- -fail_compilation/fail20730a.d(11): Error: undefined identifier `undef20730` +fail_compilation/fail20730a.d(13): Error: undefined identifier `undef20730` + undef20730(); + ^ --- */ void test20730() diff --git a/compiler/test/fail_compilation/fail20730b.d b/compiler/test/fail_compilation/fail20730b.d index ccab5ad46c27..d7848184bf55 100644 --- a/compiler/test/fail_compilation/fail20730b.d +++ b/compiler/test/fail_compilation/fail20730b.d @@ -2,14 +2,18 @@ REQUIRED_ARGS: -verrors=spec -o- TEST_OUTPUT: --- -(spec:1) fail_compilation/fail20730b.d-mixin-43(43): Error: C style cast illegal, use `cast(int)mod` -fail_compilation/fail20730b.d(26): Error: template `atomicOp` is not callable using argument types `!("+=")(shared(uint), int)` -fail_compilation/fail20730b.d(41): Candidate is: `atomicOp(string op, T, V1)(ref shared T val, V1 mod)` +(spec:1) fail_compilation/fail20730b.d-mixin-47(47): Error: C style cast illegal, use `cast(int)mod` +fail_compilation/fail20730b.d(30): Error: template `atomicOp` is not callable using argument types `!("+=")(shared(uint), int)` + atomicOp!"+="(refs, 1); + ^ +fail_compilation/fail20730b.d(45): Candidate is: `atomicOp(string op, T, V1)(ref shared T val, V1 mod)` with `op = "+=", T = uint, V1 = int` must satisfy the following constraint: ` __traits(compiles, mixin("(int)mod"))` +T atomicOp(string op, T, V1)(ref shared T val, V1 mod) + ^ --- */ void test20730() diff --git a/compiler/test/fail_compilation/fail20771.d b/compiler/test/fail_compilation/fail20771.d index 18e1c87980da..534d66fd2166 100644 --- a/compiler/test/fail_compilation/fail20771.d +++ b/compiler/test/fail_compilation/fail20771.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20771.d(19): Error: cannot pass types with postblits or copy constructors as variadic arguments -fail_compilation/fail20771.d(20): Error: cannot pass types with postblits or copy constructors as variadic arguments +fail_compilation/fail20771.d(23): Error: cannot pass types with postblits or copy constructors as variadic arguments + variadic(v, + ^ +fail_compilation/fail20771.d(24): Error: cannot pass types with postblits or copy constructors as variadic arguments + S20771(1)); + ^ --- */ extern void variadic(...); diff --git a/compiler/test/fail_compilation/fail20772.d b/compiler/test/fail_compilation/fail20772.d index a2fdac687987..534832564148 100644 --- a/compiler/test/fail_compilation/fail20772.d +++ b/compiler/test/fail_compilation/fail20772.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20772.d(20): Error: cannot pass types with postblits or copy constructors as variadic arguments -fail_compilation/fail20772.d(21): Error: cannot pass types with postblits or copy constructors as variadic arguments +fail_compilation/fail20772.d(24): Error: cannot pass types with postblits or copy constructors as variadic arguments + variadic(v, + ^ +fail_compilation/fail20772.d(25): Error: cannot pass types with postblits or copy constructors as variadic arguments + S20772(1)); + ^ --- */ extern void variadic(...); diff --git a/compiler/test/fail_compilation/fail20775.d b/compiler/test/fail_compilation/fail20775.d index 3e050960a186..8f8fc5be5179 100644 --- a/compiler/test/fail_compilation/fail20775.d +++ b/compiler/test/fail_compilation/fail20775.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20775.d(19): Error: cannot pass types that need destruction as variadic arguments -fail_compilation/fail20775.d(20): Error: cannot pass types that need destruction as variadic arguments +fail_compilation/fail20775.d(23): Error: cannot pass types that need destruction as variadic arguments + variadic(v, + ^ +fail_compilation/fail20775.d(24): Error: cannot pass types that need destruction as variadic arguments + S20775(1)); + ^ --- */ extern void variadic(...); diff --git a/compiler/test/fail_compilation/fail20779.d b/compiler/test/fail_compilation/fail20779.d index 945803d53f14..98cdb5385903 100644 --- a/compiler/test/fail_compilation/fail20779.d +++ b/compiler/test/fail_compilation/fail20779.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20779.d(12): Error: struct `fail20779.X` cannot have field `x` with same struct type +fail_compilation/fail20779.d(14): Error: struct `fail20779.X` cannot have field `x` with same struct type +struct X +^ --- */ diff --git a/compiler/test/fail_compilation/fail208.d b/compiler/test/fail_compilation/fail208.d index f81774b2869d..79ea449660e2 100644 --- a/compiler/test/fail_compilation/fail208.d +++ b/compiler/test/fail_compilation/fail208.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail208.d(18): Error: `return` expression expected -fail_compilation/fail208.d(21): called from here: `MakeA()` +fail_compilation/fail208.d(22): Error: `return` expression expected + return ; + ^ +fail_compilation/fail208.d(25): called from here: `MakeA()` +static const A aInstance = MakeA(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail20800.d b/compiler/test/fail_compilation/fail20800.d index 4464222f2371..fea7c08b357d 100644 --- a/compiler/test/fail_compilation/fail20800.d +++ b/compiler/test/fail_compilation/fail20800.d @@ -3,9 +3,13 @@ /* TEST_OUTPUT: ---- -fail_compilation/fail20800.d(23): Error: function `fun` is not callable using argument types `(string)` -fail_compilation/fail20800.d(23): cannot pass argument `(m()).index()` of type `string` to parameter `int a` -fail_compilation/fail20800.d(19): `fail20800.fun(int a)` declared here +fail_compilation/fail20800.d(27): Error: function `fun` is not callable using argument types `(string)` + fun(m.index); + ^ +fail_compilation/fail20800.d(27): cannot pass argument `(m()).index()` of type `string` to parameter `int a` +fail_compilation/fail20800.d(23): `fail20800.fun(int a)` declared here +void fun(int a); + ^ ---- */ diff --git a/compiler/test/fail_compilation/fail209.d b/compiler/test/fail_compilation/fail209.d index 689fd7bc542e..ec87d1b22548 100644 --- a/compiler/test/fail_compilation/fail209.d +++ b/compiler/test/fail_compilation/fail209.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail209.d(20): Error: incompatible types for `(a) -= (x)`: `float` and `fail209.X` +fail_compilation/fail209.d(22): Error: incompatible types for `(a) -= (x)`: `float` and `fail209.X` + a -= x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail20965.d b/compiler/test/fail_compilation/fail20965.d index 192b84e86199..c0ce029fae12 100644 --- a/compiler/test/fail_compilation/fail20965.d +++ b/compiler/test/fail_compilation/fail20965.d @@ -3,9 +3,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail20965.d(17): Deprecation: `struct S` implicitly-generated postblit hides copy constructor. -fail_compilation/fail20965.d(17): The field postblit will have priority over the copy constructor. -fail_compilation/fail20965.d(17): To change this, the postblit should be disabled for `struct S` +fail_compilation/fail20965.d(19): Deprecation: `struct S` implicitly-generated postblit hides copy constructor. +struct S +^ +fail_compilation/fail20965.d(19): The field postblit will have priority over the copy constructor. +fail_compilation/fail20965.d(19): To change this, the postblit should be disabled for `struct S` --- */ diff --git a/compiler/test/fail_compilation/fail21001.d b/compiler/test/fail_compilation/fail21001.d index 0faeb4038ef8..dcf67e0d95d5 100644 --- a/compiler/test/fail_compilation/fail21001.d +++ b/compiler/test/fail_compilation/fail21001.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail21001.d(12): Error: undefined identifier `Alias` +fail_compilation/fail21001.d(14): Error: undefined identifier `Alias` +void main() { Alias var; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21092.d b/compiler/test/fail_compilation/fail21092.d index d12b387a5871..afbc19eb1365 100644 --- a/compiler/test/fail_compilation/fail21092.d +++ b/compiler/test/fail_compilation/fail21092.d @@ -3,12 +3,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail21092.d(19): Error: using the result of a comma expression is not allowed -fail_compilation/fail21092.d(19): Error: using `*` on an array is no longer supported; use `*(T , U).ptr` instead -fail_compilation/fail21092.d(19): Error: `*(T , cast(real*)U)` has no effect -fail_compilation/fail21092.d(26): Error: using the result of a comma expression is not allowed -fail_compilation/fail21092.d(26): Error: using `*` on an array is no longer supported; use `*(w , SmallStirlingCoeffs).ptr` instead -fail_compilation/fail21092.d(26): Error: `*(w , cast(real*)SmallStirlingCoeffs)` has no effect +fail_compilation/fail21092.d(31): Error: using the result of a comma expression is not allowed + *(T, U); + ^ +fail_compilation/fail21092.d(31): Error: using `*` on an array is no longer supported; use `*(T , U).ptr` instead + *(T, U); + ^ +fail_compilation/fail21092.d(31): Error: `*(T , cast(real*)U)` has no effect + *(T, U); + ^ +fail_compilation/fail21092.d(38): Error: using the result of a comma expression is not allowed + *(w, SmallStirlingCoeffs); + ^ +fail_compilation/fail21092.d(38): Error: using `*` on an array is no longer supported; use `*(w , SmallStirlingCoeffs).ptr` instead + *(w, SmallStirlingCoeffs); + ^ +fail_compilation/fail21092.d(38): Error: `*(w , cast(real*)SmallStirlingCoeffs)` has no effect + *(w, SmallStirlingCoeffs); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail212.d b/compiler/test/fail_compilation/fail212.d index 780cd8279e51..0d01cd1ff177 100644 --- a/compiler/test/fail_compilation/fail212.d +++ b/compiler/test/fail_compilation/fail212.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail212.d(10): Error: function `fail212.baz` without `this` cannot be `const` -fail_compilation/fail212.d(10): did you mean to use `const(int)` as the return type? -fail_compilation/fail212.d(18): Error: function `fail212.S.bar` without `this` cannot be `const` +fail_compilation/fail212.d(14): Error: function `fail212.baz` without `this` cannot be `const` +const int baz(); + ^ +fail_compilation/fail212.d(14): did you mean to use `const(int)` as the return type? +fail_compilation/fail212.d(22): Error: function `fail212.S.bar` without `this` cannot be `const` + static void bar() const + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21206.d b/compiler/test/fail_compilation/fail21206.d index b3b42f342962..89b7d79f0b74 100644 --- a/compiler/test/fail_compilation/fail21206.d +++ b/compiler/test/fail_compilation/fail21206.d @@ -1,8 +1,10 @@ // https://issues.dlang.org/show_bug.cgi?id=21206 /* TEST_OUTPUT: --- -fail_compilation/fail21206.d(10): Error: function `fail21206.Obj.toString` cannot return type `string` because its linkage is `extern(C++)` -fail_compilation/fail21206.d(10): slices are specific to D and do not have a counterpart representation in C++ +fail_compilation/fail21206.d(12): Error: function `fail21206.Obj.toString` cannot return type `string` because its linkage is `extern(C++)` + string toString() + ^ +fail_compilation/fail21206.d(12): slices are specific to D and do not have a counterpart representation in C++ --- */ extern(C++) struct Obj diff --git a/compiler/test/fail_compilation/fail21214.d b/compiler/test/fail_compilation/fail21214.d index 6e8c4faaa425..ee5ac8189d3e 100644 --- a/compiler/test/fail_compilation/fail21214.d +++ b/compiler/test/fail_compilation/fail21214.d @@ -2,10 +2,18 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/fail21214.d(12): Error: 8 byte vector type `__vector(int[2])` is not supported on this platform -fail_compilation/fail21214.d(13): Error: 8 byte vector type `__vector(int[2])` is not supported on this platform -fail_compilation/fail21214.d(14): Error: vector type `__vector(__vector(int[4])[2])` is not supported on this platform -fail_compilation/fail21214.d(15): Error: vector type `__vector(__vector(int[4])[4])` is not supported on this platform +fail_compilation/fail21214.d(20): Error: 8 byte vector type `__vector(int[2])` is not supported on this platform +__vector(__vector(int[2])[2]) v2x2; + ^ +fail_compilation/fail21214.d(21): Error: 8 byte vector type `__vector(int[2])` is not supported on this platform +__vector(__vector(int[2])[4]) v2x4; + ^ +fail_compilation/fail21214.d(22): Error: vector type `__vector(__vector(int[4])[2])` is not supported on this platform +__vector(__vector(int[4])[2]) v4x2; + ^ +fail_compilation/fail21214.d(23): Error: vector type `__vector(__vector(int[4])[4])` is not supported on this platform +__vector(__vector(int[4])[4]) v4x4; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21227_posix.d b/compiler/test/fail_compilation/fail21227_posix.d index c8be6943647c..757b7045560f 100644 --- a/compiler/test/fail_compilation/fail21227_posix.d +++ b/compiler/test/fail_compilation/fail21227_posix.d @@ -4,11 +4,18 @@ DISABLED: win TEST_OUTPUT: --- fail_compilation/fail21227_posix.d(2): Error: absolute path is not allowed in import expression: `"/abs/path/to/file.txt"` +REQUIRED_ARGS: -Jfail_compilation + ^ fail_compilation/fail21227_posix.d(3): Error: path refers to parent (`..`) directory: `"../file.txt"` +DISABLED: win + ^ fail_compilation/fail21227_posix.d(4): Error: path refers to parent (`..`) directory: `"path/to/parent/../file.txt"` +TEST_OUTPUT: + ^ fail_compilation/fail21227_posix.d(5): Error: file `"do_not_exist"` cannot be found or not in a path specified with `-J` fail_compilation/fail21227_posix.d(5): Path(s) searched (as provided by `-J`): fail_compilation/fail21227_posix.d(5): [0]: `fail_compilation` +fail_compilation/fail21227_posix.d(5): [1]: `fail_compilation` --- */ #line 1 diff --git a/compiler/test/fail_compilation/fail21243.d b/compiler/test/fail_compilation/fail21243.d index 0b4117d5bc63..c915b1a92ae3 100644 --- a/compiler/test/fail_compilation/fail21243.d +++ b/compiler/test/fail_compilation/fail21243.d @@ -1,12 +1,26 @@ /+ TEST_OUTPUT: --- -fail_compilation/fail21243.d(12): Error: found `(` when expecting `ref` and function literal following `auto` -fail_compilation/fail21243.d(12): Error: semicolon expected following auto declaration, not `int` -fail_compilation/fail21243.d(12): Error: semicolon needed to end declaration of `x` instead of `)` -fail_compilation/fail21243.d(12): Error: declaration expected, not `)` -fail_compilation/fail21243.d(13): Error: `auto` can only be used as part of `auto ref` for function literal return values -fail_compilation/fail21243.d(14): Error: `auto` can only be used as part of `auto ref` for function literal return values -fail_compilation/fail21243.d(15): Error: `auto` can only be used as part of `auto ref` for function literal return values +fail_compilation/fail21243.d(26): Error: found `(` when expecting `ref` and function literal following `auto` +auto a = auto (int x) => x; + ^ +fail_compilation/fail21243.d(26): Error: semicolon expected following auto declaration, not `int` +auto a = auto (int x) => x; + ^ +fail_compilation/fail21243.d(26): Error: semicolon needed to end declaration of `x` instead of `)` +auto a = auto (int x) => x; + ^ +fail_compilation/fail21243.d(26): Error: declaration expected, not `)` +auto a = auto (int x) => x; + ^ +fail_compilation/fail21243.d(27): Error: `auto` can only be used as part of `auto ref` for function literal return values +auto b = function auto (int x) { return x; }; + ^ +fail_compilation/fail21243.d(28): Error: `auto` can only be used as part of `auto ref` for function literal return values +alias c = auto (int x) => x; + ^ +fail_compilation/fail21243.d(29): Error: `auto` can only be used as part of `auto ref` for function literal return values +alias d = function auto (int x) { return x; }; + ^ --- +/ auto a = auto (int x) => x; diff --git a/compiler/test/fail_compilation/fail21275.d b/compiler/test/fail_compilation/fail21275.d index b7bbcfa62500..fc94b01a945e 100644 --- a/compiler/test/fail_compilation/fail21275.d +++ b/compiler/test/fail_compilation/fail21275.d @@ -4,8 +4,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail21275.d(17): Error: function `imports.fail21275a.Foo.x` of type `ref int() return` is not accessible from module `fail21275` -fail_compilation/fail21275.d(20): Error: function `imports.fail21275a.Bar.x` of type `int(int)` is not accessible from module `fail21275` +fail_compilation/fail21275.d(21): Error: function `imports.fail21275a.Foo.x` of type `ref int() return` is not accessible from module `fail21275` + f.x = 3; + ^ +fail_compilation/fail21275.d(24): Error: function `imports.fail21275a.Bar.x` of type `int(int)` is not accessible from module `fail21275` + b.x = 3; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail213.d b/compiler/test/fail_compilation/fail213.d index fee91ec9b3eb..e1fce92ec8b4 100644 --- a/compiler/test/fail_compilation/fail213.d +++ b/compiler/test/fail_compilation/fail213.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail213.d(18): Error: template instance `Foo!int` does not match template declaration `Foo(T : immutable(T))` -fail_compilation/fail213.d(25): Error: template instance `Foo!(const(int))` does not match template declaration `Foo(T : immutable(T))` +fail_compilation/fail213.d(22): Error: template instance `Foo!int` does not match template declaration `Foo(T : immutable(T))` + alias Foo!(typeof(x)) f; + ^ +fail_compilation/fail213.d(29): Error: template instance `Foo!(const(int))` does not match template declaration `Foo(T : immutable(T))` + alias Foo!(typeof(x)) f; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21314.d b/compiler/test/fail_compilation/fail21314.d index 78e52ce22811..cc1adb6368ce 100644 --- a/compiler/test/fail_compilation/fail21314.d +++ b/compiler/test/fail_compilation/fail21314.d @@ -1,8 +1,10 @@ // https://issues.dlang.org/show_bug.cgi?id=21314 /* TEST_OUTPUT: --- -fail_compilation/fail21314.d(10): Error: variable `fail21314.C21314.c21314` cannot have `extern(C++)` linkage because it is `static` -fail_compilation/fail21314.d(10): perhaps declare it as `__gshared` instead +fail_compilation/fail21314.d(12): Error: variable `fail21314.C21314.c21314` cannot have `extern(C++)` linkage because it is `static` + static C21314[] c21314; + ^ +fail_compilation/fail21314.d(12): perhaps declare it as `__gshared` instead --- */ extern(C++) class C21314 diff --git a/compiler/test/fail_compilation/fail215.d b/compiler/test/fail_compilation/fail215.d index 292f07156ade..fe2b819230d5 100644 --- a/compiler/test/fail_compilation/fail215.d +++ b/compiler/test/fail_compilation/fail215.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail215.d(10): Error: function `fail215.b.k` cannot be both `final` and `abstract` +fail_compilation/fail215.d(12): Error: function `fail215.b.k` cannot be both `final` and `abstract` + final abstract void k(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21508.d b/compiler/test/fail_compilation/fail21508.d index da5d8f98f915..bce6e7a332f2 100644 --- a/compiler/test/fail_compilation/fail21508.d +++ b/compiler/test/fail_compilation/fail21508.d @@ -3,7 +3,9 @@ REQUIRED_ARGS: -Ifail_compilation/imports/ EXTRA_FILES: imports/import21508.d TEST_OUTPUT: --- -fail_compilation/fail21508.d(17): Error: import `fail21508.import21508` is used as a type +fail_compilation/fail21508.d(19): Error: import `fail21508.import21508` is used as a type + auto c = new import21508(); + ^ --- */ import import21508; diff --git a/compiler/test/fail_compilation/fail21508_2.d b/compiler/test/fail_compilation/fail21508_2.d index af986b7b26cf..8ecff9961e06 100644 --- a/compiler/test/fail_compilation/fail21508_2.d +++ b/compiler/test/fail_compilation/fail21508_2.d @@ -3,7 +3,9 @@ REQUIRED_ARGS: -Ifail_compilation/imports/ EXTRA_FILES: imports/import21508.d TEST_OUTPUT: --- -fail_compilation/fail21508_2.d(11): Error: import `fail21508_2.import21508` is used as a type +fail_compilation/fail21508_2.d(13): Error: import `fail21508_2.import21508` is used as a type +class Other : import21508 { } +^ --- */ import import21508; diff --git a/compiler/test/fail_compilation/fail21547.d b/compiler/test/fail_compilation/fail21547.d index 7a6a44a4a133..9619105f96b9 100644 --- a/compiler/test/fail_compilation/fail21547.d +++ b/compiler/test/fail_compilation/fail21547.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail21547.d(32): Error: struct `Bar` has constructors, cannot use `{ initializers }`, use `Bar( initializers )` instead -fail_compilation/fail21547.d(33): Error: struct `Bar1` has constructors, cannot use `{ initializers }`, use `Bar1( initializers )` instead +fail_compilation/fail21547.d(36): Error: struct `Bar` has constructors, cannot use `{ initializers }`, use `Bar( initializers )` instead + Bar b = { a: "Hello", b: 42 }; + ^ +fail_compilation/fail21547.d(37): Error: struct `Bar1` has constructors, cannot use `{ initializers }`, use `Bar1( initializers )` instead + Bar1 b1 = { a: "Hello", b: 42 }; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail216.d b/compiler/test/fail_compilation/fail216.d index eb736e64b94e..cccf9522ffde 100644 --- a/compiler/test/fail_compilation/fail216.d +++ b/compiler/test/fail_compilation/fail216.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail216.d(16): Error: expression `foo()` is `void` and has no value -fail_compilation/fail216.d(14): Error: function `fail216.bar` has no `return` statement, but is expected to return a value of type `int` -fail_compilation/fail216.d(19): called from here: `bar()` +fail_compilation/fail216.d(22): Error: expression `foo()` is `void` and has no value + int x = foo(); + ^ +fail_compilation/fail216.d(20): Error: function `fail216.bar` has no `return` statement, but is expected to return a value of type `int` +int bar() + ^ +fail_compilation/fail216.d(25): called from here: `bar()` +const y = bar(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail217.d b/compiler/test/fail_compilation/fail217.d index ecae1a38e6df..22bf11969b1d 100644 --- a/compiler/test/fail_compilation/fail217.d +++ b/compiler/test/fail_compilation/fail217.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail217.d(22): Error: mutable constructor `fail217.Message.this` cannot construct a `immutable` object -fail_compilation/fail217.d(13): Consider adding `const` or `inout` here +fail_compilation/fail217.d(26): Error: mutable constructor `fail217.Message.this` cannot construct a `immutable` object + auto m2 = new immutable(Message)(2); + ^ +fail_compilation/fail217.d(17): Consider adding `const` or `inout` here + this( int notifier_object ) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail218.d b/compiler/test/fail_compilation/fail218.d index a46861133067..0e9af3da858a 100644 --- a/compiler/test/fail_compilation/fail218.d +++ b/compiler/test/fail_compilation/fail218.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail218.d(15): Error: cannot modify string literal `", "` +fail_compilation/fail218.d(17): Error: cannot modify string literal `", "` + a ~= ", " ~= b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21830.d b/compiler/test/fail_compilation/fail21830.d index 2e0f84b7777c..a1648fcf4ea8 100644 --- a/compiler/test/fail_compilation/fail21830.d +++ b/compiler/test/fail_compilation/fail21830.d @@ -2,8 +2,14 @@ TEST_OUTPUT: --- fail_compilation/fail21830.d(24): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type + if (is(T == NewS21830)) + ^ fail_compilation/fail21830.d(24): Deprecation: template `fail21830.test21830(T)(T t) if (is(T == OldS21830))` is deprecated - Deprecated template + if (is(T == NewS21830)) + ^ fail_compilation/fail21830.d(24): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type + if (is(T == NewS21830)) + ^ --- */ #line 1 diff --git a/compiler/test/fail_compilation/fail21831.d b/compiler/test/fail_compilation/fail21831.d index 39551332e934..3eebbff58cf9 100644 --- a/compiler/test/fail_compilation/fail21831.d +++ b/compiler/test/fail_compilation/fail21831.d @@ -1,12 +1,18 @@ /* REQUIRED_ARGS: -de -unittest TEST_OUTPUT: --- -fail_compilation/fail21831.d(19): Deprecation: struct `fail21831.S21831` is deprecated - Deprecated type -fail_compilation/fail21831.d(19): Deprecation: template `fail21831.test21831(T)(T t) if (__traits(isDeprecated, T))` is deprecated - Deprecated template -fail_compilation/fail21831.d(19): Deprecation: struct `fail21831.S21831` is deprecated - Deprecated type +fail_compilation/fail21831.d(34): Deprecation: struct `fail21831.S21831` is deprecated - Deprecated type + auto b = test21831(S21831()); + ^ +fail_compilation/fail21831.d(34): Deprecation: template `fail21831.test21831(T)(T t) if (__traits(isDeprecated, T))` is deprecated - Deprecated template + auto b = test21831(S21831()); + ^ +fail_compilation/fail21831.d(34): Deprecation: struct `fail21831.S21831` is deprecated - Deprecated type + auto b = test21831(S21831()); + ^ --- */ -#line 1 +// Line 1 starts here deprecated("Deprecated type") struct S21831 { } diff --git a/compiler/test/fail_compilation/fail21868b.d b/compiler/test/fail_compilation/fail21868b.d index 0df31d7de3f3..f6ef8bfc32cd 100644 --- a/compiler/test/fail_compilation/fail21868b.d +++ b/compiler/test/fail_compilation/fail21868b.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fail21868b.d(19): Error: returning `&s.x` escapes a reference to parameter `s` -fail_compilation/fail21868b.d(17): perhaps change the `return scope` into `scope return` +fail_compilation/fail21868b.d(23): Error: returning `&s.x` escapes a reference to parameter `s` + return &s.x; + ^ +fail_compilation/fail21868b.d(21): perhaps change the `return scope` into `scope return` +int* test(ref return scope S s) @safe + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21885.d b/compiler/test/fail_compilation/fail21885.d index 4052efd2dfd6..10d29a795c99 100644 --- a/compiler/test/fail_compilation/fail21885.d +++ b/compiler/test/fail_compilation/fail21885.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail21885.d(24): Error: struct `fail21885.Outer` is not copyable because field `i` is not copyable +fail_compilation/fail21885.d(26): Error: struct `fail21885.Outer` is not copyable because field `i` is not copyable + o1 = o2; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21928.d b/compiler/test/fail_compilation/fail21928.d index c9fac133ddb2..98c209409b79 100644 --- a/compiler/test/fail_compilation/fail21928.d +++ b/compiler/test/fail_compilation/fail21928.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail21928.d(18): Error: array literal in `@nogc` function `D main` may cause a GC allocation +fail_compilation/fail21928.d(20): Error: array literal in `@nogc` function `D main` may cause a GC allocation + auto s = Shape(2 ~ Shape.init.dims); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail21928b.d b/compiler/test/fail_compilation/fail21928b.d index 3ce93e0a097b..b50b91ded491 100644 --- a/compiler/test/fail_compilation/fail21928b.d +++ b/compiler/test/fail_compilation/fail21928b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail21928b.d(18): Error: array literal in `@nogc` function `D main` may cause a GC allocation +fail_compilation/fail21928b.d(20): Error: array literal in `@nogc` function `D main` may cause a GC allocation + auto s = Shape(Shape.init.dims ~ 2); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail2195.d b/compiler/test/fail_compilation/fail2195.d index 6f6cd53b0e39..9587c02ec0f3 100644 --- a/compiler/test/fail_compilation/fail2195.d +++ b/compiler/test/fail_compilation/fail2195.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2195.d(17): Deprecation: variable `variable` is shadowing variable `fail2195.main.variable` -fail_compilation/fail2195.d(14): declared here +fail_compilation/fail2195.d(21): Deprecation: variable `variable` is shadowing variable `fail2195.main.variable` + int variable; // shadowing is disallowed but not detected + ^ +fail_compilation/fail2195.d(18): declared here + int variable; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22.d b/compiler/test/fail_compilation/fail22.d index 1de2a13044af..bbe621e423ef 100644 --- a/compiler/test/fail_compilation/fail22.d +++ b/compiler/test/fail_compilation/fail22.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22.d(13): Error: no identifier for declarator `char` +fail_compilation/fail22.d(15): Error: no identifier for declarator `char` + foreach(char ; bug) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail220.d b/compiler/test/fail_compilation/fail220.d index d3905d7fece6..ec54a6c98313 100644 --- a/compiler/test/fail_compilation/fail220.d +++ b/compiler/test/fail_compilation/fail220.d @@ -1,11 +1,19 @@ /* TEST_OUTPUT: --- -fail_compilation/fail220.d(12): Error: identifier expected for template value parameter -fail_compilation/fail220.d(12): Error: found `==` when expecting `)` -fail_compilation/fail220.d(12): Error: found `class` when expecting `)` -fail_compilation/fail220.d(12): Error: declaration expected, not `)` -fail_compilation/fail220.d(16): Error: unmatched closing brace +fail_compilation/fail220.d(20): Error: identifier expected for template value parameter + static if (is (T V : V[K], K == class)) { + ^ +fail_compilation/fail220.d(20): Error: found `==` when expecting `)` + static if (is (T V : V[K], K == class)) { + ^ +fail_compilation/fail220.d(20): Error: found `class` when expecting `)` + static if (is (T V : V[K], K == class)) { + ^ +fail_compilation/fail220.d(20): Error: declaration expected, not `)` + static if (is (T V : V[K], K == class)) { + ^ +fail_compilation/fail220.d(24): Error: unmatched closing brace --- */ template types (T) { diff --git a/compiler/test/fail_compilation/fail22035.d b/compiler/test/fail_compilation/fail22035.d index 2e67b4dbea94..35a0bd35d37b 100644 --- a/compiler/test/fail_compilation/fail22035.d +++ b/compiler/test/fail_compilation/fail22035.d @@ -1,8 +1,10 @@ // https://issues.dlang.org/show_bug.cgi?id=22035 /* TEST_OUTPUT: --- -fail_compilation/fail22035.d(10): Error: found `2` when expecting `:` -fail_compilation/fail22035.d(10): Error: found `:` instead of statement +fail_compilation/fail22035.d(12): Error: found `2` when expecting `:` + case 1 2: + ^ +fail_compilation/fail22035.d(12): Error: found `:` instead of statement --- */ int test22035() diff --git a/compiler/test/fail_compilation/fail22039.d b/compiler/test/fail_compilation/fail22039.d index 3df834f7ad0d..31c83f5c3076 100644 --- a/compiler/test/fail_compilation/fail22039.d +++ b/compiler/test/fail_compilation/fail22039.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22039.d(11): Error: recursive evaluation of `func()` -fail_compilation/fail22039.d(14): Error: recursive evaluation of `gun(func2())` +fail_compilation/fail22039.d(15): Error: recursive evaluation of `func()` +int func(int x = func()) { return x; } + ^ +fail_compilation/fail22039.d(18): Error: recursive evaluation of `gun(func2())` +int func2(int x = gun(func2())) { return x; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22054.d b/compiler/test/fail_compilation/fail22054.d index 8b525d85fb2c..3f5d16a4f571 100644 --- a/compiler/test/fail_compilation/fail22054.d +++ b/compiler/test/fail_compilation/fail22054.d @@ -3,12 +3,20 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22054.d(23): Error: no property `what` for type `fail22054.exception` -fail_compilation/fail22054.d(18): `class fail22054.exception` is opaque and has no members. -fail_compilation/fail22054.d(18): class `exception` defined here -fail_compilation/fail22054.d(24): Error: no property `what` for type `fail22054.exception2` -fail_compilation/fail22054.d(19): `struct fail22054.exception2` is opaque and has no members. -fail_compilation/fail22054.d(19): struct `exception2` defined here +fail_compilation/fail22054.d(31): Error: no property `what` for type `fail22054.exception` + assert(exception.what() == "Hello"); + ^ +fail_compilation/fail22054.d(26): `class fail22054.exception` is opaque and has no members. +class exception; +^ +fail_compilation/fail22054.d(26): class `exception` defined here +fail_compilation/fail22054.d(32): Error: no property `what` for type `fail22054.exception2` + assert(exception2.what() == "Hello"); + ^ +fail_compilation/fail22054.d(27): `struct fail22054.exception2` is opaque and has no members. +struct exception2; +^ +fail_compilation/fail22054.d(27): struct `exception2` defined here --- */ diff --git a/compiler/test/fail_compilation/fail22075.d b/compiler/test/fail_compilation/fail22075.d index 9b857c2f1d53..a66e736b0715 100644 --- a/compiler/test/fail_compilation/fail22075.d +++ b/compiler/test/fail_compilation/fail22075.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22075.d(25): Error: AA key type `S` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined -fail_compilation/fail22075.d(26): Error: AA key type `S` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined +fail_compilation/fail22075.d(29): Error: AA key type `S` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined +int[S!HasAliasThis] aa1; // Compiles but should not. + ^ +fail_compilation/fail22075.d(30): Error: AA key type `S` should have `extern (D) size_t toHash() const nothrow @safe` if `opEquals` defined +int[S!LacksAliasThis] aa2; // Correctly fails to compile with "Error: AA key + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22084.d b/compiler/test/fail_compilation/fail22084.d index b0ae7224da52..b16aa8fd4f76 100644 --- a/compiler/test/fail_compilation/fail22084.d +++ b/compiler/test/fail_compilation/fail22084.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22084.d(22): Error: cannot pass types that need destruction as variadic arguments +fail_compilation/fail22084.d(24): Error: cannot pass types that need destruction as variadic arguments + testVariadic(1, a0); + ^ --- */ import core.stdc.stdarg; diff --git a/compiler/test/fail_compilation/fail221.d b/compiler/test/fail_compilation/fail221.d index 14c3e7bf801c..b44aa4d9164a 100644 --- a/compiler/test/fail_compilation/fail221.d +++ b/compiler/test/fail_compilation/fail221.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail221.d(11): Error: expression `cast(void)0` is `void` and has no value +fail_compilation/fail221.d(13): Error: expression `cast(void)0` is `void` and has no value + data ~= cast(void) 0; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22118.d b/compiler/test/fail_compilation/fail22118.d index bd34c56ebcc5..c3ae910efa13 100644 --- a/compiler/test/fail_compilation/fail22118.d +++ b/compiler/test/fail_compilation/fail22118.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22118.d(33): Error: cannot modify `this.v.a` in `const` function +fail_compilation/fail22118.d(35): Error: cannot modify `this.v.a` in `const` function + v.a = arg; // this should not + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22121.d b/compiler/test/fail_compilation/fail22121.d index f45cf12e061f..8e2203873e53 100644 --- a/compiler/test/fail_compilation/fail22121.d +++ b/compiler/test/fail_compilation/fail22121.d @@ -4,6 +4,8 @@ TEST_OUTPUT: --- fail_compilation/fail22121/imports/test22121/package.d(1): Error: package name 'fail22121' conflicts with usage as a module name in file fail_compilation/fail22121.d +module fail22121.imports.test22121; +^ --- */ diff --git a/compiler/test/fail_compilation/fail22133.d b/compiler/test/fail_compilation/fail22133.d index a30d430f6946..e76ac54843d9 100644 --- a/compiler/test/fail_compilation/fail22133.d +++ b/compiler/test/fail_compilation/fail22133.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22133.d(16): Error: `s.popFront()()` has no effect -fail_compilation/fail22133.d(17): Error: template `s.popFront()()` has no type +fail_compilation/fail22133.d(20): Error: `s.popFront()()` has no effect + s.popFront; + ^ +fail_compilation/fail22133.d(21): Error: template `s.popFront()()` has no type + return s.popFront; + ^ --- */ struct Slice diff --git a/compiler/test/fail_compilation/fail22134.d b/compiler/test/fail_compilation/fail22134.d index 5a4933ef325e..7cbfeb60b853 100644 --- a/compiler/test/fail_compilation/fail22134.d +++ b/compiler/test/fail_compilation/fail22134.d @@ -2,7 +2,9 @@ /* REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/fail22134.d(12): Deprecation: `this.arr[i]` has no effect +fail_compilation/fail22134.d(14): Deprecation: `this.arr[i]` has no effect + return arr[i]; + ^ --- */ struct StackBuffer diff --git a/compiler/test/fail_compilation/fail22144.d b/compiler/test/fail_compilation/fail22144.d index 694c1e9955e9..a251aababe18 100644 --- a/compiler/test/fail_compilation/fail22144.d +++ b/compiler/test/fail_compilation/fail22144.d @@ -1,7 +1,9 @@ // https://issues.dlang.org/show_bug.cgi?id=22144 /* TEST_OUTPUT: --- -fail_compilation/fail22144.d(12): Error: cannot cast expression `zarray1` of type `int[0]` to `int[0][]` since sizes don't line up +fail_compilation/fail22144.d(14): Error: cannot cast expression `zarray1` of type `int[0]` to `int[0][]` since sizes don't line up + auto zslice1 = cast(int[0][])zarray1; // ICE -> Error + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail22151.d b/compiler/test/fail_compilation/fail22151.d index c6c3b1b742b6..454833216576 100644 --- a/compiler/test/fail_compilation/fail22151.d +++ b/compiler/test/fail_compilation/fail22151.d @@ -2,10 +2,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22151.d(14): Error: function `test` is not an lvalue and cannot be modified -fail_compilation/fail22151.d(15): Error: function `test2` is not an lvalue and cannot be modified -fail_compilation/fail22151.d(18): Error: function pointed to by `fp` is not an lvalue and cannot be modified -fail_compilation/fail22151.d(21): Error: function pointed to by `ff` is not an lvalue and cannot be modified +fail_compilation/fail22151.d(22): Error: function `test` is not an lvalue and cannot be modified + *&test = *&test; + ^ +fail_compilation/fail22151.d(23): Error: function `test2` is not an lvalue and cannot be modified + *&test2 = *&test; + ^ +fail_compilation/fail22151.d(26): Error: function pointed to by `fp` is not an lvalue and cannot be modified + *fp = *fp; + ^ +fail_compilation/fail22151.d(29): Error: function pointed to by `ff` is not an lvalue and cannot be modified + *ff = *&test2; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22157.d b/compiler/test/fail_compilation/fail22157.d index d25aaada2c58..a98c427c7c81 100644 --- a/compiler/test/fail_compilation/fail22157.d +++ b/compiler/test/fail_compilation/fail22157.d @@ -3,14 +3,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22157.d(32): Error: `fail22157.S!true.S.foo` called with argument types `()` matches both: -fail_compilation/fail22157.d(21): `fail22157.S!true.S.foo()` +fail_compilation/fail22157.d(36): Error: `fail22157.S!true.S.foo` called with argument types `()` matches both: +fail_compilation/fail22157.d(25): `fail22157.S!true.S.foo()` and: -fail_compilation/fail22157.d(22): `fail22157.S!true.S.foo()` -fail_compilation/fail22157.d(33): Error: `fail22157.S!false.S.foo` called with argument types `()` matches both: -fail_compilation/fail22157.d(26): `fail22157.S!false.S.foo()` +fail_compilation/fail22157.d(26): `fail22157.S!true.S.foo()` + S!true.foo; + ^ +fail_compilation/fail22157.d(37): Error: `fail22157.S!false.S.foo` called with argument types `()` matches both: +fail_compilation/fail22157.d(30): `fail22157.S!false.S.foo()` and: -fail_compilation/fail22157.d(27): `fail22157.S!false.S.foo()` +fail_compilation/fail22157.d(31): `fail22157.S!false.S.foo()` + S!false.foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail222.d b/compiler/test/fail_compilation/fail222.d index e196b253065b..839cd5d2ee3f 100644 --- a/compiler/test/fail_compilation/fail222.d +++ b/compiler/test/fail_compilation/fail222.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail222.d(11): Error: template `fail222.getMixin(TArg..., int i = 0)()` template sequence parameter must be the last one -fail_compilation/fail222.d(18): Error: template instance `getMixin!()` does not match template declaration `getMixin(TArg..., int i = 0)()` -fail_compilation/fail222.d(21): Error: template instance `fail222.Thing!()` error instantiating -fail_compilation/fail222.d(23): Error: template `fail222.fooBar(A..., B...)()` template sequence parameter must be the last one +fail_compilation/fail222.d(19): Error: template `fail222.getMixin(TArg..., int i = 0)()` template sequence parameter must be the last one +string getMixin(TArg..., int i = 0)() + ^ +fail_compilation/fail222.d(26): Error: template instance `getMixin!()` does not match template declaration `getMixin(TArg..., int i = 0)()` + mixin(getMixin!(TArg)()); + ^ +fail_compilation/fail222.d(29): Error: template instance `fail222.Thing!()` error instantiating +public Thing!() stuff; + ^ +fail_compilation/fail222.d(31): Error: template `fail222.fooBar(A..., B...)()` template sequence parameter must be the last one +void fooBar (A..., B...)() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22202.d b/compiler/test/fail_compilation/fail22202.d index 9fb5165a711f..51eaae7f7e5b 100644 --- a/compiler/test/fail_compilation/fail22202.d +++ b/compiler/test/fail_compilation/fail22202.d @@ -3,9 +3,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22202.d(22): Error: function `fun` is not callable using argument types `(SystemCopy)` -fail_compilation/fail22202.d(22): `inout ref inout(SystemCopy)(ref inout(SystemCopy) other)` copy constructor cannot be called from a `pure @safe nogc` context -fail_compilation/fail22202.d(17): `fail22202.fun(SystemCopy __param_0)` declared here +fail_compilation/fail22202.d(26): Error: function `fun` is not callable using argument types `(SystemCopy)` + fun(s); + ^ +fail_compilation/fail22202.d(26): `inout ref inout(SystemCopy)(ref inout(SystemCopy) other)` copy constructor cannot be called from a `pure @safe nogc` context +fail_compilation/fail22202.d(21): `fail22202.fun(SystemCopy __param_0)` declared here +void fun(SystemCopy) @safe pure @nogc {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail223.d b/compiler/test/fail_compilation/fail223.d index 804b53574b71..63c154edf809 100644 --- a/compiler/test/fail_compilation/fail223.d +++ b/compiler/test/fail_compilation/fail223.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail223.d(14): Error: cannot modify `this.x` in `const` function +fail_compilation/fail223.d(16): Error: cannot modify `this.x` in `const` function + void setX(int nx) const { x = nx; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22351.d b/compiler/test/fail_compilation/fail22351.d index 405ab557d758..6d458dcf8237 100644 --- a/compiler/test/fail_compilation/fail22351.d +++ b/compiler/test/fail_compilation/fail22351.d @@ -2,9 +2,13 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/fail22351.d(18): Deprecation: overriding `extern(C++)` function `fail22351.C22351.func(int*)` with `const` qualified function `fail22351.Fail22351.func(const(int*))` is deprecated -fail_compilation/fail22351.d(18): Either remove `override`, or adjust the `const` qualifiers of the overriding function parameters -fail_compilation/fail22351.d(19): Error: function `extern (C++) void fail22351.Fail22351.func(const(int*)**)` does not override any function, did you mean to override `extern (C++) void fail22351.C22351.func(int*)`? +fail_compilation/fail22351.d(22): Deprecation: overriding `extern(C++)` function `fail22351.C22351.func(int*)` with `const` qualified function `fail22351.Fail22351.func(const(int*))` is deprecated + override void func(const int*) { } + ^ +fail_compilation/fail22351.d(22): Either remove `override`, or adjust the `const` qualifiers of the overriding function parameters +fail_compilation/fail22351.d(23): Error: function `extern (C++) void fail22351.Fail22351.func(const(int*)**)` does not override any function, did you mean to override `extern (C++) void fail22351.C22351.func(int*)`? + override void func(const(int*)**) { } + ^ --- */ extern(C++) class C22351 diff --git a/compiler/test/fail_compilation/fail22366.d b/compiler/test/fail_compilation/fail22366.d index 675ba831ef61..974eedf069a8 100644 --- a/compiler/test/fail_compilation/fail22366.d +++ b/compiler/test/fail_compilation/fail22366.d @@ -2,13 +2,27 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fail22366.d(22): Error: scope variable `s` may not be copied into allocated memory -fail_compilation/fail22366.d(25): Error: scope variable `s` may not be copied into allocated memory -fail_compilation/fail22366.d(26): Error: scope variable `s` may not be copied into allocated memory -fail_compilation/fail22366.d(27): Error: scope variable `s` may not be copied into allocated memory -fail_compilation/fail22366.d(28): Error: scope variable `s` may not be copied into allocated memory -fail_compilation/fail22366.d(31): Error: scope variable `s` may not be copied into allocated memory -fail_compilation/fail22366.d(32): Error: scope variable `s` may not be copied into allocated memory +fail_compilation/fail22366.d(36): Error: scope variable `s` may not be copied into allocated memory + aa[s] ^^= 3; + ^ +fail_compilation/fail22366.d(39): Error: scope variable `s` may not be copied into allocated memory + saa[""] = s; + ^ +fail_compilation/fail22366.d(40): Error: scope variable `s` may not be copied into allocated memory + saa[""] ~= s; + ^ +fail_compilation/fail22366.d(41): Error: scope variable `s` may not be copied into allocated memory + saa[s] = ""; + ^ +fail_compilation/fail22366.d(42): Error: scope variable `s` may not be copied into allocated memory + saa[s] ~= ""; + ^ +fail_compilation/fail22366.d(45): Error: scope variable `s` may not be copied into allocated memory + snaa[s][""] = ""; + ^ +fail_compilation/fail22366.d(46): Error: scope variable `s` may not be copied into allocated memory + snaa[""][s] = ""; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail224.d b/compiler/test/fail_compilation/fail224.d index c52cb431dc76..82554fdf48b5 100644 --- a/compiler/test/fail_compilation/fail224.d +++ b/compiler/test/fail_compilation/fail224.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail224.d(22): Error: need `this` of type `A` to access member `x` from static function `f` +fail_compilation/fail224.d(24): Error: need `this` of type `A` to access member `x` from static function `f` + gi = x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22529.d b/compiler/test/fail_compilation/fail22529.d index 62eac25680d8..17824bee202c 100644 --- a/compiler/test/fail_compilation/fail22529.d +++ b/compiler/test/fail_compilation/fail22529.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22529.d(13): Error: found `return` when expecting `;` following expression +fail_compilation/fail22529.d(15): Error: found `return` when expecting `;` following expression + return; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22570.d b/compiler/test/fail_compilation/fail22570.d index e937a480b45c..2e641b24a0ca 100644 --- a/compiler/test/fail_compilation/fail22570.d +++ b/compiler/test/fail_compilation/fail22570.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22570.d(19): Error: too many initializers for `S` with 1 field -fail_compilation/fail22570.d(20): Error: too many initializers for `S` with 1 field +fail_compilation/fail22570.d(23): Error: too many initializers for `S` with 1 field + s = [S(null, null)]; + ^ +fail_compilation/fail22570.d(24): Error: too many initializers for `S` with 1 field + s ~= S(null, null); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22634.d b/compiler/test/fail_compilation/fail22634.d index 320d1eb07f43..084714b47331 100644 --- a/compiler/test/fail_compilation/fail22634.d +++ b/compiler/test/fail_compilation/fail22634.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22634.d(9): Error: more than 65535 symbols with name `i` generated +fail_compilation/fail22634.d(11): Error: more than 65535 symbols with name `i` generated + static foreach(i; 0..65537) + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail22729.d b/compiler/test/fail_compilation/fail22729.d index d0c8aa9c2f31..8329e941c8ac 100644 --- a/compiler/test/fail_compilation/fail22729.d +++ b/compiler/test/fail_compilation/fail22729.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22729.d(12): Error: field `getChildAtPosition` not allowed in interface +fail_compilation/fail22729.d(14): Error: field `getChildAtPosition` not allowed in interface + Tuple!(WidgetI) getChildAtPosition; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22749.d b/compiler/test/fail_compilation/fail22749.d index 56ccac64fae2..6cc7b3d7d45e 100644 --- a/compiler/test/fail_compilation/fail22749.d +++ b/compiler/test/fail_compilation/fail22749.d @@ -1,7 +1,9 @@ // EXTRA_FILES: imports/imp22749.c /* TEST_OUTPUT: --- -fail_compilation/fail22749.d(12): Error: cannot take address of bit-field `field` +fail_compilation/fail22749.d(14): Error: cannot take address of bit-field `field` + void* ptr = &s.field; + ^ --- */ import imports.imp22749; diff --git a/compiler/test/fail_compilation/fail22780.d b/compiler/test/fail_compilation/fail22780.d index 8d4c8a891f0c..580930ff9237 100644 --- a/compiler/test/fail_compilation/fail22780.d +++ b/compiler/test/fail_compilation/fail22780.d @@ -1,7 +1,9 @@ // https://issues.dlang.org/show_bug.cgi?id=22780 /* TEST_OUTPUT: --- -fail_compilation/fail22780.d(12): Error: variable `fail22780.test10717.c` reference to `scope class` must be `scope` +fail_compilation/fail22780.d(14): Error: variable `fail22780.test10717.c` reference to `scope class` must be `scope` + C10717 c; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail228.d b/compiler/test/fail_compilation/fail228.d index a4433bb893d7..0d319376be9f 100644 --- a/compiler/test/fail_compilation/fail228.d +++ b/compiler/test/fail_compilation/fail228.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail228.d(22): Error: undefined identifier `localVariable` +fail_compilation/fail228.d(24): Error: undefined identifier `localVariable` + auto x = ToTypeString!(typeof(localVariable))(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail22812.c b/compiler/test/fail_compilation/fail22812.c index 80fe1f5e6ebb..8e8741e57d95 100644 --- a/compiler/test/fail_compilation/fail22812.c +++ b/compiler/test/fail_compilation/fail22812.c @@ -1,10 +1,18 @@ // https://issues.dlang.org/show_bug.cgi?id=22812 /* TEST_OUTPUT: --- -fail_compilation/fail22812.c(11): Error: left parenthesis expected to follow `#pragma pack` -fail_compilation/fail22812.c(12): Error: unrecognized `#pragma pack(\n)` -fail_compilation/fail22812.c(13): Error: pack must be an integer positive power of 2, not 0x3 -fail_compilation/fail22812.c(13): Error: right parenthesis expected to close `#pragma pack(` +fail_compilation/fail22812.c(19): Error: left parenthesis expected to follow `#pragma pack` +#pragma pack + ^ +fail_compilation/fail22812.c(20): Error: unrecognized `#pragma pack(\n)` +#pragma pack( + ^ +fail_compilation/fail22812.c(21): Error: pack must be an integer positive power of 2, not 0x3 +#pragma pack(3 + ^ +fail_compilation/fail22812.c(21): Error: right parenthesis expected to close `#pragma pack(` +#pragma pack(3 + ^ --- */ #pragma diff --git a/compiler/test/fail_compilation/fail22825a.d b/compiler/test/fail_compilation/fail22825a.d index d8d1093fe043..9100fb8da86e 100644 --- a/compiler/test/fail_compilation/fail22825a.d +++ b/compiler/test/fail_compilation/fail22825a.d @@ -1,8 +1,10 @@ // https://issues.dlang.org/show_bug.cgi?id=22825 /* TEST_OUTPUT: --- -fail_compilation/fail22825a.d(10): Error: positive integer argument expected following `#line` -fail_compilation/fail22825a.d(11): Error: declaration expected, not `42` +fail_compilation/fail22825a.d(12): Error: positive integer argument expected following `#line` +fail_compilation/fail22825a.d(13): Error: declaration expected, not `42` +42 +^ --- */ #line /* diff --git a/compiler/test/fail_compilation/fail22827.d b/compiler/test/fail_compilation/fail22827.d index ee031ae19067..96f18e5e2359 100644 --- a/compiler/test/fail_compilation/fail22827.d +++ b/compiler/test/fail_compilation/fail22827.d @@ -1,8 +1,12 @@ // https://issues.dlang.org/show_bug.cgi?id=22827 /* TEST_OUTPUT: --- -fail_compilation/fail22827.d(8): Error: `cent` and `ucent` types are obsolete, use `core.int128.Cent` instead -fail_compilation/fail22827.d(9): Error: `cent` and `ucent` types are obsolete, use `core.int128.Cent` instead +fail_compilation/fail22827.d(12): Error: `cent` and `ucent` types are obsolete, use `core.int128.Cent` instead +cent i22827; + ^ +fail_compilation/fail22827.d(13): Error: `cent` and `ucent` types are obsolete, use `core.int128.Cent` instead +ucent j22827; + ^ --- */ cent i22827; diff --git a/compiler/test/fail_compilation/fail22852.c b/compiler/test/fail_compilation/fail22852.c index 262282e25696..c818da98d803 100644 --- a/compiler/test/fail_compilation/fail22852.c +++ b/compiler/test/fail_compilation/fail22852.c @@ -1,11 +1,21 @@ // https://issues.dlang.org/show_bug.cgi?id=22852 /* TEST_OUTPUT: --- -fail_compilation/fail22852.c(11): Error: `=`, `;` or `,` expected to end declaration instead of `"string"` -fail_compilation/fail22852.c(12): Error: character '`' is not a valid token -fail_compilation/fail22852.c(12): Error: character '`' is not a valid token -fail_compilation/fail22852.c(13): Error: expression expected, not `x"ff ff"` -fail_compilation/fail22852.c(14): Error: `=`, `;` or `,` expected to end declaration instead of `{` +fail_compilation/fail22852.c(21): Error: `=`, `;` or `,` expected to end declaration instead of `"string"` +const char *rstring = r"string"; + ^ +fail_compilation/fail22852.c(22): Error: character '`' is not a valid token +const char *wstring = `string`; + ^ +fail_compilation/fail22852.c(22): Error: character '`' is not a valid token +const char *wstring = `string`; + ^ +fail_compilation/fail22852.c(23): Error: expression expected, not `x"ff ff"` +const char *hstring = x"ffff"; + ^ +fail_compilation/fail22852.c(24): Error: `=`, `;` or `,` expected to end declaration instead of `{` +const char *qstring = q{string}; + ^ --- */ const char *rstring = r"string"; diff --git a/compiler/test/fail_compilation/fail22853a.i b/compiler/test/fail_compilation/fail22853a.i index 963d0b3bf6b1..a3f44c33e548 100644 --- a/compiler/test/fail_compilation/fail22853a.i +++ b/compiler/test/fail_compilation/fail22853a.i @@ -2,5 +2,7 @@ /* TEST_OUTPUT: --- fail_compilation/fail22853a.i(1): Error: no type for declarator before `/` +/+ https://issues.dlang.org/show_bug.cgi?id=22853 +/ +^ --- */ diff --git a/compiler/test/fail_compilation/fail22853b.c b/compiler/test/fail_compilation/fail22853b.c index 0ba955b76506..364582e4c83b 100644 --- a/compiler/test/fail_compilation/fail22853b.c +++ b/compiler/test/fail_compilation/fail22853b.c @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/fail22853b.c(8): Error: found `/` instead of statement +fail_compilation/fail22853b.c(10): Error: found `/` instead of statement + /+ https://issues.dlang.org/show_bug.cgi?id=22853 +/ + ^ --- */ void test22853() diff --git a/compiler/test/fail_compilation/fail22857.d b/compiler/test/fail_compilation/fail22857.d index 061eb62d49e9..321e9d9259c6 100644 --- a/compiler/test/fail_compilation/fail22857.d +++ b/compiler/test/fail_compilation/fail22857.d @@ -6,7 +6,9 @@ TEST_OUTPUT: --- fail_compilation/imports/import22857.d(4): Error: (expression) expected following `static if` fail_compilation/imports/import22857.d(4): Error: declaration expected, not `}` -fail_compilation/fail22857.d(17): Error: template instance `unaryFun!()` template `unaryFun` is not defined +fail_compilation/fail22857.d(19): Error: template instance `unaryFun!()` template `unaryFun` is not defined + unaryFun!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail229.d b/compiler/test/fail_compilation/fail229.d index 5b42cca9ea0a..3d723c22fe5a 100644 --- a/compiler/test/fail_compilation/fail229.d +++ b/compiler/test/fail_compilation/fail229.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail229.d(11): Error: array index 18446744073709551615 overflow -fail_compilation/fail229.d(11): Error: array dimension overflow +fail_compilation/fail229.d(15): Error: array index 18446744073709551615 overflow +static int[] x = [-1: 1]; + ^ +fail_compilation/fail229.d(15): Error: array dimension overflow +static int[] x = [-1: 1]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23.d b/compiler/test/fail_compilation/fail23.d index 67d02eb3afcc..5df74f4ca74a 100644 --- a/compiler/test/fail_compilation/fail23.d +++ b/compiler/test/fail_compilation/fail23.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23.d(14): Error: `break` is not inside a loop or `switch` +fail_compilation/fail23.d(16): Error: `break` is not inside a loop or `switch` + break; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23036.d b/compiler/test/fail_compilation/fail23036.d index 8920586c67a8..c990548c2d7d 100644 --- a/compiler/test/fail_compilation/fail23036.d +++ b/compiler/test/fail_compilation/fail23036.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23036.d(12): Error: `struct S` may not define both a rvalue constructor and a copy constructor -fail_compilation/fail23036.d(15): rvalue constructor defined here -fail_compilation/fail23036.d(14): copy constructor defined here +fail_compilation/fail23036.d(18): Error: `struct S` may not define both a rvalue constructor and a copy constructor +struct S +^ +fail_compilation/fail23036.d(21): rvalue constructor defined here + this(S, int a = 2) {} + ^ +fail_compilation/fail23036.d(20): copy constructor defined here + this(ref S) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail231.d b/compiler/test/fail_compilation/fail231.d index fc6cfa1f2ff3..415c39feb383 100644 --- a/compiler/test/fail_compilation/fail231.d +++ b/compiler/test/fail_compilation/fail231.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail231.d(15): Error: class `fail231.Derived` cannot implicitly generate a default constructor when base class `fail231.Base` is missing a default constructor +fail_compilation/fail231.d(17): Error: class `fail231.Derived` cannot implicitly generate a default constructor when base class `fail231.Base` is missing a default constructor +class Derived : Base +^ --- */ diff --git a/compiler/test/fail_compilation/fail23108a.d b/compiler/test/fail_compilation/fail23108a.d index a974871a38aa..cc2e1472ca3d 100644 --- a/compiler/test/fail_compilation/fail23108a.d +++ b/compiler/test/fail_compilation/fail23108a.d @@ -1,7 +1,9 @@ // https://issues.dlang.org/show_bug.cgi?id=23108 /* TEST_OUTPUT: --- -fail_compilation/fail23108a.d(9): Error: undefined identifier `_xopEquals` in module `object` +fail_compilation/fail23108a.d(11): Error: undefined identifier `_xopEquals` in module `object` +struct Interface +^ --- */ module object; diff --git a/compiler/test/fail_compilation/fail23108b.d b/compiler/test/fail_compilation/fail23108b.d index 10eae37c401d..d1d9c6f6e632 100644 --- a/compiler/test/fail_compilation/fail23108b.d +++ b/compiler/test/fail_compilation/fail23108b.d @@ -1,8 +1,12 @@ // https://issues.dlang.org/show_bug.cgi?id=23108 /* TEST_OUTPUT: --- -fail_compilation/fail23108b.d(10): Error: undefined identifier `_xopEquals` in module `object` -fail_compilation/fail23108b.d(10): Error: undefined identifier `_xopCmp` in module `object` +fail_compilation/fail23108b.d(14): Error: undefined identifier `_xopEquals` in module `object` +struct Interface +^ +fail_compilation/fail23108b.d(14): Error: undefined identifier `_xopCmp` in module `object` +struct Interface +^ --- */ module object; diff --git a/compiler/test/fail_compilation/fail23109.d b/compiler/test/fail_compilation/fail23109.d index ee560759e41e..4fce51ba854f 100644 --- a/compiler/test/fail_compilation/fail23109.d +++ b/compiler/test/fail_compilation/fail23109.d @@ -6,9 +6,15 @@ TEST_OUTPUT: --- Error: no property `getHash` for `typeid(const(Ensure[]))` of type `object.TypeInfo_Const` fail_compilation/extra-files/test23109/object.d(7): class `TypeInfo_Const` defined here +class TypeInfo_Const {} +^ Error: no property `getHash` for `typeid(const(Ensure[1]))` of type `object.TypeInfo_Const` fail_compilation/extra-files/test23109/object.d(7): class `TypeInfo_Const` defined here +class TypeInfo_Const {} +^ fail_compilation/imports/test23109a.d(10): Error: template instance `imports.test23109a.Array!(Ensure)` error instantiating +alias Ensures = Array!Ensure; + ^ --- */ import imports.test23109a; diff --git a/compiler/test/fail_compilation/fail23135.d b/compiler/test/fail_compilation/fail23135.d index d32c6aeef51b..8189aa46793c 100644 --- a/compiler/test/fail_compilation/fail23135.d +++ b/compiler/test/fail_compilation/fail23135.d @@ -2,8 +2,10 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/fail23135.d(16): Deprecation: overriding `extern(C++)` function `fail23135.C23135.func()` with `const` qualified function `fail23135.Fail23135.func() const` is deprecated -fail_compilation/fail23135.d(16): Either remove `override`, or adjust the `const` qualifiers of the overriding function type +fail_compilation/fail23135.d(18): Deprecation: overriding `extern(C++)` function `fail23135.C23135.func()` with `const` qualified function `fail23135.Fail23135.func() const` is deprecated + override void func() const { } + ^ +fail_compilation/fail23135.d(18): Either remove `override`, or adjust the `const` qualifiers of the overriding function type --- */ extern(C++) class C23135 diff --git a/compiler/test/fail_compilation/fail23151.d b/compiler/test/fail_compilation/fail23151.d index e24dcc2b704e..b963990baaed 100644 --- a/compiler/test/fail_compilation/fail23151.d +++ b/compiler/test/fail_compilation/fail23151.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23151.d(30): Error: class `fail23151.makeDerivedObj.Derived` is nested within `makeDerivedObj`, but super class `Base` is nested within `makeBaseObj` +fail_compilation/fail23151.d(32): Error: class `fail23151.makeDerivedObj.Derived` is nested within `makeDerivedObj`, but super class `Base` is nested within `makeBaseObj` + class Derived : typeof(makeBaseObj()) + ^ --- */ interface I diff --git a/compiler/test/fail_compilation/fail232.d b/compiler/test/fail_compilation/fail232.d index d2e68d451f34..10d2f76b5e4e 100644 --- a/compiler/test/fail_compilation/fail232.d +++ b/compiler/test/fail_compilation/fail232.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail232.d(15): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail232.d(15): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail232.d(16): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail232.d(16): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail232.d(17): Error: shift by 33 is outside the range `0..31` -fail_compilation/fail232.d(17): Error: shift by 33 is outside the range `0..31` +fail_compilation/fail232.d(27): Error: shift by 33 is outside the range `0..31` + i = i >> 33; + ^ +fail_compilation/fail232.d(27): Error: shift by 33 is outside the range `0..31` + i = i >> 33; + ^ +fail_compilation/fail232.d(28): Error: shift by 33 is outside the range `0..31` + i = i << 33; + ^ +fail_compilation/fail232.d(28): Error: shift by 33 is outside the range `0..31` + i = i << 33; + ^ +fail_compilation/fail232.d(29): Error: shift by 33 is outside the range `0..31` + i = i >>> 33; + ^ +fail_compilation/fail232.d(29): Error: shift by 33 is outside the range `0..31` + i = i >>> 33; + ^ --- */ void bug1601() { diff --git a/compiler/test/fail_compilation/fail23406.d b/compiler/test/fail_compilation/fail23406.d index 8ac3f147e586..462950ed58c8 100644 --- a/compiler/test/fail_compilation/fail23406.d +++ b/compiler/test/fail_compilation/fail23406.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23406.d(39): Error: cannot implicitly convert expression `0` of type `int` to `alphakey` +fail_compilation/fail23406.d(41): Error: cannot implicitly convert expression `0` of type `int` to `alphakey` + alpha = 0; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23439.d b/compiler/test/fail_compilation/fail23439.d index b070e581a4a7..bf0553df5d50 100644 --- a/compiler/test/fail_compilation/fail23439.d +++ b/compiler/test/fail_compilation/fail23439.d @@ -2,7 +2,9 @@ // PERMUTE_ARGS: -lowmem /* TEST_OUTPUT: --- -fail_compilation/fail23439.d(13): Error: variable `fail23439.ice23439` is a thread-local class and cannot have a static initializer. Use `static this()` to initialize instead. +fail_compilation/fail23439.d(15): Error: variable `fail23439.ice23439` is a thread-local class and cannot have a static initializer. Use `static this()` to initialize instead. +static ice23439 = new C23439(); + ^ --- */ class C23439 diff --git a/compiler/test/fail_compilation/fail2350.d b/compiler/test/fail_compilation/fail2350.d index 9e98cfb12e0f..ffde0f522949 100644 --- a/compiler/test/fail_compilation/fail2350.d +++ b/compiler/test/fail_compilation/fail2350.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2350.d(8): Error: function `fail2350.test2350` naked assembly functions with contracts are not supported +fail_compilation/fail2350.d(10): Error: function `fail2350.test2350` naked assembly functions with contracts are not supported +void test2350() + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23574.d b/compiler/test/fail_compilation/fail23574.d index c314d92fae51..910fb7cff6f8 100644 --- a/compiler/test/fail_compilation/fail23574.d +++ b/compiler/test/fail_compilation/fail23574.d @@ -2,10 +2,16 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23574.d(26): Error: function `object._xopEquals` has no `return` statement, but is expected to return a value of type `bool` +fail_compilation/fail23574.d(32): Error: function `object._xopEquals` has no `return` statement, but is expected to return a value of type `bool` +bool _xopEquals() + ^ Error: undefined identifier `size_t` in module `object` -fail_compilation/fail23574.d(34): Error: template instance `object.S17915!(MyClass)` error instantiating -fail_compilation/fail23574.d(30): Error: function `object.SDL_GetKeyName` has no `return` statement, but is expected to return a value of type `const(char)` +fail_compilation/fail23574.d(40): Error: template instance `object.S17915!(MyClass)` error instantiating + S17915!MyClass m_member; + ^ +fail_compilation/fail23574.d(36): Error: function `object.SDL_GetKeyName` has no `return` statement, but is expected to return a value of type `const(char)` +const(char)SDL_GetKeyName() + ^ --- */ module object; diff --git a/compiler/test/fail_compilation/fail23591.d b/compiler/test/fail_compilation/fail23591.d index ddfc5587c641..3129e1815afd 100644 --- a/compiler/test/fail_compilation/fail23591.d +++ b/compiler/test/fail_compilation/fail23591.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23591.d(13): Error: cannot implicitly convert expression `square(i) , null` of type `string` to `int` -fail_compilation/fail23591.d(14): Error: cannot implicitly convert expression `assert(0) , null` of type `real function(char)` to `int` +fail_compilation/fail23591.d(17): Error: cannot implicitly convert expression `square(i) , null` of type `string` to `int` + int x = cast(string)square(i); + ^ +fail_compilation/fail23591.d(18): Error: cannot implicitly convert expression `assert(0) , null` of type `real function(char)` to `int` + int y = cast(real function(char))assert(0); + ^ --- */ noreturn square(int x); diff --git a/compiler/test/fail_compilation/fail236.d b/compiler/test/fail_compilation/fail236.d index 96f0ae655187..25a7b59dfd1c 100644 --- a/compiler/test/fail_compilation/fail236.d +++ b/compiler/test/fail_compilation/fail236.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail236.d(14): Error: undefined identifier `x` -fail_compilation/fail236.d(22): Error: template `Templ2` is not callable using argument types `!()(int)` -fail_compilation/fail236.d(12): Candidate is: `Templ2(alias a)(x)` +fail_compilation/fail236.d(20): Error: undefined identifier `x` + void Templ2(x) + ^ +fail_compilation/fail236.d(28): Error: template `Templ2` is not callable using argument types `!()(int)` + Templ2(i); + ^ +fail_compilation/fail236.d(18): Candidate is: `Templ2(alias a)(x)` +template Templ2(alias a) +^ --- */ diff --git a/compiler/test/fail_compilation/fail2361.d b/compiler/test/fail_compilation/fail2361.d index ffc12f1631ee..d83a8d85c256 100644 --- a/compiler/test/fail_compilation/fail2361.d +++ b/compiler/test/fail_compilation/fail2361.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2361.d(14): Error: the `delete` keyword is obsolete -fail_compilation/fail2361.d(14): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/fail2361.d(16): Error: the `delete` keyword is obsolete + delete c; + ^ +fail_compilation/fail2361.d(16): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead --- */ diff --git a/compiler/test/fail_compilation/fail23626a.d b/compiler/test/fail_compilation/fail23626a.d index 559e0e2de0a3..2e2bdeb6b885 100644 --- a/compiler/test/fail_compilation/fail23626a.d +++ b/compiler/test/fail_compilation/fail23626a.d @@ -1,8 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23626a.d(10): Deprecation: function `fail23626a.ambig` cannot overload `extern(D)` function at fail_compilation/fail23626a.d(9) -fail_compilation/fail23626a.d(13): Error: function `fail23626a.ambigC` cannot overload `extern(C)` function at fail_compilation/fail23626a.d(12) -fail_compilation/fail23626a.d(16): Error: function `fail23626a.ambigCxx(int a)` conflicts with previous declaration at fail_compilation/fail23626a.d(15) +fail_compilation/fail23626a.d(16): Deprecation: function `fail23626a.ambig` cannot overload `extern(D)` function at fail_compilation/fail23626a.d(15) +extern(D) int ambig(int a) @system { return 1; } + ^ +fail_compilation/fail23626a.d(19): Error: function `fail23626a.ambigC` cannot overload `extern(C)` function at fail_compilation/fail23626a.d(18) +extern(C) int ambigC(int a) @system { return 3; } + ^ +fail_compilation/fail23626a.d(22): Error: function `fail23626a.ambigCxx(int a)` conflicts with previous declaration at fail_compilation/fail23626a.d(21) +extern(C++) int ambigCxx(int a) @system { return 5; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23626b.d b/compiler/test/fail_compilation/fail23626b.d index 758a28b14189..b47eba087469 100644 --- a/compiler/test/fail_compilation/fail23626b.d +++ b/compiler/test/fail_compilation/fail23626b.d @@ -1,9 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23626b.d(26): Error: `fail23626b.AmbigOpApply.opApply` called with argument types `(int delegate(int i) pure nothrow @nogc @system)` matches both: -fail_compilation/fail23626b.d(12): `fail23626b.AmbigOpApply.opApply(int delegate(int) dg)` +fail_compilation/fail23626b.d(28): Error: `fail23626b.AmbigOpApply.opApply` called with argument types `(int delegate(int i) pure nothrow @nogc @system)` matches both: +fail_compilation/fail23626b.d(14): `fail23626b.AmbigOpApply.opApply(int delegate(int) dg)` and: -fail_compilation/fail23626b.d(17): `fail23626b.AmbigOpApply.opApply(int delegate(int) dg)` +fail_compilation/fail23626b.d(19): `fail23626b.AmbigOpApply.opApply(int delegate(int) dg)` + foreach (int i; sa) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail237.d b/compiler/test/fail_compilation/fail237.d index c9300512c172..45eb682e36bd 100644 --- a/compiler/test/fail_compilation/fail237.d +++ b/compiler/test/fail_compilation/fail237.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail237.d(11): Error: undefined identifier `a` in module `fail237` -fail_compilation/fail237.d(11): while evaluating: `static assert(module fail237.a!().b)` +fail_compilation/fail237.d(15): Error: undefined identifier `a` in module `fail237` +static assert(.a!().b); + ^ +fail_compilation/fail237.d(15): while evaluating: `static assert(module fail237.a!().b)` +static assert(.a!().b); +^ --- */ diff --git a/compiler/test/fail_compilation/fail23745.d b/compiler/test/fail_compilation/fail23745.d index 46d92f0fa10f..5705961c8737 100644 --- a/compiler/test/fail_compilation/fail23745.d +++ b/compiler/test/fail_compilation/fail23745.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23745.d(21): Error: undefined identifier `UndefinedType` -fail_compilation/fail23745.d(14): Error: function `fun` does not override any function, did you mean to override `fail23745.A.fun`? -fail_compilation/fail23745.d(21): Function `fail23745.A.fun` contains errors in its declaration, therefore it cannot be correctly overridden +fail_compilation/fail23745.d(27): Error: undefined identifier `UndefinedType` + void fun(UndefinedType); + ^ +fail_compilation/fail23745.d(20): Error: function `fun` does not override any function, did you mean to override `fail23745.A.fun`? + override void fun() + ^ +fail_compilation/fail23745.d(27): Function `fail23745.A.fun` contains errors in its declaration, therefore it cannot be correctly overridden + void fun(UndefinedType); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23760.d b/compiler/test/fail_compilation/fail23760.d index fbca6ecd7975..788659cc0b0c 100644 --- a/compiler/test/fail_compilation/fail23760.d +++ b/compiler/test/fail_compilation/fail23760.d @@ -3,10 +3,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23760.d(16): Error: type of variable `fail23760.A.state` has errors -fail_compilation/fail23760.d(16): Error: `(A).state` cannot be resolved -fail_compilation/fail23760.d(21): Error: template instance `fail23760.JavaBridge!(A)` error instantiating -fail_compilation/fail23760.d(24): instantiated from here: `JavaClass!(A)` +fail_compilation/fail23760.d(24): Error: type of variable `fail23760.A.state` has errors + alias T = __traits(getOverloads, Class, "state"); + ^ +fail_compilation/fail23760.d(24): Error: `(A).state` cannot be resolved + alias T = __traits(getOverloads, Class, "state"); + ^ +fail_compilation/fail23760.d(29): Error: template instance `fail23760.JavaBridge!(A)` error instantiating + JavaBridge!(CRTP) _javaDBridge; + ^ +fail_compilation/fail23760.d(32): instantiated from here: `JavaClass!(A)` +class A : JavaClass!A + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23773.d b/compiler/test/fail_compilation/fail23773.d index e6cdc3e0354b..d5d463b24bec 100644 --- a/compiler/test/fail_compilation/fail23773.d +++ b/compiler/test/fail_compilation/fail23773.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23773.d(14): Error: assignment cannot be used as a condition, perhaps `==` was meant? +fail_compilation/fail23773.d(16): Error: assignment cannot be used as a condition, perhaps `==` was meant? + assert(arr.length = i); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23822.d b/compiler/test/fail_compilation/fail23822.d index 5cdd1fe05039..6cc4db97092d 100644 --- a/compiler/test/fail_compilation/fail23822.d +++ b/compiler/test/fail_compilation/fail23822.d @@ -5,7 +5,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23822.d(21): Deprecation: alias `fail23822.S.value` is deprecated +fail_compilation/fail23822.d(23): Deprecation: alias `fail23822.S.value` is deprecated + auto a = S.value; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23826.d b/compiler/test/fail_compilation/fail23826.d index 3db243a3ce87..b094bf93cf4d 100644 --- a/compiler/test/fail_compilation/fail23826.d +++ b/compiler/test/fail_compilation/fail23826.d @@ -5,7 +5,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23826.d(23): Deprecation: alias `fail23826.S.value` is deprecated +fail_compilation/fail23826.d(25): Deprecation: alias `fail23826.S.value` is deprecated + auto a = identity!(S.value); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail23861.d b/compiler/test/fail_compilation/fail23861.d index 23c540799e6d..e61798d12dc6 100644 --- a/compiler/test/fail_compilation/fail23861.d +++ b/compiler/test/fail_compilation/fail23861.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail23861.d(24): Error: cannot implicitly convert expression `3` of type `int` to `Foo` +fail_compilation/fail23861.d(26): Error: cannot implicitly convert expression `3` of type `int` to `Foo` + g = 3; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail238_m32.d b/compiler/test/fail_compilation/fail238_m32.d index b4cfbc91048e..7d16863b7c31 100644 --- a/compiler/test/fail_compilation/fail238_m32.d +++ b/compiler/test/fail_compilation/fail238_m32.d @@ -2,11 +2,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail238_m32.d(21): Error: cannot implicitly convert expression `"a"` of type `string` to `uint` -fail_compilation/fail238_m32.d(24): Error: cannot implicitly convert expression `X!()` of type `void` to `const(string)` -fail_compilation/fail238_m32.d(29): Error: template instance `fail238_m32.A!"a"` error instantiating -fail_compilation/fail238_m32.d(35): instantiated from here: `M!(q)` -fail_compilation/fail238_m32.d(35): while evaluating `pragma(msg, M!(q))` +fail_compilation/fail238_m32.d(31): Error: cannot implicitly convert expression `"a"` of type `string` to `uint` + static if (D!(str[str])) + ^ +fail_compilation/fail238_m32.d(34): Error: cannot implicitly convert expression `X!()` of type `void` to `const(string)` + const string A = .X!(); + ^ +fail_compilation/fail238_m32.d(39): Error: template instance `fail238_m32.A!"a"` error instantiating + const string M = A!("a"); + ^ +fail_compilation/fail238_m32.d(45): instantiated from here: `M!(q)` + pragma(msg, M!(q)); + ^ +fail_compilation/fail238_m32.d(45): while evaluating `pragma(msg, M!(q))` + pragma(msg, M!(q)); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail238_m64.d b/compiler/test/fail_compilation/fail238_m64.d index 10e1da451e2e..3e6efc283ac4 100644 --- a/compiler/test/fail_compilation/fail238_m64.d +++ b/compiler/test/fail_compilation/fail238_m64.d @@ -2,11 +2,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail238_m64.d(21): Error: cannot implicitly convert expression `"a"` of type `string` to `ulong` -fail_compilation/fail238_m64.d(24): Error: cannot implicitly convert expression `X!()` of type `void` to `const(string)` -fail_compilation/fail238_m64.d(29): Error: template instance `fail238_m64.A!"a"` error instantiating -fail_compilation/fail238_m64.d(35): instantiated from here: `M!(q)` -fail_compilation/fail238_m64.d(35): while evaluating `pragma(msg, M!(q))` +fail_compilation/fail238_m64.d(31): Error: cannot implicitly convert expression `"a"` of type `string` to `ulong` + static if (D!(str[str])) + ^ +fail_compilation/fail238_m64.d(34): Error: cannot implicitly convert expression `X!()` of type `void` to `const(string)` + const string A = .X!(); + ^ +fail_compilation/fail238_m64.d(39): Error: template instance `fail238_m64.A!"a"` error instantiating + const string M = A!("a"); + ^ +fail_compilation/fail238_m64.d(45): instantiated from here: `M!(q)` + pragma(msg, M!(q)); + ^ +fail_compilation/fail238_m64.d(45): while evaluating `pragma(msg, M!(q))` + pragma(msg, M!(q)); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail239.d b/compiler/test/fail_compilation/fail239.d index 14b6443528fe..204fbd987095 100644 --- a/compiler/test/fail_compilation/fail239.d +++ b/compiler/test/fail_compilation/fail239.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail239.d(8): Error: type `F` is not an expression +fail_compilation/fail239.d(10): Error: type `F` is not an expression +alias typeof(F).x b; + ^ --- */ class F { int x; } diff --git a/compiler/test/fail_compilation/fail24.d b/compiler/test/fail_compilation/fail24.d index 3b30175e52a5..ccdc3c079221 100644 --- a/compiler/test/fail_compilation/fail24.d +++ b/compiler/test/fail_compilation/fail24.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail24.d(11): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(10) -fail_compilation/fail24.d(12): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(11) -fail_compilation/fail24.d(13): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(12) +fail_compilation/fail24.d(17): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(16) +alias char[64] strtype; +^ +fail_compilation/fail24.d(18): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(17) +alias char[128] strtype; +^ +fail_compilation/fail24.d(19): Error: alias `fail24.strtype` conflicts with alias `fail24.strtype` at fail_compilation/fail24.d(18) +alias char[256] strtype; +^ --- */ diff --git a/compiler/test/fail_compilation/fail240.d b/compiler/test/fail_compilation/fail240.d index e32768adbf2e..88ae4a5762cb 100644 --- a/compiler/test/fail_compilation/fail240.d +++ b/compiler/test/fail_compilation/fail240.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail240.d(9): Error: type `F` is not an expression +fail_compilation/fail240.d(11): Error: type `F` is not an expression +alias typeof(typeof(F).x) b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail241.d b/compiler/test/fail_compilation/fail241.d index babd193033b0..c110c2a89e89 100644 --- a/compiler/test/fail_compilation/fail241.d +++ b/compiler/test/fail_compilation/fail241.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail241.d(18): Error: mutable method `fail241.Foo.f` is not callable using a `const` object -fail_compilation/fail241.d(13): Consider adding `const` or `inout` here -fail_compilation/fail241.d(19): Error: mutable method `fail241.Foo.g` is not callable using a `const` object -fail_compilation/fail241.d(14): Consider adding `const` or `inout` here +fail_compilation/fail241.d(26): Error: mutable method `fail241.Foo.f` is not callable using a `const` object + f(); // error, cannot call public member function from invariant + ^ +fail_compilation/fail241.d(21): Consider adding `const` or `inout` here + public void f() { } + ^ +fail_compilation/fail241.d(27): Error: mutable method `fail241.Foo.g` is not callable using a `const` object + g(); // ok, g() is not public + ^ +fail_compilation/fail241.d(22): Consider adding `const` or `inout` here + private void g() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail24208.d b/compiler/test/fail_compilation/fail24208.d index 149c1386f5dd..e3e97bf24f33 100644 --- a/compiler/test/fail_compilation/fail24208.d +++ b/compiler/test/fail_compilation/fail24208.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fail24208.d(19): Error: reference to local variable `n` assigned to non-scope parameter `p` calling `escape` -fail_compilation/fail24208.d(15): which is not `scope` because of `escaped = p` +fail_compilation/fail24208.d(23): Error: reference to local variable `n` assigned to non-scope parameter `p` calling `escape` + escape(&n); + ^ +fail_compilation/fail24208.d(19): which is not `scope` because of `escaped = p` + escaped = p; + ^ --- +/ void test() @safe diff --git a/compiler/test/fail_compilation/fail24212.d b/compiler/test/fail_compilation/fail24212.d index 767951dafb4f..03fd237e54d4 100644 --- a/compiler/test/fail_compilation/fail24212.d +++ b/compiler/test/fail_compilation/fail24212.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fail24212.d(29): Error: reference to local variable `n` assigned to non-scope parameter `p` calling `fun` +fail_compilation/fail24212.d(31): Error: reference to local variable `n` assigned to non-scope parameter `p` calling `fun` + base.fun(&n); + ^ --- +/ class Base diff --git a/compiler/test/fail_compilation/fail24213.d b/compiler/test/fail_compilation/fail24213.d index e2af6fd1b921..a037e2153272 100644 --- a/compiler/test/fail_compilation/fail24213.d +++ b/compiler/test/fail_compilation/fail24213.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fail24213.d(16): Error: reference to local variable `n` assigned to non-scope parameter `p` +fail_compilation/fail24213.d(18): Error: reference to local variable `n` assigned to non-scope parameter `p` + dg(&n); + ^ --- +/ alias Dg = void delegate(int* p) @safe pure nothrow; diff --git a/compiler/test/fail_compilation/fail24224.d b/compiler/test/fail_compilation/fail24224.d index db87f5305d70..dd7e26a9d87b 100644 --- a/compiler/test/fail_compilation/fail24224.d +++ b/compiler/test/fail_compilation/fail24224.d @@ -1,9 +1,15 @@ /+ TEST_OUTPUT: --- -fail_compilation/fail24224.d(19): Error: struct / class type expected as argument to __traits(initSymbol) instead of `ES` -fail_compilation/fail24224.d(20): Error: struct / class type expected as argument to __traits(initSymbol) instead of `EU` -fail_compilation/fail24224.d(21): Error: struct / class type expected as argument to __traits(initSymbol) instead of `EC` +fail_compilation/fail24224.d(25): Error: struct / class type expected as argument to __traits(initSymbol) instead of `ES` + auto init1 = __traits(initSymbol, ES); + ^ +fail_compilation/fail24224.d(26): Error: struct / class type expected as argument to __traits(initSymbol) instead of `EU` + auto init2 = __traits(initSymbol, EU); + ^ +fail_compilation/fail24224.d(27): Error: struct / class type expected as argument to __traits(initSymbol) instead of `EC` + auto init3 = __traits(initSymbol, EC); + ^ --- +/ struct S {} diff --git a/compiler/test/fail_compilation/fail243.d b/compiler/test/fail_compilation/fail243.d index d9852ffc4718..42bd56b3237c 100644 --- a/compiler/test/fail_compilation/fail243.d +++ b/compiler/test/fail_compilation/fail243.d @@ -2,11 +2,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail243.d(23): Deprecation: class `fail243.DepClass` is deprecated -fail_compilation/fail243.d(24): Deprecation: struct `fail243.DepStruct` is deprecated -fail_compilation/fail243.d(25): Deprecation: union `fail243.DepUnion` is deprecated -fail_compilation/fail243.d(26): Deprecation: enum `fail243.DepEnum` is deprecated -fail_compilation/fail243.d(27): Deprecation: alias `fail243.DepAlias` is deprecated +fail_compilation/fail243.d(33): Deprecation: class `fail243.DepClass` is deprecated +void func(DepClass obj) {} + ^ +fail_compilation/fail243.d(34): Deprecation: struct `fail243.DepStruct` is deprecated +void func(DepStruct obj) {} + ^ +fail_compilation/fail243.d(35): Deprecation: union `fail243.DepUnion` is deprecated +void func(DepUnion obj) {} + ^ +fail_compilation/fail243.d(36): Deprecation: enum `fail243.DepEnum` is deprecated +void func(DepEnum obj) {} + ^ +fail_compilation/fail243.d(37): Deprecation: alias `fail243.DepAlias` is deprecated +void func(DepAlias obj) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail24301.d b/compiler/test/fail_compilation/fail24301.d index 6ddece6c341b..5cc7b36075be 100644 --- a/compiler/test/fail_compilation/fail24301.d +++ b/compiler/test/fail_compilation/fail24301.d @@ -1,9 +1,13 @@ /+ TEST_OUTPUT: --- -fail_compilation/fail24301.d(19): Error: function `fun` is not callable using argument types `(S)` -fail_compilation/fail24301.d(19): `ref S(ref S)` copy constructor cannot be used because it is annotated with `@disable` -fail_compilation/fail24301.d(14): `fail24301.fun(S __param_0)` declared here +fail_compilation/fail24301.d(23): Error: function `fun` is not callable using argument types `(S)` + fun(s); + ^ +fail_compilation/fail24301.d(23): `ref S(ref S)` copy constructor cannot be used because it is annotated with `@disable` +fail_compilation/fail24301.d(18): `fail24301.fun(S __param_0)` declared here +@safe void fun(S) {} + ^ --- +/ struct S diff --git a/compiler/test/fail_compilation/fail24389.c b/compiler/test/fail_compilation/fail24389.c index ecd09abd72a4..0eda8fad6c9a 100644 --- a/compiler/test/fail_compilation/fail24389.c +++ b/compiler/test/fail_compilation/fail24389.c @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail24389.c(10): Error: Gnu Asm not supported - compile this file with gcc or clang +fail_compilation/fail24389.c(12): Error: Gnu Asm not supported - compile this file with gcc or clang +__asm__(".symver " "__qsort_r_compat" ", " "qsort_r" "@" "FBSD_1.0"); + ^ --- */ typedef unsigned long size_t; diff --git a/compiler/test/fail_compilation/fail244.d b/compiler/test/fail_compilation/fail244.d index 757eb2bdbb18..5ba7ab3c84e9 100644 --- a/compiler/test/fail_compilation/fail244.d +++ b/compiler/test/fail_compilation/fail244.d @@ -2,16 +2,36 @@ /* TEST_OUTPUT: --- -fail_compilation/fail244.d(27): Deprecation: variable `fail244.StructWithDeps.value` is deprecated -fail_compilation/fail244.d(28): Deprecation: variable `fail244.StructWithDeps.value` is deprecated -fail_compilation/fail244.d(29): Deprecation: variable `fail244.StructWithDeps.value` is deprecated -fail_compilation/fail244.d(30): Deprecation: variable `fail244.StructWithDeps.value` is deprecated -fail_compilation/fail244.d(32): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated -fail_compilation/fail244.d(33): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated -fail_compilation/fail244.d(34): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated -fail_compilation/fail244.d(35): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated -fail_compilation/fail244.d(36): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated -fail_compilation/fail244.d(37): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated +fail_compilation/fail244.d(47): Deprecation: variable `fail244.StructWithDeps.value` is deprecated + obj.value = 666; + ^ +fail_compilation/fail244.d(48): Deprecation: variable `fail244.StructWithDeps.value` is deprecated + this.value = 666; + ^ +fail_compilation/fail244.d(49): Deprecation: variable `fail244.StructWithDeps.value` is deprecated + auto n1 = obj.value; + ^ +fail_compilation/fail244.d(50): Deprecation: variable `fail244.StructWithDeps.value` is deprecated + auto n2 = this.value; + ^ +fail_compilation/fail244.d(52): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated + obj.staticValue = 102; + ^ +fail_compilation/fail244.d(53): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated + this.staticValue = 103; + ^ +fail_compilation/fail244.d(54): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated + StructWithDeps.staticValue = 104; + ^ +fail_compilation/fail244.d(55): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated + auto n3 = obj.staticValue; + ^ +fail_compilation/fail244.d(56): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated + auto n4 = this.staticValue; + ^ +fail_compilation/fail244.d(57): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated + auto n5 = StructWithDeps.staticValue; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail24422.c b/compiler/test/fail_compilation/fail24422.c index d148b492c373..d78c293f3a85 100644 --- a/compiler/test/fail_compilation/fail24422.c +++ b/compiler/test/fail_compilation/fail24422.c @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail24422.c(7): Error: type-specifier missing for declaration of `a` +fail_compilation/fail24422.c(9): Error: type-specifier missing for declaration of `a` +void f24422(a) a; { } + ^ --- */ void f24422(a) a; { } diff --git a/compiler/test/fail_compilation/fail24485.d b/compiler/test/fail_compilation/fail24485.d index 15547cdcca72..4676752e2ba5 100644 --- a/compiler/test/fail_compilation/fail24485.d +++ b/compiler/test/fail_compilation/fail24485.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail24485.d(25): Error: cannot implicitly convert expression `*a` of type `A` to `B` -fail_compilation/fail24485.d(31): Error: cannot implicitly convert expression `this.a` of type `A` to `B` +fail_compilation/fail24485.d(29): Error: cannot implicitly convert expression `*a` of type `A` to `B` + return *a; + ^ +fail_compilation/fail24485.d(35): Error: cannot implicitly convert expression `this.a` of type `A` to `B` + @property ref B b() { return a; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail245.d b/compiler/test/fail_compilation/fail245.d index 927f94132051..6aa87ba60008 100644 --- a/compiler/test/fail_compilation/fail245.d +++ b/compiler/test/fail_compilation/fail245.d @@ -2,16 +2,36 @@ /* TEST_OUTPUT: --- -fail_compilation/fail245.d(27): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated -fail_compilation/fail245.d(28): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated -fail_compilation/fail245.d(29): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated -fail_compilation/fail245.d(30): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated -fail_compilation/fail245.d(32): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated -fail_compilation/fail245.d(33): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated -fail_compilation/fail245.d(34): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated -fail_compilation/fail245.d(35): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated -fail_compilation/fail245.d(36): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated -fail_compilation/fail245.d(37): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated +fail_compilation/fail245.d(47): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated + obj.value = 666; + ^ +fail_compilation/fail245.d(48): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated + this.value = 666; + ^ +fail_compilation/fail245.d(49): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated + auto n1 = obj.value; + ^ +fail_compilation/fail245.d(50): Deprecation: variable `fail245.ClassWithDeps.value` is deprecated + auto n2 = this.value; + ^ +fail_compilation/fail245.d(52): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated + obj.staticValue = 102; + ^ +fail_compilation/fail245.d(53): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated + this.staticValue = 103; + ^ +fail_compilation/fail245.d(54): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated + ClassWithDeps.staticValue = 104; + ^ +fail_compilation/fail245.d(55): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated + auto n3 = obj.staticValue; + ^ +fail_compilation/fail245.d(56): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated + auto n4 = this.staticValue; + ^ +fail_compilation/fail245.d(57): Deprecation: variable `fail245.ClassWithDeps.staticValue` is deprecated + auto n5 = ClassWithDeps.staticValue; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail2450.d b/compiler/test/fail_compilation/fail2450.d index 82118d5de452..8e62a91ec978 100644 --- a/compiler/test/fail_compilation/fail2450.d +++ b/compiler/test/fail_compilation/fail2450.d @@ -2,10 +2,14 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2450.d(22): Error: function expected before `()`, not `this.mixin Event!() clicked; +fail_compilation/fail2450.d(26): Error: function expected before `()`, not `this.mixin Event!() clicked; ` of type `void` -fail_compilation/fail2450.d(25): Error: function expected before `()`, not `b.mixin Event!() clicked; + this.clicked(); // works + ^ +fail_compilation/fail2450.d(29): Error: function expected before `()`, not `b.mixin Event!() clicked; ` of type `void` + b.clicked(); // works + ^ --- */ diff --git a/compiler/test/fail_compilation/fail2456.d b/compiler/test/fail_compilation/fail2456.d index 5d7d6eebd2e5..14e7f7efdc63 100644 --- a/compiler/test/fail_compilation/fail2456.d +++ b/compiler/test/fail_compilation/fail2456.d @@ -1,7 +1,33 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2456.d(14): Error: cannot put `scope(success)` statement inside `finally` block +fail_compilation/fail2456.d(40): Error: cannot put `scope(success)` statement inside `finally` block + scope(success) {} // NG + ^ +fail_compilation/fail2456.d(51): Error: cannot put `scope(failure)` statement inside `finally` block + scope(failure) {} // NG + ^ +fail_compilation/fail2456.d(70): Error: cannot put `scope(success)` statement inside `scope(success)` + scope(success) {} // NG + ^ +fail_compilation/fail2456.d(71): Error: cannot put `scope(failure)` statement inside `scope(success)` + scope(failure) {} // NG + ^ +fail_compilation/fail2456.d(84): Error: cannot put `scope(success)` statement inside `scope(exit)` + scope(success) {} // NG + ^ +fail_compilation/fail2456.d(85): Error: cannot put `scope(failure)` statement inside `scope(exit)` + scope(failure) {} // NG + ^ +fail_compilation/fail2456.d(95): Error: cannot put `catch` statement inside `scope(success)` + catch (Throwable) {} // NG + ^ +fail_compilation/fail2456.d(107): Error: cannot put `catch` statement inside `scope(exit)` + catch (Throwable) {} // NG + ^ +fail_compilation/fail2456.d(114): Deprecation: can only catch mutable or const qualified types, not `immutable(Exception)` + } catch (immutable Exception e) { + ^ --- */ void test_success() @@ -15,12 +41,6 @@ void test_success() } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail2456.d(31): Error: cannot put `scope(failure)` statement inside `finally` block ---- -*/ void test_failure() { try @@ -32,11 +52,6 @@ void test_failure() } } -/* -TEST_OUTPUT: ---- ---- -*/ void test_exit() { try @@ -48,15 +63,6 @@ void test_exit() } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail2456.d(64): Error: cannot put `scope(success)` statement inside `scope(success)` -fail_compilation/fail2456.d(65): Error: cannot put `scope(failure)` statement inside `scope(success)` -fail_compilation/fail2456.d(78): Error: cannot put `scope(success)` statement inside `scope(exit)` -fail_compilation/fail2456.d(79): Error: cannot put `scope(failure)` statement inside `scope(exit)` ---- -*/ void test2456a() { scope(success) @@ -81,13 +87,6 @@ void test2456a() } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail2456.d(96): Error: cannot put `catch` statement inside `scope(success)` -fail_compilation/fail2456.d(108): Error: cannot put `catch` statement inside `scope(exit)` ---- -*/ void test2456b() { scope(success) @@ -109,12 +108,6 @@ void test2456b() } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail2456.d(121): Deprecation: can only catch mutable or const qualified types, not `immutable(Exception)` ---- -*/ void main() { try { throw new Exception(""); diff --git a/compiler/test/fail_compilation/fail248.d b/compiler/test/fail_compilation/fail248.d index a15ec9670404..e000dbafeb6c 100644 --- a/compiler/test/fail_compilation/fail248.d +++ b/compiler/test/fail_compilation/fail248.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail248.d(9): Error: type `int` is not an expression +fail_compilation/fail248.d(11): Error: type `int` is not an expression +typeof(foo) a; // ok + ^ --- */ diff --git a/compiler/test/fail_compilation/fail249.d b/compiler/test/fail_compilation/fail249.d index a0d1940908e7..2e59d6639a72 100644 --- a/compiler/test/fail_compilation/fail249.d +++ b/compiler/test/fail_compilation/fail249.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail249.d(16): Error: invalid `foreach` aggregate `bar()` of type `void` +fail_compilation/fail249.d(18): Error: invalid `foreach` aggregate `bar()` of type `void` + foreach (Object o; bar()) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail25.d b/compiler/test/fail_compilation/fail25.d index abb795e04fbf..33b4c81c01df 100644 --- a/compiler/test/fail_compilation/fail25.d +++ b/compiler/test/fail_compilation/fail25.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail25.d(14): Error: accessing non-static variable `yuiop` requires an instance of `Qwert` +fail_compilation/fail25.d(16): Error: accessing non-static variable `yuiop` requires an instance of `Qwert` + return Qwert.yuiop + 105; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail250.d b/compiler/test/fail_compilation/fail250.d index c6c08f79b81c..789332f87acb 100644 --- a/compiler/test/fail_compilation/fail250.d +++ b/compiler/test/fail_compilation/fail250.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail250.d(10): Error: constructor `fail250.A.this` default constructor for structs only allowed with `@disable`, no body, and no parameters +fail_compilation/fail250.d(12): Error: constructor `fail250.A.this` default constructor for structs only allowed with `@disable`, no body, and no parameters + this() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail251.d b/compiler/test/fail_compilation/fail251.d index 75cf6e283426..c954c76138c5 100644 --- a/compiler/test/fail_compilation/fail251.d +++ b/compiler/test/fail_compilation/fail251.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail251.d(12): Error: undefined identifier `xs` -fail_compilation/fail251.d(16): called from here: `foo()` -fail_compilation/fail251.d(16): while evaluating: `static assert(foo())` +fail_compilation/fail251.d(18): Error: undefined identifier `xs` + foreach (x; xs) {} + ^ +fail_compilation/fail251.d(22): called from here: `foo()` +static assert(foo()); + ^ +fail_compilation/fail251.d(22): while evaluating: `static assert(foo())` +static assert(foo()); +^ --- */ diff --git a/compiler/test/fail_compilation/fail252.d b/compiler/test/fail_compilation/fail252.d index e9ea2bf7fe0a..32975ecfd15f 100644 --- a/compiler/test/fail_compilation/fail252.d +++ b/compiler/test/fail_compilation/fail252.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail252.d(13): Error: cannot implicitly override base class method `fail252.Timer.Task.run` with `fail252.Timer.__anonclass1.run`; add `override` attribute +fail_compilation/fail252.d(15): Error: cannot implicitly override base class method `fail252.Timer.Task.run` with `fail252.Timer.__anonclass1.run`; add `override` attribute + public void run(){ + ^ --- */ class Timer { diff --git a/compiler/test/fail_compilation/fail253.d b/compiler/test/fail_compilation/fail253.d index e6bfbedc7a33..cb41fc67f9ee 100644 --- a/compiler/test/fail_compilation/fail253.d +++ b/compiler/test/fail_compilation/fail253.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail253.d(13): Error: variable `fail253.main.x` - `inout` variables can only be declared inside `inout` functions -fail_compilation/fail253.d(16): Error: cannot modify `inout` expression `x` -fail_compilation/fail253.d(19): Error: variable `fail253.main.err11` - `inout` variables can only be declared inside `inout` functions +fail_compilation/fail253.d(19): Error: variable `fail253.main.x` - `inout` variables can only be declared inside `inout` functions + foreach (inout char x; "hola") + ^ +fail_compilation/fail253.d(22): Error: cannot modify `inout` expression `x` + x = '?'; + ^ +fail_compilation/fail253.d(25): Error: variable `fail253.main.err11` - `inout` variables can only be declared inside `inout` functions + inout(int)* err11; + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail254.d b/compiler/test/fail_compilation/fail254.d index b29b5907be4d..159f3f52d6a2 100644 --- a/compiler/test/fail_compilation/fail254.d +++ b/compiler/test/fail_compilation/fail254.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail254.d(12): Error: integer overflow -fail_compilation/fail254.d(13): Error: integer overflow -fail_compilation/fail254.d(14): Error: integer overflow -fail_compilation/fail254.d(15): Error: integer overflow -fail_compilation/fail254.d(16): Error: integer overflow +fail_compilation/fail254.d(22): Error: integer overflow +ulong v1 = 0xFFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF; + ^ +fail_compilation/fail254.d(23): Error: integer overflow +ulong v2 = 0x1_0000_0000_0000_0000; + ^ +fail_compilation/fail254.d(24): Error: integer overflow +ulong v3 = 0x1_FFFF_FFFF_FFFF_FFFF; + ^ +fail_compilation/fail254.d(25): Error: integer overflow +ulong v4 = 0x7_FFFF_FFFF_FFFF_FFFF; + ^ +fail_compilation/fail254.d(26): Error: integer overflow +ulong v5 = 0x1_0000_FFFF_FFFF_FFFF; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail256.d b/compiler/test/fail_compilation/fail256.d index ce182e473490..791daada1e07 100644 --- a/compiler/test/fail_compilation/fail256.d +++ b/compiler/test/fail_compilation/fail256.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail256.d(8): Error: incompatible types for `("foo"d) ~ ("bar"c)`: `dstring` and `string` +fail_compilation/fail256.d(10): Error: incompatible types for `("foo"d) ~ ("bar"c)`: `dstring` and `string` +auto s = "foo"d ~ "bar"c; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail257.d b/compiler/test/fail_compilation/fail257.d index 0e2d66995725..8ad88f19fd70 100644 --- a/compiler/test/fail_compilation/fail257.d +++ b/compiler/test/fail_compilation/fail257.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail257.d(8): Error: incompatible types for `("foo"d) == ("bar"c)`: `dstring` and `string` -fail_compilation/fail257.d(8): while evaluating `pragma(msg, "foo"d == "bar"c ? "A" : "B")` +fail_compilation/fail257.d(12): Error: incompatible types for `("foo"d) == ("bar"c)`: `dstring` and `string` +pragma(msg, "foo"d == "bar"c ? "A" : "B"); + ^ +fail_compilation/fail257.d(12): while evaluating `pragma(msg, "foo"d == "bar"c ? "A" : "B")` +pragma(msg, "foo"d == "bar"c ? "A" : "B"); +^ --- */ pragma(msg, "foo"d == "bar"c ? "A" : "B"); diff --git a/compiler/test/fail_compilation/fail259.d b/compiler/test/fail_compilation/fail259.d index cbada7c5d439..11145ef7b2e7 100644 --- a/compiler/test/fail_compilation/fail259.d +++ b/compiler/test/fail_compilation/fail259.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail259.d(11): Error: function `fail259.C.foo` does not override any function +fail_compilation/fail259.d(13): Error: function `fail259.C.foo` does not override any function + override void foo(){} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail261.d b/compiler/test/fail_compilation/fail261.d index d807dc8f3aa6..7c04708b2f82 100644 --- a/compiler/test/fail_compilation/fail261.d +++ b/compiler/test/fail_compilation/fail261.d @@ -1,9 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/fail261.d(20): Error: invalid `foreach` aggregate `range` of type `MyRange` -fail_compilation/fail261.d(20): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property -fail_compilation/fail261.d(20): https://dlang.org/phobos/std_range_primitives.html#isInputRange +fail_compilation/fail261.d(22): Error: invalid `foreach` aggregate `range` of type `MyRange` + foreach (r; range) + ^ +fail_compilation/fail261.d(22): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property +fail_compilation/fail261.d(22): https://dlang.org/phobos/std_range_primitives.html#isInputRange --- */ diff --git a/compiler/test/fail_compilation/fail262.d b/compiler/test/fail_compilation/fail262.d index 7c92c7c18261..1d41fe3535a8 100644 --- a/compiler/test/fail_compilation/fail262.d +++ b/compiler/test/fail_compilation/fail262.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail262.d(23): Error: function `const void fail262.B.f()` does not override any function, did you mean to override `shared const void fail262.A.f()`? +fail_compilation/fail262.d(25): Error: function `const void fail262.B.f()` does not override any function, did you mean to override `shared const void fail262.A.f()`? + override const void f() + ^ --- */ diff --git a/compiler/test/fail_compilation/fail263.d b/compiler/test/fail_compilation/fail263.d index e57fc50a1a38..9cebdf3e4d29 100644 --- a/compiler/test/fail_compilation/fail263.d +++ b/compiler/test/fail_compilation/fail263.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: ---- -fail_compilation/fail263.d(20): Error: function `f` is not callable using argument types `(const(byte)*)` -fail_compilation/fail263.d(20): cannot pass argument `cast(const(byte)*)A` of type `const(byte)*` to parameter `byte* p` -fail_compilation/fail263.d(14): `fail263.f(byte* p)` declared here +fail_compilation/fail263.d(24): Error: function `f` is not callable using argument types `(const(byte)*)` + f(A.ptr); + ^ +fail_compilation/fail263.d(24): cannot pass argument `cast(const(byte)*)A` of type `const(byte)*` to parameter `byte* p` +fail_compilation/fail263.d(18): `fail263.f(byte* p)` declared here +void f(byte* p) + ^ ---- */ diff --git a/compiler/test/fail_compilation/fail264.d b/compiler/test/fail_compilation/fail264.d index ec22d2e0e408..7987f0fb07ad 100644 --- a/compiler/test/fail_compilation/fail264.d +++ b/compiler/test/fail_compilation/fail264.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail264.d(10): Error: undefined identifier `undef` +fail_compilation/fail264.d(12): Error: undefined identifier `undef` + foreach (element; undef) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail2656.d b/compiler/test/fail_compilation/fail2656.d index 520c1b14bfb9..ca7c0f66c7ef 100644 --- a/compiler/test/fail_compilation/fail2656.d +++ b/compiler/test/fail_compilation/fail2656.d @@ -1,20 +1,48 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2656.d(21): Error: octal literals `0123` are no longer supported, use `std.conv.octal!"123"` instead -fail_compilation/fail2656.d(22): Error: octal literals `01000000000000000000000` are no longer supported, use `std.conv.octal!"1000000000000000000000"` instead -fail_compilation/fail2656.d(23): Error: octal literals `0100000L` are no longer supported, use `std.conv.octal!"100000L"` instead -fail_compilation/fail2656.d(24): Error: octal literals `01777777777777777777777u` are no longer supported, use `std.conv.octal!"1777777777777777777777u"` instead -fail_compilation/fail2656.d(25): Error: octal literals `017777777777uL` are no longer supported, use `std.conv.octal!"17777777777uL"` instead -fail_compilation/fail2656.d(26): Error: octal literals `0177777` are no longer supported, use `std.conv.octal!"177777"` instead -fail_compilation/fail2656.d(27): Error: octal literals `020000000000L` are no longer supported, use `std.conv.octal!"20000000000L"` instead -fail_compilation/fail2656.d(28): Error: octal literals `0200000u` are no longer supported, use `std.conv.octal!"200000u"` instead -fail_compilation/fail2656.d(29): Error: octal literals `037777777777uL` are no longer supported, use `std.conv.octal!"37777777777uL"` instead -fail_compilation/fail2656.d(30): Error: octal literals `040000000000` are no longer supported, use `std.conv.octal!"40000000000"` instead -fail_compilation/fail2656.d(31): Error: octal literals `0777777777777777777777L` are no longer supported, use `std.conv.octal!"777777777777777777777L"` instead -fail_compilation/fail2656.d(32): Error: octal literals `077777u` are no longer supported, use `std.conv.octal!"77777u"` instead -fail_compilation/fail2656.d(33): Error: octal literals `077777uL` are no longer supported, use `std.conv.octal!"77777uL"` instead -fail_compilation/fail2656.d(34): Error: octal literals `077777uL` are no longer supported, use `std.conv.octal!"77777uL"` instead +fail_compilation/fail2656.d(49): Error: octal literals `0123` are no longer supported, use `std.conv.octal!"123"` instead +auto a = 0123; + ^ +fail_compilation/fail2656.d(50): Error: octal literals `01000000000000000000000` are no longer supported, use `std.conv.octal!"1000000000000000000000"` instead +auto b = 01000000000000000000000; + ^ +fail_compilation/fail2656.d(51): Error: octal literals `0100000L` are no longer supported, use `std.conv.octal!"100000L"` instead +auto c = 0100000L; + ^ +fail_compilation/fail2656.d(52): Error: octal literals `01777777777777777777777u` are no longer supported, use `std.conv.octal!"1777777777777777777777u"` instead +auto d = 01777777777777777777777u; + ^ +fail_compilation/fail2656.d(53): Error: octal literals `017777777777uL` are no longer supported, use `std.conv.octal!"17777777777uL"` instead +auto e = 017777777777uL; + ^ +fail_compilation/fail2656.d(54): Error: octal literals `0177777` are no longer supported, use `std.conv.octal!"177777"` instead +auto f = 0177777; + ^ +fail_compilation/fail2656.d(55): Error: octal literals `020000000000L` are no longer supported, use `std.conv.octal!"20000000000L"` instead +auto g = 020000000000L; + ^ +fail_compilation/fail2656.d(56): Error: octal literals `0200000u` are no longer supported, use `std.conv.octal!"200000u"` instead +auto h = 0200000u; + ^ +fail_compilation/fail2656.d(57): Error: octal literals `037777777777uL` are no longer supported, use `std.conv.octal!"37777777777uL"` instead +auto i = 037777777777uL; + ^ +fail_compilation/fail2656.d(58): Error: octal literals `040000000000` are no longer supported, use `std.conv.octal!"40000000000"` instead +auto j = 040000000000; + ^ +fail_compilation/fail2656.d(59): Error: octal literals `0777777777777777777777L` are no longer supported, use `std.conv.octal!"777777777777777777777L"` instead +auto k = 0777777777777777777777L; + ^ +fail_compilation/fail2656.d(60): Error: octal literals `077777u` are no longer supported, use `std.conv.octal!"77777u"` instead +auto l = 077777u; + ^ +fail_compilation/fail2656.d(61): Error: octal literals `077777uL` are no longer supported, use `std.conv.octal!"77777uL"` instead +auto m = 077777uL; + ^ +fail_compilation/fail2656.d(62): Error: octal literals `077777uL` are no longer supported, use `std.conv.octal!"77777uL"` instead +auto n = 0_7_7_7_7_7uL; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail267.d b/compiler/test/fail_compilation/fail267.d index fe0299404cf2..2dbeb595c2eb 100644 --- a/compiler/test/fail_compilation/fail267.d +++ b/compiler/test/fail_compilation/fail267.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail267.d(15): Error: template `Bar()` does not have property `foo` +fail_compilation/fail267.d(17): Error: template `Bar()` does not have property `foo` +typeof(C.Bar.foo) quux; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail27.d b/compiler/test/fail_compilation/fail27.d index 9279e0e51f31..63def72239fb 100644 --- a/compiler/test/fail_compilation/fail27.d +++ b/compiler/test/fail_compilation/fail27.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail27.d(15): Error: cannot implicitly convert expression `-32769` of type `int` to `short` -fail_compilation/fail27.d(16): Error: cannot implicitly convert expression `-129` of type `int` to `byte` -fail_compilation/fail27.d(17): Error: cannot implicitly convert expression `-1` of type `int` to `char` -fail_compilation/fail27.d(18): Error: cannot implicitly convert expression `65536` of type `int` to `wchar` -fail_compilation/fail27.d(19): Error: cannot implicitly convert expression `-1` of type `int` to `wchar` -fail_compilation/fail27.d(21): Error: cannot implicitly convert expression `-1` of type `int` to `dchar` +fail_compilation/fail27.d(27): Error: cannot implicitly convert expression `-32769` of type `int` to `short` + short a = -32769; // short.min-1 + ^ +fail_compilation/fail27.d(28): Error: cannot implicitly convert expression `-129` of type `int` to `byte` + byte b = -129; // byte.min-1 + ^ +fail_compilation/fail27.d(29): Error: cannot implicitly convert expression `-1` of type `int` to `char` + char c = -1; // char.min-1 + ^ +fail_compilation/fail27.d(30): Error: cannot implicitly convert expression `65536` of type `int` to `wchar` + wchar D = 65536; // wchar.max+1 + ^ +fail_compilation/fail27.d(31): Error: cannot implicitly convert expression `-1` of type `int` to `wchar` + wchar d = -1; // wchar.min-1 + ^ +fail_compilation/fail27.d(33): Error: cannot implicitly convert expression `-1` of type `int` to `dchar` + dchar e = -1; // dchar.min-1 + ^ --- */ diff --git a/compiler/test/fail_compilation/fail270.d b/compiler/test/fail_compilation/fail270.d index 188fab87ac05..40d091b8a940 100644 --- a/compiler/test/fail_compilation/fail270.d +++ b/compiler/test/fail_compilation/fail270.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail270.d(12): Error: string slice `[1 .. 0]` is out of bounds -fail_compilation/fail270.d(12): Error: mixin `fail270.Tuple!int.Tuple.Tuple!()` error instantiating -fail_compilation/fail270.d(14): Error: mixin `fail270.Tuple!int` error instantiating +fail_compilation/fail270.d(18): Error: string slice `[1 .. 0]` is out of bounds + mixin .Tuple!((TList[1 .. $])) tail; + ^ +fail_compilation/fail270.d(18): Error: mixin `fail270.Tuple!int.Tuple.Tuple!()` error instantiating + mixin .Tuple!((TList[1 .. $])) tail; + ^ +fail_compilation/fail270.d(20): Error: mixin `fail270.Tuple!int` error instantiating +mixin Tuple!(int); +^ --- */ diff --git a/compiler/test/fail_compilation/fail272.d b/compiler/test/fail_compilation/fail272.d index 508599a5dab9..d97c68cccd7d 100644 --- a/compiler/test/fail_compilation/fail272.d +++ b/compiler/test/fail_compilation/fail272.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail272.d(9): Error: circular reference to variable `fail272.Ins!(Ins).Ins` -fail_compilation/fail272.d(10): Error: template instance `fail272.Ins!(Ins)` error instantiating +fail_compilation/fail272.d(13): Error: circular reference to variable `fail272.Ins!(Ins).Ins` +template Ins(alias x) { const Ins = Ins!(Ins); } + ^ +fail_compilation/fail272.d(14): Error: template instance `fail272.Ins!(Ins)` error instantiating +alias Ins!(Ins) x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail273.d b/compiler/test/fail_compilation/fail273.d index bf93276b5477..c8a754a32e13 100644 --- a/compiler/test/fail_compilation/fail273.d +++ b/compiler/test/fail_compilation/fail273.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail273.d(10): Error: alias `fail273.b` recursive alias declaration +fail_compilation/fail273.d(12): Error: alias `fail273.b` recursive alias declaration +alias a b; +^ --- */ diff --git a/compiler/test/fail_compilation/fail2740.d b/compiler/test/fail_compilation/fail2740.d index 340be5281108..8fd11ba8c331 100644 --- a/compiler/test/fail_compilation/fail2740.d +++ b/compiler/test/fail_compilation/fail2740.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2740.d(17): Error: class `fail2740.Foo` ambiguous virtual function `foo` +fail_compilation/fail2740.d(19): Error: class `fail2740.Foo` ambiguous virtual function `foo` +class Foo : IFoo +^ --- */ interface IFoo diff --git a/compiler/test/fail_compilation/fail275.d b/compiler/test/fail_compilation/fail275.d index ba4bd75251f7..960e7420be63 100644 --- a/compiler/test/fail_compilation/fail275.d +++ b/compiler/test/fail_compilation/fail275.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail275.d(10): Error: circular reference to variable `fail275.C.x` +fail_compilation/fail275.d(12): Error: circular reference to variable `fail275.C.x` + const x = C.x; + ^ --- */ // REQUIRED_ARGS: -d diff --git a/compiler/test/fail_compilation/fail276.d b/compiler/test/fail_compilation/fail276.d index b5a99a9b9807..cc6f89901d57 100644 --- a/compiler/test/fail_compilation/fail276.d +++ b/compiler/test/fail_compilation/fail276.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail276.d(19): Error: `this` has no effect -fail_compilation/fail276.d(15): Error: cannot construct anonymous nested class because no implicit `this` reference to outer class is available +fail_compilation/fail276.d(23): Error: `this` has no effect + this.outer.outer; + ^ +fail_compilation/fail276.d(19): Error: cannot construct anonymous nested class because no implicit `this` reference to outer class is available + auto k = new class() + ^ --- */ diff --git a/compiler/test/fail_compilation/fail278.d b/compiler/test/fail_compilation/fail278.d index 39b4e4e5c269..d025e0b60bf8 100644 --- a/compiler/test/fail_compilation/fail278.d +++ b/compiler/test/fail_compilation/fail278.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail278.d(11): Error: template instance `NONEXISTENT!()` template `NONEXISTENT` is not defined -fail_compilation/fail278.d(12): Error: template instance `fail278.F!()` error instantiating -fail_compilation/fail278.d(13): instantiated from here: `Bar!(Foo)` +fail_compilation/fail278.d(17): Error: template instance `NONEXISTENT!()` template `NONEXISTENT` is not defined +template Foo() { mixin Id!(NONEXISTENT!()); } + ^ +fail_compilation/fail278.d(18): Error: template instance `fail278.F!()` error instantiating +template Bar(alias F) { const int Bar = F!(); } + ^ +fail_compilation/fail278.d(19): instantiated from here: `Bar!(Foo)` +alias Bar!(Foo) x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail279.d b/compiler/test/fail_compilation/fail279.d index 8fa7aa49efca..3bd6d88d3781 100644 --- a/compiler/test/fail_compilation/fail279.d +++ b/compiler/test/fail_compilation/fail279.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail279.d(14): Error: mixin `fail279.Template!0.Template!1.Template!2.Template!3.Template!4.Template!5.Template!6.Template!7.Template!8.Template!9.Template!10.Template!11.Template!12.Template!13.Template!14.Template!15.Template!16.Template!17.Template!18.Template!19.Template!20.Template!21.Template!22.Template!23.Template!24.Template!25.Template!26.Template!27.Template!28.Template!29.Template!30.Template!31.Template!32.Template!33.Template!34.Template!35.Template!36.Template!37.Template!38.Template!39.Template!40.Template!41.Template!42.Template!43.Template!44.Template!45.Template!46.Template!47.Template!48.Template!49.Template!50.Template!51.Template!52.Template!53.Template!54.Template!55.Template!56.Template!57.Template!58.Template!59.Template!60.Template!61.Template!62.Template!63.Template!64.Template!65.Template!66.Template!67.Template!68.Template!69.Template!70.Template!71.Template!72.Template!73.Template!74.Template!75.Template!76.Template!77.Template!78.Template!79.Template!80.Template!81.Template!82.Template!83.Template!84.Template!85.Template!86.Template!87.Template!88.Template!89.Template!90.Template!91.Template!92.Template!93.Template!94.Template!95.Template!96.Template!97.Template!98.Template!99.Template!100.Template!101.Template!102.Template!103.Template!104.Template!105.Template!106.Template!107.Template!108.Template!109.Template!110.Template!111.Template!112.Template!113.Template!114.Template!115.Template!116.Template!117.Template!118.Template!119.Template!120.Template!121.Template!122.Template!123.Template!124.Template!125.Template!126.Template!127.Template!128.Template!129.Template!130.Template!131.Template!132.Template!133.Template!134.Template!135.Template!136.Template!137.Template!138.Template!139.Template!140.Template!141.Template!142.Template!143.Template!144.Template!145.Template!146.Template!147.Template!148.Template!149.Template!150.Template!151.Template!152.Template!153.Template!154.Template!155.Template!156.Template!157.Template!158.Template!159.Template!160.Template!161.Template!162.Template!163.Template!164.Template!165.Template!166.Template!167.Template!168.Template!169.Template!170.Template!171.Template!172.Template!173.Template!174.Template!175.Template!176.Template!177.Template!178.Template!179.Template!180.Template!181.Template!182.Template!183.Template!184.Template!185.Template!186.Template!187.Template!188.Template!189.Template!190.Template!191.Template!192.Template!193.Template!194.Template!195.Template!196.Template!197.Template!198.Template!199.Template!200.Template!201.Template!202.Template!203.Template!204.Template!205.Template!206.Template!207.Template!208.Template!209.Template!210.Template!211.Template!212.Template!213.Template!214.Template!215.Template!216.Template!217.Template!218.Template!219.Template!220.Template!221.Template!222.Template!223.Template!224.Template!225.Template!226.Template!227.Template!228.Template!229.Template!230.Template!231.Template!232.Template!233.Template!234.Template!235.Template!236.Template!237.Template!238.Template!239.Template!240.Template!241.Template!242.Template!243.Template!244.Template!245.Template!246.Template!247.Template!248.Template!249.Template!250.Template!251.Template!252.Template!253.Template!254.Template!255.Template!256.Template!257.Template!258.Template!259.Template!260.Template!261.Template!262.Template!263.Template!264.Template!265.Template!266.Template!267.Template!268.Template!269.Template!270.Template!271.Template!272.Template!273.Template!274.Template!275.Template!276.Template!277.Template!278.Template!279.Template!280.Template!281.Template!282.Template!283.Template!284.Template!285.Template!286.Template!287.Template!288.Template!289.Template!290.Template!291.Template!292.Template!293.Template!294.Template!295.Template!296.Template!297.Template!298.Template!299.Template!300.Template!301.Template!302.Template!303.Template!304.Template!305.Template!306.Template!307.Template!308.Template!309.Template!310.Template!311.Template!312.Template!313.Template!314.Template!315.Template!316.Template!317.Template!318.Template!319.Template!320.Template!321.Template!322.Template!323.Template!324.Template!325.Template!326.Template!327.Template!328.Template!329.Template!330.Template!331.Template!332.Template!333.Template!334.Template!335.Template!336.Template!337.Template!338.Template!339.Template!340.Template!341.Template!342.Template!343.Template!344.Template!345.Template!346.Template!347.Template!348.Template!349.Template!350.Template!351.Template!352.Template!353.Template!354.Template!355.Template!356.Template!357.Template!358.Template!359.Template!360.Template!361.Template!362.Template!363.Template!364.Template!365.Template!366.Template!367.Template!368.Template!369.Template!370.Template!371.Template!372.Template!373.Template!374.Template!375.Template!376.Template!377.Template!378.Template!379.Template!380.Template!381.Template!382.Template!383.Template!384.Template!385.Template!386.Template!387.Template!388.Template!389.Template!390.Template!391.Template!392.Template!393.Template!394.Template!395.Template!396.Template!397.Template!398.Template!399.Template!400.Template!401.Template!402.Template!403.Template!404.Template!405.Template!406.Template!407.Template!408.Template!409.Template!410.Template!411.Template!412.Template!413.Template!414.Template!415.Template!416.Template!417.Template!418.Template!419.Template!420.Template!421.Template!422.Template!423.Template!424.Template!425.Template!426.Template!427.Template!428.Template!429.Template!430.Template!431.Template!432.Template!433.Template!434.Template!435.Template!436.Template!437.Template!438.Template!439.Template!440.Template!441.Template!442.Template!443.Template!444.Template!445.Template!446.Template!447.Template!448.Template!449.Template!450.Template!451.Template!452.Template!453.Template!454.Template!455.Template!456.Template!457.Template!458.Template!459.Template!460.Template!461.Template!462.Template!463.Template!464.Template!465.Template!466.Template!467.Template!468.Template!469.Template!470.Template!471.Template!472.Template!473.Template!474.Template!475.Template!476.Template!477.Template!478.Template!479.Template!480.Template!481.Template!482.Template!483.Template!484.Template!485.Template!486.Template!487.Template!488.Template!489.Template!490.Template!491.Template!492.Template!493.Template!494.Template!495.Template!496.Template!497.Template!498.Template!499.Template!500` recursive expansion +fail_compilation/fail279.d(16): Error: mixin `fail279.Template!0.Template!1.Template!2.Template!3.Template!4.Template!5.Template!6.Template!7.Template!8.Template!9.Template!10.Template!11.Template!12.Template!13.Template!14.Template!15.Template!16.Template!17.Template!18.Template!19.Template!20.Template!21.Template!22.Template!23.Template!24.Template!25.Template!26.Template!27.Template!28.Template!29.Template!30.Template!31.Template!32.Template!33.Template!34.Template!35.Template!36.Template!37.Template!38.Template!39.Template!40.Template!41.Template!42.Template!43.Template!44.Template!45.Template!46.Template!47.Template!48.Template!49.Template!50.Template!51.Template!52.Template!53.Template!54.Template!55.Template!56.Template!57.Template!58.Template!59.Template!60.Template!61.Template!62.Template!63.Template!64.Template!65.Template!66.Template!67.Template!68.Template!69.Template!70.Template!71.Template!72.Template!73.Template!74.Template!75.Template!76.Template!77.Template!78.Template!79.Template!80.Template!81.Template!82.Template!83.Template!84.Template!85.Template!86.Template!87.Template!88.Template!89.Template!90.Template!91.Template!92.Template!93.Template!94.Template!95.Template!96.Template!97.Template!98.Template!99.Template!100.Template!101.Template!102.Template!103.Template!104.Template!105.Template!106.Template!107.Template!108.Template!109.Template!110.Template!111.Template!112.Template!113.Template!114.Template!115.Template!116.Template!117.Template!118.Template!119.Template!120.Template!121.Template!122.Template!123.Template!124.Template!125.Template!126.Template!127.Template!128.Template!129.Template!130.Template!131.Template!132.Template!133.Template!134.Template!135.Template!136.Template!137.Template!138.Template!139.Template!140.Template!141.Template!142.Template!143.Template!144.Template!145.Template!146.Template!147.Template!148.Template!149.Template!150.Template!151.Template!152.Template!153.Template!154.Template!155.Template!156.Template!157.Template!158.Template!159.Template!160.Template!161.Template!162.Template!163.Template!164.Template!165.Template!166.Template!167.Template!168.Template!169.Template!170.Template!171.Template!172.Template!173.Template!174.Template!175.Template!176.Template!177.Template!178.Template!179.Template!180.Template!181.Template!182.Template!183.Template!184.Template!185.Template!186.Template!187.Template!188.Template!189.Template!190.Template!191.Template!192.Template!193.Template!194.Template!195.Template!196.Template!197.Template!198.Template!199.Template!200.Template!201.Template!202.Template!203.Template!204.Template!205.Template!206.Template!207.Template!208.Template!209.Template!210.Template!211.Template!212.Template!213.Template!214.Template!215.Template!216.Template!217.Template!218.Template!219.Template!220.Template!221.Template!222.Template!223.Template!224.Template!225.Template!226.Template!227.Template!228.Template!229.Template!230.Template!231.Template!232.Template!233.Template!234.Template!235.Template!236.Template!237.Template!238.Template!239.Template!240.Template!241.Template!242.Template!243.Template!244.Template!245.Template!246.Template!247.Template!248.Template!249.Template!250.Template!251.Template!252.Template!253.Template!254.Template!255.Template!256.Template!257.Template!258.Template!259.Template!260.Template!261.Template!262.Template!263.Template!264.Template!265.Template!266.Template!267.Template!268.Template!269.Template!270.Template!271.Template!272.Template!273.Template!274.Template!275.Template!276.Template!277.Template!278.Template!279.Template!280.Template!281.Template!282.Template!283.Template!284.Template!285.Template!286.Template!287.Template!288.Template!289.Template!290.Template!291.Template!292.Template!293.Template!294.Template!295.Template!296.Template!297.Template!298.Template!299.Template!300.Template!301.Template!302.Template!303.Template!304.Template!305.Template!306.Template!307.Template!308.Template!309.Template!310.Template!311.Template!312.Template!313.Template!314.Template!315.Template!316.Template!317.Template!318.Template!319.Template!320.Template!321.Template!322.Template!323.Template!324.Template!325.Template!326.Template!327.Template!328.Template!329.Template!330.Template!331.Template!332.Template!333.Template!334.Template!335.Template!336.Template!337.Template!338.Template!339.Template!340.Template!341.Template!342.Template!343.Template!344.Template!345.Template!346.Template!347.Template!348.Template!349.Template!350.Template!351.Template!352.Template!353.Template!354.Template!355.Template!356.Template!357.Template!358.Template!359.Template!360.Template!361.Template!362.Template!363.Template!364.Template!365.Template!366.Template!367.Template!368.Template!369.Template!370.Template!371.Template!372.Template!373.Template!374.Template!375.Template!376.Template!377.Template!378.Template!379.Template!380.Template!381.Template!382.Template!383.Template!384.Template!385.Template!386.Template!387.Template!388.Template!389.Template!390.Template!391.Template!392.Template!393.Template!394.Template!395.Template!396.Template!397.Template!398.Template!399.Template!400.Template!401.Template!402.Template!403.Template!404.Template!405.Template!406.Template!407.Template!408.Template!409.Template!410.Template!411.Template!412.Template!413.Template!414.Template!415.Template!416.Template!417.Template!418.Template!419.Template!420.Template!421.Template!422.Template!423.Template!424.Template!425.Template!426.Template!427.Template!428.Template!429.Template!430.Template!431.Template!432.Template!433.Template!434.Template!435.Template!436.Template!437.Template!438.Template!439.Template!440.Template!441.Template!442.Template!443.Template!444.Template!445.Template!446.Template!447.Template!448.Template!449.Template!450.Template!451.Template!452.Template!453.Template!454.Template!455.Template!456.Template!457.Template!458.Template!459.Template!460.Template!461.Template!462.Template!463.Template!464.Template!465.Template!466.Template!467.Template!468.Template!469.Template!470.Template!471.Template!472.Template!473.Template!474.Template!475.Template!476.Template!477.Template!478.Template!479.Template!480.Template!481.Template!482.Template!483.Template!484.Template!485.Template!486.Template!487.Template!488.Template!489.Template!490.Template!491.Template!492.Template!493.Template!494.Template!495.Template!496.Template!497.Template!498.Template!499.Template!500` recursive expansion + mixin Template!(i + 1); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail280.d b/compiler/test/fail_compilation/fail280.d index 95e6c23c435c..d1912eeb0fe9 100644 --- a/compiler/test/fail_compilation/fail280.d +++ b/compiler/test/fail_compilation/fail280.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail280.d(13): Error: template instance `fail280.t!500` recursive expansion exceeded allowed nesting limit +fail_compilation/fail280.d(15): Error: template instance `fail280.t!500` recursive expansion exceeded allowed nesting limit + const int x = t!(i + 1).x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail281.d b/compiler/test/fail_compilation/fail281.d index 3b9bcd70f1ba..e210eea0527f 100644 --- a/compiler/test/fail_compilation/fail281.d +++ b/compiler/test/fail_compilation/fail281.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail281.d(15): Error: template instance `fail281.foo!4294966795u` recursive expansion exceeded allowed nesting limit +fail_compilation/fail281.d(17): Error: template instance `fail281.foo!4294966795u` recursive expansion exceeded allowed nesting limit + const uint bar = foo!(i - 1).bar; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail282.d b/compiler/test/fail_compilation/fail282.d index a25aa5cf5319..78b5fc9d6f38 100644 --- a/compiler/test/fail_compilation/fail282.d +++ b/compiler/test/fail_compilation/fail282.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail282.d(13): Error: template instance `fail282.Template!500` recursive expansion exceeded allowed nesting limit +fail_compilation/fail282.d(15): Error: template instance `fail282.Template!500` recursive expansion exceeded allowed nesting limit + class Class : Template!(i + 1).Class + ^ --- */ diff --git a/compiler/test/fail_compilation/fail284.d b/compiler/test/fail_compilation/fail284.d index abfad6727010..df6f73c06ec2 100644 --- a/compiler/test/fail_compilation/fail284.d +++ b/compiler/test/fail_compilation/fail284.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail284.d(19): Error: `pure` function `fail284.foo` cannot call impure function pointer `a` +fail_compilation/fail284.d(21): Error: `pure` function `fail284.foo` cannot call impure function pointer `a` + return a(x); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail285.d b/compiler/test/fail_compilation/fail285.d index 82370143bf95..0f4b707b3371 100644 --- a/compiler/test/fail_compilation/fail285.d +++ b/compiler/test/fail_compilation/fail285.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail285.d(19): Error: with symbol `fail285.S.x` is shadowing local symbol `fail285.main.x` +fail_compilation/fail285.d(21): Error: with symbol `fail285.S.x` is shadowing local symbol `fail285.main.x` + x++; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail287.d b/compiler/test/fail_compilation/fail287.d index e5b1a79bb048..9b0c778e9a85 100644 --- a/compiler/test/fail_compilation/fail287.d +++ b/compiler/test/fail_compilation/fail287.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail287.d(14): Error: had 300 cases which is more than 257 cases in case range +fail_compilation/fail287.d(16): Error: had 300 cases which is more than 257 cases in case range + case 1: .. case 300: + ^ --- */ diff --git a/compiler/test/fail_compilation/fail288.d b/compiler/test/fail_compilation/fail288.d index 4fdaddd1df13..d24a00dfb572 100644 --- a/compiler/test/fail_compilation/fail288.d +++ b/compiler/test/fail_compilation/fail288.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail288.d(14): Error: case ranges not allowed in `final switch` +fail_compilation/fail288.d(16): Error: case ranges not allowed in `final switch` + case E.a: .. case E.b: + ^ --- */ diff --git a/compiler/test/fail_compilation/fail289.d b/compiler/test/fail_compilation/fail289.d index b1d0882edca1..8f1b1dee4249 100644 --- a/compiler/test/fail_compilation/fail289.d +++ b/compiler/test/fail_compilation/fail289.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail289.d(12): Error: cannot cast from function pointer to delegate +fail_compilation/fail289.d(14): Error: cannot cast from function pointer to delegate + Dg d = cast(void delegate())&fun; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail290.d b/compiler/test/fail_compilation/fail290.d index 2d735815d586..a8481e17cfe8 100644 --- a/compiler/test/fail_compilation/fail290.d +++ b/compiler/test/fail_compilation/fail290.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail290.d(15): Error: no `this` to create delegate for `foo` +fail_compilation/fail290.d(17): Error: no `this` to create delegate for `foo` + void delegate (int) a = &Foo.foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail291.d b/compiler/test/fail_compilation/fail291.d index e8d9f3778f9c..4d59392eea83 100644 --- a/compiler/test/fail_compilation/fail291.d +++ b/compiler/test/fail_compilation/fail291.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail291.d(9): Error: variable `fail291.X` cannot be declared to be a function +fail_compilation/fail291.d(11): Error: variable `fail291.X` cannot be declared to be a function +typeof(a) X; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail296.d b/compiler/test/fail_compilation/fail296.d index 920854f0bf0d..5ef5dc9069ea 100644 --- a/compiler/test/fail_compilation/fail296.d +++ b/compiler/test/fail_compilation/fail296.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail296.d(10): Error: can only `*` a pointer, not a `int` +fail_compilation/fail296.d(12): Error: can only `*` a pointer, not a `int` +void main(){ *1; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail2962.d b/compiler/test/fail_compilation/fail2962.d index 59e86c1e17c7..6163056c37d2 100644 --- a/compiler/test/fail_compilation/fail2962.d +++ b/compiler/test/fail_compilation/fail2962.d @@ -4,9 +4,20 @@ /* TEST_OUTPUT: --- -fail_compilation/fail2962.d(14): Error: variable `y` cannot be read at compile time -fail_compilation/fail2962.d(14): while looking for match for `baz6!(int, y)` -fail_compilation/fail2962.d(22): Error: template instance `fail2962.bar6!int` error instantiating +fail_compilation/fail2962.d(25): Error: variable `y` cannot be read at compile time + return baz6!(T, y)(); + ^ +fail_compilation/fail2962.d(25): while looking for match for `baz6!(int, y)` +fail_compilation/fail2962.d(33): Error: template instance `fail2962.bar6!int` error instantiating + assert(bar6(4) != 0); + ^ +fail_compilation/fail2962.d(38): Error: variable `x` cannot be read at compile time + return baz4!(T, x)(); + ^ +fail_compilation/fail2962.d(38): while looking for match for `baz4!(int, x)` +fail_compilation/imports/fail2962a.d(6): Error: template instance `fail2962.bar4!int` error instantiating + return bar4(0); + ^ --- */ T bar6(T)(T y) @@ -22,15 +33,6 @@ void test6() assert(bar6(4) != 0); } -// comment 4 -/* -TEST_OUTPUT: ---- -fail_compilation/fail2962.d(36): Error: variable `x` cannot be read at compile time -fail_compilation/fail2962.d(36): while looking for match for `baz4!(int, x)` -fail_compilation/imports/fail2962a.d(6): Error: template instance `fail2962.bar4!int` error instantiating ---- -*/ T bar4(T)(T x) { return baz4!(T, x)(); diff --git a/compiler/test/fail_compilation/fail297.d b/compiler/test/fail_compilation/fail297.d index 5fc3bbf8e575..05d426846a7e 100644 --- a/compiler/test/fail_compilation/fail297.d +++ b/compiler/test/fail_compilation/fail297.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail297.d(30): Error: incompatible types for `(Bar()) + (baz())`: `Bar` and `const(Bar)` +fail_compilation/fail297.d(32): Error: incompatible types for `(Bar()) + (baz())`: `Bar` and `const(Bar)` + Bar result = Bar() + baz(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail298.d b/compiler/test/fail_compilation/fail298.d index aa4f9e84ee71..84071348be3b 100644 --- a/compiler/test/fail_compilation/fail298.d +++ b/compiler/test/fail_compilation/fail298.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail298.d(12): Error: cannot implicitly convert expression `num1 / cast(ulong)num2` of type `ulong` to `int` +fail_compilation/fail298.d(14): Error: cannot implicitly convert expression `num1 / cast(ulong)num2` of type `ulong` to `int` + int result = num1 / num2; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail299.d b/compiler/test/fail_compilation/fail299.d index 832a9a8d193c..42b31e13f7c5 100644 --- a/compiler/test/fail_compilation/fail299.d +++ b/compiler/test/fail_compilation/fail299.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail299.d(14): Error: initializer provided for struct `Foo` with no fields +fail_compilation/fail299.d(16): Error: initializer provided for struct `Foo` with no fields + foo(Foo(1), (){}); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3.d b/compiler/test/fail_compilation/fail3.d index 5c1ea9178bdf..73f6cefcb099 100644 --- a/compiler/test/fail_compilation/fail3.d +++ b/compiler/test/fail_compilation/fail3.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3.d(41): Error: incompatible types for `(a) + (b)`: both operands are of type `vec2` +fail_compilation/fail3.d(43): Error: incompatible types for `(a) + (b)`: both operands are of type `vec2` + a = a + b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail301.d b/compiler/test/fail_compilation/fail301.d index f527819559a7..d5baeb596611 100644 --- a/compiler/test/fail_compilation/fail301.d +++ b/compiler/test/fail_compilation/fail301.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail301.d(11): Error: accessing non-static variable `guard` requires an instance of `bug3305b` -fail_compilation/fail301.d(22): Error: template instance `fail301.bug3305!0` error instantiating +fail_compilation/fail301.d(15): Error: accessing non-static variable `guard` requires an instance of `bug3305b` + auto guard = bug3305b!(0).guard; + ^ +fail_compilation/fail301.d(26): Error: template instance `fail301.bug3305!0` error instantiating + bug3305!(0) a; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail302.d b/compiler/test/fail_compilation/fail302.d index d1133b0eef09..4262b679f277 100644 --- a/compiler/test/fail_compilation/fail302.d +++ b/compiler/test/fail_compilation/fail302.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail302.d(23): Error: cannot implicitly convert expression `1` of type `int` to `Bar` -fail_compilation/fail302.d(23): `bar = 1` is the first assignment of `bar` therefore it represents its initialization -fail_compilation/fail302.d(23): `opAssign` methods are not used for initialization, but for subsequent assignments +fail_compilation/fail302.d(27): Error: cannot implicitly convert expression `1` of type `int` to `Bar` + Bar bar = 1; // disallow because construction is not assignment + ^ +fail_compilation/fail302.d(27): `bar = 1` is the first assignment of `bar` therefore it represents its initialization + Bar bar = 1; // disallow because construction is not assignment + ^ +fail_compilation/fail302.d(27): `opAssign` methods are not used for initialization, but for subsequent assignments --- */ diff --git a/compiler/test/fail_compilation/fail303.d b/compiler/test/fail_compilation/fail303.d index 2c825fe34352..4159312e74ad 100644 --- a/compiler/test/fail_compilation/fail303.d +++ b/compiler/test/fail_compilation/fail303.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/fail303.d(18): Deprecation: use of imaginary type `ireal` is deprecated, use `real` instead -fail_compilation/fail303.d(20): Error: `double /= cdouble` is undefined. Did you mean `double /= cdouble.re`? -fail_compilation/fail303.d(21): Error: `ireal *= ireal` is an undefined operation -fail_compilation/fail303.d(22): Error: `ireal *= creal` is undefined. Did you mean `ireal *= creal.im`? -fail_compilation/fail303.d(23): Error: `ireal %= creal` is undefined. Did you mean `ireal %= creal.im`? -fail_compilation/fail303.d(24): Error: `ireal += real` is undefined (result is complex) -fail_compilation/fail303.d(25): Error: `ireal -= creal` is undefined (result is complex) -fail_compilation/fail303.d(26): Error: `double -= idouble` is undefined (result is complex) +fail_compilation/fail303.d(34): Deprecation: use of imaginary type `ireal` is deprecated, use `real` instead + ireal x = 3.0i; + ^ +fail_compilation/fail303.d(36): Error: `double /= cdouble` is undefined. Did you mean `double /= cdouble.re`? + y /= 2.0 + 6i; + ^ +fail_compilation/fail303.d(37): Error: `ireal *= ireal` is an undefined operation + x *= 7.0i; + ^ +fail_compilation/fail303.d(38): Error: `ireal *= creal` is undefined. Did you mean `ireal *= creal.im`? + x *= 3.0i + 2; + ^ +fail_compilation/fail303.d(39): Error: `ireal %= creal` is undefined. Did you mean `ireal %= creal.im`? + x %= (2 + 6.0i); + ^ +fail_compilation/fail303.d(40): Error: `ireal += real` is undefined (result is complex) + x += 2.0; + ^ +fail_compilation/fail303.d(41): Error: `ireal -= creal` is undefined (result is complex) + x -= 1 + 4i; + ^ +fail_compilation/fail303.d(42): Error: `double -= idouble` is undefined (result is complex) + y -= 3.0i; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail304.d b/compiler/test/fail_compilation/fail304.d index 29f2c18e3128..8b77c7450006 100644 --- a/compiler/test/fail_compilation/fail304.d +++ b/compiler/test/fail_compilation/fail304.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail304.d(15): Error: cannot cast expression `foo()` of type `Small` to `Large` because of different sizes +fail_compilation/fail304.d(17): Error: cannot cast expression `foo()` of type `Small` to `Large` because of different sizes + l = cast(Large)foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail305.d b/compiler/test/fail_compilation/fail305.d index aef1624a07ca..aa44b7ca331b 100644 --- a/compiler/test/fail_compilation/fail305.d +++ b/compiler/test/fail_compilation/fail305.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail305.d(10): Error: cannot return non-void from `void` function +fail_compilation/fail305.d(12): Error: cannot return non-void from `void` function + return "a"; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail306.d b/compiler/test/fail_compilation/fail306.d index ffe3cf745189..a7e4f2c87cf2 100644 --- a/compiler/test/fail_compilation/fail306.d +++ b/compiler/test/fail_compilation/fail306.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail306.d(11): Error: cannot perform array operations on `void[]` arrays +fail_compilation/fail306.d(13): Error: cannot perform array operations on `void[]` arrays + x[] = -x[]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail307.d b/compiler/test/fail_compilation/fail307.d index e871dbff06be..fc46d147f750 100644 --- a/compiler/test/fail_compilation/fail307.d +++ b/compiler/test/fail_compilation/fail307.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail307.d(11): Error: cannot implicitly convert expression `cast(int)(cast(double)cast(int)b + 6.1)` of type `int` to `short` +fail_compilation/fail307.d(13): Error: cannot implicitly convert expression `cast(int)(cast(double)cast(int)b + 6.1)` of type `int` to `short` + short c5 = cast(int)(b + 6.1); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail308.d b/compiler/test/fail_compilation/fail308.d index 603fe51db7b0..7e0585d17691 100644 --- a/compiler/test/fail_compilation/fail308.d +++ b/compiler/test/fail_compilation/fail308.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail308.d(18): Error: template instance `object.RTInfo!(TestType)` recursive expansion +fail_compilation/fail308.d(20): Error: template instance `object.RTInfo!(TestType)` recursive expansion + struct TestType {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail309.d b/compiler/test/fail_compilation/fail309.d index 0fbfd590f9e0..e04785676ac3 100644 --- a/compiler/test/fail_compilation/fail309.d +++ b/compiler/test/fail_compilation/fail309.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail309.d(10): Error: circular reference to variable `fail309.S.x` +fail_compilation/fail309.d(12): Error: circular reference to variable `fail309.S.x` + const x = S.x; + ^ --- */ // REQUIRED_ARGS: -d diff --git a/compiler/test/fail_compilation/fail310.d b/compiler/test/fail_compilation/fail310.d index 5b3c99ae6560..f5ca9c67b372 100644 --- a/compiler/test/fail_compilation/fail310.d +++ b/compiler/test/fail_compilation/fail310.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail310.d(10): Error: undefined identifier `Foo`, did you mean function `foo`? -fail_compilation/fail310.d(14): Error: template instance `fail310.foo!(1, 2)` error instantiating -fail_compilation/fail310.d(14): while evaluating: `static assert(foo!(1, 2)())` +fail_compilation/fail310.d(16): Error: undefined identifier `Foo`, did you mean function `foo`? +Foo foo(A...)() + ^ +fail_compilation/fail310.d(20): Error: template instance `fail310.foo!(1, 2)` error instantiating +static assert(foo!(1, 2)()); + ^ +fail_compilation/fail310.d(20): while evaluating: `static assert(foo!(1, 2)())` +static assert(foo!(1, 2)()); +^ --- */ diff --git a/compiler/test/fail_compilation/fail311.d b/compiler/test/fail_compilation/fail311.d index eaacfabf6a6c..43dea1150bd8 100644 --- a/compiler/test/fail_compilation/fail311.d +++ b/compiler/test/fail_compilation/fail311.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail311.d(16): Error: undefined identifier `undefined` -fail_compilation/fail311.d(25): Error: template instance `fail311.foo!()` error instantiating +fail_compilation/fail311.d(20): Error: undefined identifier `undefined` + undefined x; + ^ +fail_compilation/fail311.d(29): Error: template instance `fail311.foo!()` error instantiating + foo!()(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail312.d b/compiler/test/fail_compilation/fail312.d index 7260697e0ab0..9a5b9c6643e0 100644 --- a/compiler/test/fail_compilation/fail312.d +++ b/compiler/test/fail_compilation/fail312.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail312.d(13): Error: incompatible types for `(a[]) == (b)`: `int[]` and `short` -fail_compilation/fail312.d(14): Error: incompatible types for `(a[]) <= (b)`: `int[]` and `short` +fail_compilation/fail312.d(17): Error: incompatible types for `(a[]) == (b)`: `int[]` and `short` + assert(a[] == b); + ^ +fail_compilation/fail312.d(18): Error: incompatible types for `(a[]) <= (b)`: `int[]` and `short` + assert(a[] <= b); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail313.d b/compiler/test/fail_compilation/fail313.d index 3a2c7eca5078..862f04472fe7 100644 --- a/compiler/test/fail_compilation/fail313.d +++ b/compiler/test/fail_compilation/fail313.d @@ -2,9 +2,15 @@ EXTRA_FILES: imports/a313.d imports/b313.d imports/pkg313/package.d TEST_OUTPUT: --- -fail_compilation/fail313.d(16): Error: undefined identifier `b313` in package `imports`, perhaps add `static import imports.b313;` -fail_compilation/fail313.d(23): Error: undefined identifier `core` -fail_compilation/fail313.d(28): Error: undefined identifier `pkg313` in package `imports`, perhaps add `static import imports.pkg313;` +fail_compilation/fail313.d(22): Error: undefined identifier `b313` in package `imports`, perhaps add `static import imports.b313;` + imports.b313.bug(); + ^ +fail_compilation/fail313.d(29): Error: undefined identifier `core` + core.stdc.stdio.printf(""); + ^ +fail_compilation/fail313.d(34): Error: undefined identifier `pkg313` in package `imports`, perhaps add `static import imports.pkg313;` + imports.pkg313.bug(); + ^ --- */ module test313; diff --git a/compiler/test/fail_compilation/fail3144.d b/compiler/test/fail_compilation/fail3144.d index ff01a032d7b6..dc4cb0d21d0b 100644 --- a/compiler/test/fail_compilation/fail3144.d +++ b/compiler/test/fail_compilation/fail3144.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3144.d(12): Error: `break` is not inside a loop or `switch` -fail_compilation/fail3144.d(15): Error: `break` is not inside a loop or `switch` +fail_compilation/fail3144.d(16): Error: `break` is not inside a loop or `switch` + default: {} break; + ^ +fail_compilation/fail3144.d(19): Error: `break` is not inside a loop or `switch` + case 1: {} break; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail315.d b/compiler/test/fail_compilation/fail315.d index 1a7e0f35f911..cd40ad3d2a82 100644 --- a/compiler/test/fail_compilation/fail315.d +++ b/compiler/test/fail_compilation/fail315.d @@ -1,14 +1,16 @@ /* TEST_OUTPUT: --- -fail_compilation/fail315.d-mixin-17(17): Error: found `;` when expecting `,` -fail_compilation/fail315.d-mixin-17(17): Error: expression expected, not `}` -fail_compilation/fail315.d-mixin-17(17): Error: found `End of File` when expecting `,` -fail_compilation/fail315.d-mixin-17(17): Error: found `End of File` when expecting `]` -fail_compilation/fail315.d-mixin-17(17): Error: found `End of File` when expecting `;` following `return` statement -fail_compilation/fail315.d-mixin-17(17): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/fail315.d-mixin-17(17): unmatched `{` -fail_compilation/fail315.d(22): Error: template instance `fail315.foo!()` error instantiating +fail_compilation/fail315.d-mixin-19(19): Error: found `;` when expecting `,` +fail_compilation/fail315.d-mixin-19(19): Error: expression expected, not `}` +fail_compilation/fail315.d-mixin-19(19): Error: found `End of File` when expecting `,` +fail_compilation/fail315.d-mixin-19(19): Error: found `End of File` when expecting `]` +fail_compilation/fail315.d-mixin-19(19): Error: found `End of File` when expecting `;` following `return` statement +fail_compilation/fail315.d-mixin-19(19): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/fail315.d-mixin-19(19): unmatched `{` +fail_compilation/fail315.d(24): Error: template instance `fail315.foo!()` error instantiating + foo!()(0); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3150.d b/compiler/test/fail_compilation/fail3150.d index 5ca758c85781..76999e2c9fd5 100644 --- a/compiler/test/fail_compilation/fail3150.d +++ b/compiler/test/fail_compilation/fail3150.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3150.d(10): Error: cannot cast expression `[1, 2]` of type `int[]` to `ulong` +fail_compilation/fail3150.d(12): Error: cannot cast expression `[1, 2]` of type `int[]` to `ulong` + ulong u = cast(ulong)[1,2]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail316.d b/compiler/test/fail_compilation/fail316.d index ab4077cd2ff1..53c8c8c005e8 100644 --- a/compiler/test/fail_compilation/fail316.d +++ b/compiler/test/fail_compilation/fail316.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail316.d(17): Error: mixin `fail316.foo.BadImpl!(uint, Mix1)` cannot resolve forward reference +fail_compilation/fail316.d(19): Error: mixin `fail316.foo.BadImpl!(uint, Mix1)` cannot resolve forward reference + mixin BadImpl!(uint,Mix1) Mix1; + ^ --- */ template BadImpl(T, alias thename) diff --git a/compiler/test/fail_compilation/fail317.d b/compiler/test/fail_compilation/fail317.d index d6a0f4d6e8b6..48d6a425b5bf 100644 --- a/compiler/test/fail_compilation/fail317.d +++ b/compiler/test/fail_compilation/fail317.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail317.d(10): Error: function `fail317.I.f` has no function body with return type inference +fail_compilation/fail317.d(12): Error: function `fail317.I.f` has no function body with return type inference + auto f() + ^ --- */ diff --git a/compiler/test/fail_compilation/fail318_b.d b/compiler/test/fail_compilation/fail318_b.d index efbf45bdc2e9..dcd3a456034b 100644 --- a/compiler/test/fail_compilation/fail318_b.d +++ b/compiler/test/fail_compilation/fail318_b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail318_b.d(8): Error: function `D main` must return `int`, `void` or `noreturn`, not `string` +fail_compilation/fail318_b.d(10): Error: function `D main` must return `int`, `void` or `noreturn`, not `string` +auto main() + ^ --- */ diff --git a/compiler/test/fail_compilation/fail319.d b/compiler/test/fail_compilation/fail319.d index cf56feecc53f..985adb3f6a03 100644 --- a/compiler/test/fail_compilation/fail319.d +++ b/compiler/test/fail_compilation/fail319.d @@ -1,10 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail319.d(16): Error: template instance `fail319.f!(int, int)` does not match template declaration `f(T...)()` +fail_compilation/fail319.d(18): Error: template instance `fail319.f!(int, int)` does not match template declaration `f(T...)()` with `T = (int, int)` must satisfy the following constraint: ` T.length > 20` + f!(int, int)(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail320.d b/compiler/test/fail_compilation/fail320.d index 31dd06526870..72ed0b4f2a68 100644 --- a/compiler/test/fail_compilation/fail320.d +++ b/compiler/test/fail_compilation/fail320.d @@ -2,12 +2,22 @@ EXTRA_FILES: imports/fail320a.d imports/fail320b.d TEST_OUTPUT: --- -fail_compilation/fail320.d(16): Error: no overload matches for `foo("")` -fail_compilation/fail320.d(16): Candidates are: +fail_compilation/fail320.d(26): Error: no overload matches for `foo("")` +void main() { foo(""); } + ^ +fail_compilation/fail320.d(26): Candidates are: fail_compilation/imports/fail320b.d(1): foo(T)(string) +void foo(T)(string){} + ^ fail_compilation/imports/fail320b.d(2): foo(alias a)() +void foo(alias a)(){} + ^ fail_compilation/imports/fail320a.d(1): foo(int) +void foo(int) { } + ^ fail_compilation/imports/fail320a.d(2): foo(bool) +void foo(bool) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail322.d b/compiler/test/fail_compilation/fail322.d index faaab68a6ee7..54d4e2f2f67c 100644 --- a/compiler/test/fail_compilation/fail322.d +++ b/compiler/test/fail_compilation/fail322.d @@ -1,12 +1,20 @@ /* TEST_OUTPUT: ---- -fail_compilation/fail322.d(15): Error: function `digestToString2` is not callable using argument types `(string)` -fail_compilation/fail322.d(15): cannot pass rvalue argument `"1234567890123456"` of type `string` to parameter `ref char[16] digest` -fail_compilation/fail322.d(20): `fail322.digestToString2(ref char[16] digest)` declared here -fail_compilation/fail322.d(17): Error: function `digestToString2` is not callable using argument types `(const(char[16]))` -fail_compilation/fail322.d(17): cannot pass argument `s` of type `const(char[16])` to parameter `ref char[16] digest` -fail_compilation/fail322.d(20): `fail322.digestToString2(ref char[16] digest)` declared here +fail_compilation/fail322.d(23): Error: function `digestToString2` is not callable using argument types `(string)` + digestToString2("1234567890123456"); + ^ +fail_compilation/fail322.d(23): cannot pass rvalue argument `"1234567890123456"` of type `string` to parameter `ref char[16] digest` +fail_compilation/fail322.d(28): `fail322.digestToString2(ref char[16] digest)` declared here +void digestToString2(ref char[16] digest) + ^ +fail_compilation/fail322.d(25): Error: function `digestToString2` is not callable using argument types `(const(char[16]))` + digestToString2(s); + ^ +fail_compilation/fail322.d(25): cannot pass argument `s` of type `const(char[16])` to parameter `ref char[16] digest` +fail_compilation/fail322.d(28): `fail322.digestToString2(ref char[16] digest)` declared here +void digestToString2(ref char[16] digest) + ^ ---- */ diff --git a/compiler/test/fail_compilation/fail325.d b/compiler/test/fail_compilation/fail325.d index bf7f305b1970..5b8c148ad800 100644 --- a/compiler/test/fail_compilation/fail325.d +++ b/compiler/test/fail_compilation/fail325.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail325.d(12): Error: template `fun(T = int)(int w, int z)` has no type +fail_compilation/fail325.d(14): Error: template `fun(T = int)(int w, int z)` has no type + auto x = cast(void function(int, int))fun; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail327.d b/compiler/test/fail_compilation/fail327.d index 6d387fe6c0e8..90e7593e055b 100644 --- a/compiler/test/fail_compilation/fail327.d +++ b/compiler/test/fail_compilation/fail327.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail327.d(11): Error: `asm` statement is assumed to be `@system` - mark it with `@trusted` if it is not -fail_compilation/fail327.d(12): Deprecation: `asm` statement cannot be marked `@safe`, use `@system` or `@trusted` instead +fail_compilation/fail327.d(15): Error: `asm` statement is assumed to be `@system` - mark it with `@trusted` if it is not + asm { xor EAX,EAX; } + ^ +fail_compilation/fail327.d(16): Deprecation: `asm` statement cannot be marked `@safe`, use `@system` or `@trusted` instead + asm @safe + ^ --- */ diff --git a/compiler/test/fail_compilation/fail328.d b/compiler/test/fail_compilation/fail328.d index 12347e579097..65c807b05f31 100644 --- a/compiler/test/fail_compilation/fail328.d +++ b/compiler/test/fail_compilation/fail328.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail328.d(13): Error: `@safe` function `fail328.foo` cannot call `@system` function `fail328.bar` -fail_compilation/fail328.d(9): `fail328.bar` is declared here +fail_compilation/fail328.d(17): Error: `@safe` function `fail328.foo` cannot call `@system` function `fail328.bar` + bar(); + ^ +fail_compilation/fail328.d(13): `fail328.bar` is declared here +void bar(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail329.d b/compiler/test/fail_compilation/fail329.d index 95aaaf445a9f..b6cf76957a69 100644 --- a/compiler/test/fail_compilation/fail329.d +++ b/compiler/test/fail_compilation/fail329.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail329.d(28): Error: variable `fail329.A.foo.__ensure.result` cannot modify result `result` in contract +fail_compilation/fail329.d(30): Error: variable `fail329.A.foo.__ensure.result` cannot modify result `result` in contract + result++; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3290.d b/compiler/test/fail_compilation/fail3290.d index 2b6bbac3f19f..6cc5af055ad0 100644 --- a/compiler/test/fail_compilation/fail3290.d +++ b/compiler/test/fail_compilation/fail3290.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3290.d(12): Error: argument type mismatch, `const(int)` to `ref int` +fail_compilation/fail3290.d(14): Error: argument type mismatch, `const(int)` to `ref int` + foreach (ref int i; array) { + ^ --- */ diff --git a/compiler/test/fail_compilation/fail330.d b/compiler/test/fail_compilation/fail330.d index 94e91bbad3c9..690aa675371c 100644 --- a/compiler/test/fail_compilation/fail330.d +++ b/compiler/test/fail_compilation/fail330.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail330.d(9): Error: variable `fail330.fun.result` cannot modify result `result` in contract +fail_compilation/fail330.d(11): Error: variable `fail330.fun.result` cannot modify result `result` in contract +out(result) { result = 2; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail331.d b/compiler/test/fail_compilation/fail331.d index 7f978016e410..08f688cc9ea9 100644 --- a/compiler/test/fail_compilation/fail331.d +++ b/compiler/test/fail_compilation/fail331.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail331.d(10): Error: cannot use `typeof(return)` inside function `foo` with inferred return type +fail_compilation/fail331.d(12): Error: cannot use `typeof(return)` inside function `foo` with inferred return type + typeof(return) result; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail333.d b/compiler/test/fail_compilation/fail333.d index 89f9478f1757..63aa289989e9 100644 --- a/compiler/test/fail_compilation/fail333.d +++ b/compiler/test/fail_compilation/fail333.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail333.d(8): Error: forward reference to `test` +fail_compilation/fail333.d(10): Error: forward reference to `test` +void test(typeof(test) p) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail334.d b/compiler/test/fail_compilation/fail334.d index 4cab7d3b56c4..3d4c0dc5258d 100644 --- a/compiler/test/fail_compilation/fail334.d +++ b/compiler/test/fail_compilation/fail334.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail334.d(10): Error: properties can only have zero, one, or two parameter +fail_compilation/fail334.d(12): Error: properties can only have zero, one, or two parameter + @property int foo(int a, int b, int c) { return 1; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail335.d b/compiler/test/fail_compilation/fail335.d index 1800cd065b76..c2775a6b4ae8 100644 --- a/compiler/test/fail_compilation/fail335.d +++ b/compiler/test/fail_compilation/fail335.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail335.d(9): Error: cannot overload both property and non-property functions +fail_compilation/fail335.d(11): Error: cannot overload both property and non-property functions +@property void foo(int); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail336.d b/compiler/test/fail_compilation/fail336.d index 9df207120b36..fb362766a5ae 100644 --- a/compiler/test/fail_compilation/fail336.d +++ b/compiler/test/fail_compilation/fail336.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail336.d(16): Error: struct `S` has constructors, cannot use `{ initializers }`, use `S( initializers )` instead +fail_compilation/fail336.d(18): Error: struct `S` has constructors, cannot use `{ initializers }`, use `S( initializers )` instead +S s = { 1 }; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail337.d b/compiler/test/fail_compilation/fail337.d index 0a411e65f401..9e1358aa1fcf 100644 --- a/compiler/test/fail_compilation/fail337.d +++ b/compiler/test/fail_compilation/fail337.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail337.d(13): Error: static assert: `0` is false -fail_compilation/fail337.d(26): instantiated from here: `bar!()` -fail_compilation/fail337.d(33): 100 recursive instantiations from here: `foo!196` -fail_compilation/fail337.d(41): 253 recursive instantiations from here: `baz!300` +fail_compilation/fail337.d(21): Error: static assert: `0` is false + static assert(0); + ^ +fail_compilation/fail337.d(34): instantiated from here: `bar!()` + alias bar!() foo; + ^ +fail_compilation/fail337.d(41): 100 recursive instantiations from here: `foo!196` + alias foo!(M * 4) baz; + ^ +fail_compilation/fail337.d(49): 253 recursive instantiations from here: `baz!300` + int x = baz!(300); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail34.d b/compiler/test/fail_compilation/fail34.d index 7a3c8071867d..733ff8536090 100644 --- a/compiler/test/fail_compilation/fail34.d +++ b/compiler/test/fail_compilation/fail34.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail34.d(31): Error: duplicate `case "123"` in `switch` statement +fail_compilation/fail34.d(33): Error: duplicate `case "123"` in `switch` statement + case "123": + ^ --- */ diff --git a/compiler/test/fail_compilation/fail340.d b/compiler/test/fail_compilation/fail340.d index 3d83e6896ed8..84f070df983c 100644 --- a/compiler/test/fail_compilation/fail340.d +++ b/compiler/test/fail_compilation/fail340.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail340.d(18): Error: variable `fail340.w` of type struct `const(CopyTest)` uses `this(this)`, which is not allowed in static initialization -fail_compilation/fail340.d(19): while evaluating: `static assert(w.x == 55.0)` +fail_compilation/fail340.d(22): Error: variable `fail340.w` of type struct `const(CopyTest)` uses `this(this)`, which is not allowed in static initialization +const CopyTest w = z; + ^ +fail_compilation/fail340.d(23): while evaluating: `static assert(w.x == 55.0)` +static assert(w.x == 55.0); +^ --- */ diff --git a/compiler/test/fail_compilation/fail341.d b/compiler/test/fail_compilation/fail341.d index 38bb6dcbc61f..b821aa24c988 100644 --- a/compiler/test/fail_compilation/fail341.d +++ b/compiler/test/fail_compilation/fail341.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail341.d(26): Error: struct `fail341.S` is not copyable because field `t` is not copyable -fail_compilation/fail341.d(27): Error: function `fail341.foo` cannot be used because it is annotated with `@disable` +fail_compilation/fail341.d(30): Error: struct `fail341.S` is not copyable because field `t` is not copyable + auto t = s; + ^ +fail_compilation/fail341.d(31): Error: function `fail341.foo` cannot be used because it is annotated with `@disable` + foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail343.d b/compiler/test/fail_compilation/fail343.d index 5b7e9bfac619..8a05980e6d4c 100644 --- a/compiler/test/fail_compilation/fail343.d +++ b/compiler/test/fail_compilation/fail343.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail343.d(22): Error: function `fail343.TimedApp.run` cannot override `final` function `I.fail343.Timer.run` -fail_compilation/fail343.d(22): Error: function `fail343.TimedApp.run` cannot override `final` function `Application.fail343.Application.run` +fail_compilation/fail343.d(26): Error: function `fail343.TimedApp.run` cannot override `final` function `I.fail343.Timer.run` + void run() { } + ^ +fail_compilation/fail343.d(26): Error: function `fail343.TimedApp.run` cannot override `final` function `Application.fail343.Application.run` + void run() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail344.d b/compiler/test/fail_compilation/fail344.d index f395392a8e7b..1b7446cc708b 100644 --- a/compiler/test/fail_compilation/fail344.d +++ b/compiler/test/fail_compilation/fail344.d @@ -2,13 +2,27 @@ /* TEST_OUTPUT: --- -fail_compilation/fail344.d(20): Error: undefined identifier `Q` -fail_compilation/fail344.d(20): Error: undefined identifier `Q` -fail_compilation/fail344.d(20): Error: undefined identifier `V` -fail_compilation/fail344.d(23): while evaluating: `static assert(Alike!(SIB!(crayon)))` -fail_compilation/fail344.d(23): Error: template instance `fail344.SIB!(crayon).SIB.Alike!(SIB!(crayon))` error instantiating -fail_compilation/fail344.d(23): while evaluating: `static assert(Alike!(SIB!(crayon)))` -fail_compilation/fail344.d(28): Error: template instance `fail344.SIB!(crayon).SIB.opDispatch!"E"` error instantiating +fail_compilation/fail344.d(34): Error: undefined identifier `Q` + enum bool Alike = Q == V.garbage; + ^ +fail_compilation/fail344.d(34): Error: undefined identifier `Q` + enum bool Alike = Q == V.garbage; + ^ +fail_compilation/fail344.d(34): Error: undefined identifier `V` + enum bool Alike = Q == V.garbage; + ^ +fail_compilation/fail344.d(37): while evaluating: `static assert(Alike!(SIB!(crayon)))` + static assert(Alike!(SIB!(crayon))); + ^ +fail_compilation/fail344.d(37): Error: template instance `fail344.SIB!(crayon).SIB.Alike!(SIB!(crayon))` error instantiating + static assert(Alike!(SIB!(crayon))); + ^ +fail_compilation/fail344.d(37): while evaluating: `static assert(Alike!(SIB!(crayon)))` + static assert(Alike!(SIB!(crayon))); + ^ +fail_compilation/fail344.d(42): Error: template instance `fail344.SIB!(crayon).SIB.opDispatch!"E"` error instantiating + SIB!(SIB!(crayon).E)(3.0); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail346.d b/compiler/test/fail_compilation/fail346.d index 5b51f54498f9..ae8eaef69223 100644 --- a/compiler/test/fail_compilation/fail346.d +++ b/compiler/test/fail_compilation/fail346.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail346.d(15): Error: undefined identifier `P` -fail_compilation/fail346.d(15): Error: variable `fail346.S.T!0.T` - cannot use template to add field to aggregate `S` -fail_compilation/fail346.d(20): Error: template instance `fail346.S.T!0` error instantiating -fail_compilation/fail346.d(23): instantiated from here: `V!(S, 0)` +fail_compilation/fail346.d(23): Error: undefined identifier `P` + const P T = { val }; // the P here is an error it should be S + ^ +fail_compilation/fail346.d(23): Error: variable `fail346.S.T!0.T` - cannot use template to add field to aggregate `S` + const P T = { val }; // the P here is an error it should be S + ^ +fail_compilation/fail346.d(28): Error: template instance `fail346.S.T!0` error instantiating + const R V=R.T!(val); + ^ +fail_compilation/fail346.d(31): instantiated from here: `V!(S, 0)` +const S x = V!(S,0); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail347.d b/compiler/test/fail_compilation/fail347.d index e495ba257e35..65fe9186f0ea 100644 --- a/compiler/test/fail_compilation/fail347.d +++ b/compiler/test/fail_compilation/fail347.d @@ -2,13 +2,23 @@ EXTRA_FILES: imports/fail347a.d TEST_OUTPUT: --- -fail_compilation/fail347.d(26): Error: undefined identifier `bbr`, did you mean variable `bar`? -fail_compilation/fail347.d(27): Error: no property `ofo` for type `S`, did you mean `fail347.S.foo`? -fail_compilation/fail347.d(29): Error: no property `fool` for `sp` of type `fail347.S*` -fail_compilation/fail347.d(29): did you mean variable `foo`? -fail_compilation/fail347.d(30): Error: undefined identifier `strlenx`, did you mean function `strlen`? -fail_compilation/fail347.d(31): Error: no property `strlenx` for `"hello"` of type `string` -fail_compilation/fail347.d(31): did you mean function `strlen`? +fail_compilation/fail347.d(36): Error: undefined identifier `bbr`, did you mean variable `bar`? + bbr.foo = 3; + ^ +fail_compilation/fail347.d(37): Error: no property `ofo` for type `S`, did you mean `fail347.S.foo`? + bar.ofo = 4; + ^ +fail_compilation/fail347.d(39): Error: no property `fool` for `sp` of type `fail347.S*` + sp.fool = 5; + ^ +fail_compilation/fail347.d(39): did you mean variable `foo`? +fail_compilation/fail347.d(40): Error: undefined identifier `strlenx`, did you mean function `strlen`? + auto s = strlenx("hello"); + ^ +fail_compilation/fail347.d(41): Error: no property `strlenx` for `"hello"` of type `string` + auto q = "hello".strlenx(); + ^ +fail_compilation/fail347.d(41): did you mean function `strlen`? --- */ diff --git a/compiler/test/fail_compilation/fail349.d b/compiler/test/fail_compilation/fail349.d index 215453ebe75a..7bd5dcd3c675 100644 --- a/compiler/test/fail_compilation/fail349.d +++ b/compiler/test/fail_compilation/fail349.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail349.d(15): Error: function `fail349.bug6109throwing` is not `nothrow` -fail_compilation/fail349.d(13): Error: function `fail349.bug6109noThrow` may throw but is marked as `nothrow` +fail_compilation/fail349.d(19): Error: function `fail349.bug6109throwing` is not `nothrow` + auto g = [4][0 .. bug6109throwing()]; + ^ +fail_compilation/fail349.d(17): Error: function `fail349.bug6109noThrow` may throw but is marked as `nothrow` +int bug6109noThrow() nothrow + ^ --- */ diff --git a/compiler/test/fail_compilation/fail35.d b/compiler/test/fail_compilation/fail35.d index 4f47a62d4a06..ea897c8ae0a9 100644 --- a/compiler/test/fail_compilation/fail35.d +++ b/compiler/test/fail_compilation/fail35.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail35.d(15): Error: variable `t` cannot be read at compile time +fail_compilation/fail35.d(17): Error: variable `t` cannot be read at compile time + size_t n = (bool[t]).sizeof; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail351.d b/compiler/test/fail_compilation/fail351.d index 1762ec06a43e..196ac843f475 100644 --- a/compiler/test/fail_compilation/fail351.d +++ b/compiler/test/fail_compilation/fail351.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail351.d(14): Error: expression `this.num[index]` of type `immutable(uint)` is not implicitly convertible to return type `ref uint` +fail_compilation/fail351.d(16): Error: expression `this.num[index]` of type `immutable(uint)` is not implicitly convertible to return type `ref uint` + return num[index]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail352.d b/compiler/test/fail_compilation/fail352.d index 757dd5e282c8..18c73274ac50 100644 --- a/compiler/test/fail_compilation/fail352.d +++ b/compiler/test/fail_compilation/fail352.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail352.d(18): Error: cannot infer argument types, expected 1 argument, not 2 +fail_compilation/fail352.d(20): Error: cannot infer argument types, expected 1 argument, not 2 + foreach(i, v; Range()) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail354.d b/compiler/test/fail_compilation/fail354.d index 2795acc1059b..b5982538e41d 100644 --- a/compiler/test/fail_compilation/fail354.d +++ b/compiler/test/fail_compilation/fail354.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail354.d(11): Error: template instance `T!N` template `T` is not defined -fail_compilation/fail354.d(13): Error: template instance `fail354.S!1` error instantiating +fail_compilation/fail354.d(15): Error: template instance `T!N` template `T` is not defined + this(T!N) { } + ^ +fail_compilation/fail354.d(17): Error: template instance `fail354.S!1` error instantiating +alias S!1 M; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail355.d b/compiler/test/fail_compilation/fail355.d index 1237801a51b1..e9729632e3c9 100644 --- a/compiler/test/fail_compilation/fail355.d +++ b/compiler/test/fail_compilation/fail355.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/fail355.d TEST_OUTPUT: --- -fail_compilation/fail355.d(9): Error: module `imports.fail355` import `nonexistent` not found +fail_compilation/fail355.d(11): Error: module `imports.fail355` import `nonexistent` not found +import imports.fail355 : nonexistent; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail356a.d b/compiler/test/fail_compilation/fail356a.d index 6375b5cd24e2..1770038799ac 100644 --- a/compiler/test/fail_compilation/fail356a.d +++ b/compiler/test/fail_compilation/fail356a.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/fail356.d TEST_OUTPUT: --- -fail_compilation/fail356a.d(9): Error: variable `fail356a.imports` conflicts with import `fail356a.imports` at fail_compilation/fail356a.d(8) +fail_compilation/fail356a.d(11): Error: variable `fail356a.imports` conflicts with import `fail356a.imports` at fail_compilation/fail356a.d(10) +int imports; // collides with package name + ^ --- */ import imports.fail356; diff --git a/compiler/test/fail_compilation/fail356b.d b/compiler/test/fail_compilation/fail356b.d index 21f91b17e43d..9bb12444a5b2 100644 --- a/compiler/test/fail_compilation/fail356b.d +++ b/compiler/test/fail_compilation/fail356b.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/fail356.d TEST_OUTPUT: --- -fail_compilation/fail356b.d(9): Error: variable `fail356b.bar` conflicts with alias `fail356b.bar` at fail_compilation/fail356b.d(8) +fail_compilation/fail356b.d(11): Error: variable `fail356b.bar` conflicts with alias `fail356b.bar` at fail_compilation/fail356b.d(10) +int bar; // collides with selective import + ^ --- */ import imports.fail356 : bar; diff --git a/compiler/test/fail_compilation/fail356c.d b/compiler/test/fail_compilation/fail356c.d index bd10943c718f..cfcb958abbf4 100644 --- a/compiler/test/fail_compilation/fail356c.d +++ b/compiler/test/fail_compilation/fail356c.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/fail356.d TEST_OUTPUT: --- -fail_compilation/fail356c.d(9): Error: variable `fail356c.foo` conflicts with import `fail356c.foo` at fail_compilation/fail356c.d(8) +fail_compilation/fail356c.d(11): Error: variable `fail356c.foo` conflicts with import `fail356c.foo` at fail_compilation/fail356c.d(10) +int foo; // collides with renamed import + ^ --- */ import foo = imports.fail356; diff --git a/compiler/test/fail_compilation/fail3581a.d b/compiler/test/fail_compilation/fail3581a.d index 56e8c0c4c11f..2dae261062dc 100644 --- a/compiler/test/fail_compilation/fail3581a.d +++ b/compiler/test/fail_compilation/fail3581a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3581a.d(9): Error: function `fail3581a.B.f` cannot override a non-virtual function +fail_compilation/fail3581a.d(11): Error: function `fail3581a.B.f` cannot override a non-virtual function +class B : A { static override void f() {}; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3581b.d b/compiler/test/fail_compilation/fail3581b.d index c2f7f13558ad..7d44cfea9761 100644 --- a/compiler/test/fail_compilation/fail3581b.d +++ b/compiler/test/fail_compilation/fail3581b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3581b.d(9): Error: function `fail3581b.B.f` `private` method is not virtual and cannot override +fail_compilation/fail3581b.d(11): Error: function `fail3581b.B.f` `private` method is not virtual and cannot override +class B : A { private override void f() {}; } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail359.d b/compiler/test/fail_compilation/fail359.d index 71e9143ab0bf..e90cd2aa3184 100644 --- a/compiler/test/fail_compilation/fail359.d +++ b/compiler/test/fail_compilation/fail359.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail359.d(7): Error: invalid filename for `#line` directive +fail_compilation/fail359.d(9): Error: invalid filename for `#line` directive +#line 5 _BOOM + ^ --- */ #line 5 _BOOM diff --git a/compiler/test/fail_compilation/fail36.d b/compiler/test/fail_compilation/fail36.d index 96e022e33f28..ea276c3c376d 100644 --- a/compiler/test/fail_compilation/fail36.d +++ b/compiler/test/fail_compilation/fail36.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail36.d(13): Error: template `t(int L)` does not have property `a` -fail_compilation/fail36.d(18): Error: mixin `fail36.func.t!10` error instantiating +fail_compilation/fail36.d(17): Error: template `t(int L)` does not have property `a` + void foo(int b = t.a) {} // wrong + ^ +fail_compilation/fail36.d(22): Error: mixin `fail36.func.t!10` error instantiating + mixin t!(10); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3672.d b/compiler/test/fail_compilation/fail3672.d index 2f9bdf742b7e..f39eb64886eb 100644 --- a/compiler/test/fail_compilation/fail3672.d +++ b/compiler/test/fail_compilation/fail3672.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3672.d(28): Error: read-modify-write operations are not allowed for `shared` variables -fail_compilation/fail3672.d(28): Use `core.atomic.atomicOp!"+="(*p, 1)` instead -fail_compilation/fail3672.d(32): Error: none of the `opOpAssign` overloads of `SF` are callable for `*sfp` of type `shared(SF)` +fail_compilation/fail3672.d(32): Error: read-modify-write operations are not allowed for `shared` variables + *p += 1; // fail + ^ +fail_compilation/fail3672.d(32): Use `core.atomic.atomicOp!"+="(*p, 1)` instead +fail_compilation/fail3672.d(36): Error: none of the `opOpAssign` overloads of `SF` are callable for `*sfp` of type `shared(SF)` + *sfp += 1; // fail + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3673a.d b/compiler/test/fail_compilation/fail3673a.d index 889d940de441..0eaa4638a349 100644 --- a/compiler/test/fail_compilation/fail3673a.d +++ b/compiler/test/fail_compilation/fail3673a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3673a.d(8): Error: template constraints only allowed for templates +fail_compilation/fail3673a.d(10): Error: template constraints only allowed for templates +class B : A if(false) { } + ^ --- */ class A {} diff --git a/compiler/test/fail_compilation/fail3673b.d b/compiler/test/fail_compilation/fail3673b.d index bf745ac8bbd0..c49cb8ebb23a 100644 --- a/compiler/test/fail_compilation/fail3673b.d +++ b/compiler/test/fail_compilation/fail3673b.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3673b.d(12): Error: basic type expected, not `if` -fail_compilation/fail3673b.d(12): Error: template constraints only allowed for templates -fail_compilation/fail3673b.d(12): Error: { } expected following `class` declaration -fail_compilation/fail3673b.d(12): Error: no identifier for declarator `A` -fail_compilation/fail3673b.d(12): Error: declaration expected, not `{` +fail_compilation/fail3673b.d(22): Error: basic type expected, not `if` +class B : if(false) A { } + ^ +fail_compilation/fail3673b.d(22): Error: template constraints only allowed for templates +class B : if(false) A { } + ^ +fail_compilation/fail3673b.d(22): Error: { } expected following `class` declaration +class B : if(false) A { } + ^ +fail_compilation/fail3673b.d(22): Error: no identifier for declarator `A` +class B : if(false) A { } + ^ +fail_compilation/fail3673b.d(22): Error: declaration expected, not `{` +class B : if(false) A { } + ^ --- */ class A {} diff --git a/compiler/test/fail_compilation/fail3703.d b/compiler/test/fail_compilation/fail3703.d index d2d277f50658..09762613b988 100644 --- a/compiler/test/fail_compilation/fail3703.d +++ b/compiler/test/fail_compilation/fail3703.d @@ -3,12 +3,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3703.d(18): Error: mismatched array lengths 2 and 1 for assignment `b[] = a` -fail_compilation/fail3703.d(20): Error: mismatched array lengths 2 and 1 for assignment `b[] = a` -fail_compilation/fail3703.d(22): Error: mismatched array lengths, 3 and 2 -fail_compilation/fail3703.d(23): Error: mismatched array lengths, 2 and 3 -fail_compilation/fail3703.d(25): Error: mismatched array lengths, 3 and 2 -fail_compilation/fail3703.d(26): Error: mismatched array lengths, 2 and 3 +fail_compilation/fail3703.d(30): Error: mismatched array lengths 2 and 1 for assignment `b[] = a` + int[2] b = a; // should make compile error + ^ +fail_compilation/fail3703.d(32): Error: mismatched array lengths 2 and 1 for assignment `b[] = a` + b = a; // should make compile error + ^ +fail_compilation/fail3703.d(34): Error: mismatched array lengths, 3 and 2 + int[3] sa3 = [1,2][]; + ^ +fail_compilation/fail3703.d(35): Error: mismatched array lengths, 2 and 3 + int[2] sa2 = sa3[][]; + ^ +fail_compilation/fail3703.d(37): Error: mismatched array lengths, 3 and 2 + sa3 = [1,2][]; + ^ +fail_compilation/fail3703.d(38): Error: mismatched array lengths, 2 and 3 + sa2 = sa3[][]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3731.d b/compiler/test/fail_compilation/fail3731.d index c2903bb73c28..4ca75d458c9d 100644 --- a/compiler/test/fail_compilation/fail3731.d +++ b/compiler/test/fail_compilation/fail3731.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3731.d(13): Error: cannot implicitly convert expression `x` of type `immutable(D)` to `fail3731.main.C` +fail_compilation/fail3731.d(15): Error: cannot implicitly convert expression `x` of type `immutable(D)` to `fail3731.main.C` + C y = x; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail37_m32.d b/compiler/test/fail_compilation/fail37_m32.d index 900d80da45f6..8f73e1e9a7d6 100644 --- a/compiler/test/fail_compilation/fail37_m32.d +++ b/compiler/test/fail_compilation/fail37_m32.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail37_m32.d(9): Error: `cast(float)4u / cast(float)8u - cast(float)2147483647` is not of integral type, it is a `float` +fail_compilation/fail37_m32.d(11): Error: `cast(float)4u / cast(float)8u - cast(float)2147483647` is not of integral type, it is a `float` +ulong[cast(uint)((cast(float)int.sizeof/ulong.sizeof)-int.max>>2)+int.max>>2] hexarray; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail37_m64.d b/compiler/test/fail_compilation/fail37_m64.d index 5c0d1697a201..4410acda76bc 100644 --- a/compiler/test/fail_compilation/fail37_m64.d +++ b/compiler/test/fail_compilation/fail37_m64.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail37_m64.d(9): Error: `cast(float)4LU / cast(float)8LU - cast(float)2147483647` is not of integral type, it is a `float` +fail_compilation/fail37_m64.d(11): Error: `cast(float)4LU / cast(float)8LU - cast(float)2147483647` is not of integral type, it is a `float` +ulong[cast(uint)((cast(float)int.sizeof/ulong.sizeof)-int.max>>2)+int.max>>2] hexarray; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail38.d b/compiler/test/fail_compilation/fail38.d index 344a075a708e..292779803e64 100644 --- a/compiler/test/fail_compilation/fail38.d +++ b/compiler/test/fail_compilation/fail38.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail38.d(12): Error: `super` is only allowed in non-static class member functions +fail_compilation/fail38.d(14): Error: `super` is only allowed in non-static class member functions + super.x = 2; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3882.d b/compiler/test/fail_compilation/fail3882.d index 9647f08805b5..2964875aedda 100644 --- a/compiler/test/fail_compilation/fail3882.d +++ b/compiler/test/fail_compilation/fail3882.d @@ -2,8 +2,12 @@ PERMUTE_ARGS: -debug TEST_OUTPUT: --- -fail_compilation/fail3882.d(32): Error: `@mustuse` on functions is reserved for future use -fail_compilation/fail3882.d(33): Error: `@mustuse` on functions is reserved for future use +fail_compilation/fail3882.d(36): Error: `@mustuse` on functions is reserved for future use +@mustuse nothrow pure int f1(immutable(int)[] a) { return 0; } + ^ +fail_compilation/fail3882.d(37): Error: `@mustuse` on functions is reserved for future use +@mustuse nothrow pure int f2(immutable(int)* p) { return 0; } + ^ --- */ import core.attribute; diff --git a/compiler/test/fail_compilation/fail3895.d b/compiler/test/fail_compilation/fail3895.d index 1aafd96947c6..aca40fd67419 100644 --- a/compiler/test/fail_compilation/fail3895.d +++ b/compiler/test/fail_compilation/fail3895.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3895.d(12): Error: cannot append type `double[]` to type `float[]` +fail_compilation/fail3895.d(14): Error: cannot append type `double[]` to type `float[]` + otherStuff ~= stuff; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail39.d b/compiler/test/fail_compilation/fail39.d index c0bb0e16a076..55aa66d1e31d 100644 --- a/compiler/test/fail_compilation/fail39.d +++ b/compiler/test/fail_compilation/fail39.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail39.d(12): Error: function `fail39.main.__funcliteral2` cannot access function `foo` in frame of function `D main` -fail_compilation/fail39.d(11): `foo` declared here +fail_compilation/fail39.d(16): Error: function `fail39.main.__funcliteral2` cannot access function `foo` in frame of function `D main` + void function() bar = function void() { foo(); }; + ^ +fail_compilation/fail39.d(15): `foo` declared here + void foo() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail3990.d b/compiler/test/fail_compilation/fail3990.d index aa0fa816b6f6..8891001d67ce 100644 --- a/compiler/test/fail_compilation/fail3990.d +++ b/compiler/test/fail_compilation/fail3990.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail3990.d(12): Error: using `*` on an array is no longer supported; use `*(arr1).ptr` instead -fail_compilation/fail3990.d(14): Error: using `*` on an array is no longer supported; use `*(arr2).ptr` instead +fail_compilation/fail3990.d(16): Error: using `*` on an array is no longer supported; use `*(arr1).ptr` instead + assert(*arr1 == 1); + ^ +fail_compilation/fail3990.d(18): Error: using `*` on an array is no longer supported; use `*(arr2).ptr` instead + assert(*arr2 == 1); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail40.d b/compiler/test/fail_compilation/fail40.d index 947a3afb7957..6434f2b6058c 100644 --- a/compiler/test/fail_compilation/fail40.d +++ b/compiler/test/fail_compilation/fail40.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail40.d(11): Error: variable `yuiop` cannot be read at compile time +fail_compilation/fail40.d(13): Error: variable `yuiop` cannot be read at compile time + int* asdfg = yuiop.ptr; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail41.d b/compiler/test/fail_compilation/fail41.d index 6d8939505399..a03369335bfd 100644 --- a/compiler/test/fail_compilation/fail41.d +++ b/compiler/test/fail_compilation/fail41.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail41.d(17): Error: cannot return non-void from `void` function +fail_compilation/fail41.d(19): Error: cannot return non-void from `void` function + return mc; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail42.d b/compiler/test/fail_compilation/fail42.d index c153d5b255c3..71bbecdcdb52 100644 --- a/compiler/test/fail_compilation/fail42.d +++ b/compiler/test/fail_compilation/fail42.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail42.d(22): Error: struct `fail42.Qwert` no size because of forward reference +fail_compilation/fail42.d(24): Error: struct `fail42.Qwert` no size because of forward reference + Qwert hjkl; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4206.d b/compiler/test/fail_compilation/fail4206.d index b9c1671d7810..f45538408cff 100644 --- a/compiler/test/fail_compilation/fail4206.d +++ b/compiler/test/fail_compilation/fail4206.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4206.d(9): Error: initializer must be an expression, not `s` +fail_compilation/fail4206.d(11): Error: initializer must be an expression, not `s` +enum var = s; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4269a.d b/compiler/test/fail_compilation/fail4269a.d index 1ce98065882f..3b7b42b24579 100644 --- a/compiler/test/fail_compilation/fail4269a.d +++ b/compiler/test/fail_compilation/fail4269a.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4269a.d(12): Error: undefined identifier `B` -fail_compilation/fail4269a.d(12): Error: field `blah` not allowed in interface -fail_compilation/fail4269a.d(13): Error: undefined identifier `B` +fail_compilation/fail4269a.d(18): Error: undefined identifier `B` + B blah; + ^ +fail_compilation/fail4269a.d(18): Error: field `blah` not allowed in interface + B blah; + ^ +fail_compilation/fail4269a.d(19): Error: undefined identifier `B` + void foo(B b){} + ^ --- */ enum bool WWW = is(typeof(A.x)); diff --git a/compiler/test/fail_compilation/fail4269b.d b/compiler/test/fail_compilation/fail4269b.d index 7c371d1d170e..103b64563829 100644 --- a/compiler/test/fail_compilation/fail4269b.d +++ b/compiler/test/fail_compilation/fail4269b.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4269b.d(11): Error: undefined identifier `B` -fail_compilation/fail4269b.d(12): Error: undefined identifier `B` +fail_compilation/fail4269b.d(15): Error: undefined identifier `B` + B blah; + ^ +fail_compilation/fail4269b.d(16): Error: undefined identifier `B` + void foo(B b){} + ^ --- */ enum bool WWW = is(typeof(A.x)); diff --git a/compiler/test/fail_compilation/fail4269c.d b/compiler/test/fail_compilation/fail4269c.d index c12f9b60b2cb..31af7b9c8ca1 100644 --- a/compiler/test/fail_compilation/fail4269c.d +++ b/compiler/test/fail_compilation/fail4269c.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4269c.d(11): Error: undefined identifier `B` -fail_compilation/fail4269c.d(12): Error: undefined identifier `B` +fail_compilation/fail4269c.d(15): Error: undefined identifier `B` + B blah; + ^ +fail_compilation/fail4269c.d(16): Error: undefined identifier `B` + void foo(B b){} + ^ --- */ enum bool WWW = is(typeof(A.x)); diff --git a/compiler/test/fail_compilation/fail4269d.d b/compiler/test/fail_compilation/fail4269d.d index 135e1d4fe51c..0def65c3ca20 100644 --- a/compiler/test/fail_compilation/fail4269d.d +++ b/compiler/test/fail_compilation/fail4269d.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4269d.d(9): Error: undefined identifier `Y` +fail_compilation/fail4269d.d(11): Error: undefined identifier `Y` +alias Y X6; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4269e.d b/compiler/test/fail_compilation/fail4269e.d index 8a95b34e891e..8decfb71c198 100644 --- a/compiler/test/fail_compilation/fail4269e.d +++ b/compiler/test/fail_compilation/fail4269e.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4269e.d(10): Error: semicolon needed to end declaration of `Y` instead of `X5` -fail_compilation/fail4269e.d(10): Error: no identifier for declarator `X5` +fail_compilation/fail4269e.d(12): Error: semicolon needed to end declaration of `Y` instead of `X5` +typedef Y X5; + ^ +fail_compilation/fail4269e.d(12): Error: no identifier for declarator `X5` --- */ diff --git a/compiler/test/fail_compilation/fail4269f.d b/compiler/test/fail_compilation/fail4269f.d index 7a719c7c3a34..0085930ee3f0 100644 --- a/compiler/test/fail_compilation/fail4269f.d +++ b/compiler/test/fail_compilation/fail4269f.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4269f.d(9): Error: `alias X16 = X16;` cannot alias itself, use a qualified name to create an overload set +fail_compilation/fail4269f.d(11): Error: `alias X16 = X16;` cannot alias itself, use a qualified name to create an overload set +alias X16 X16; +^ --- */ diff --git a/compiler/test/fail_compilation/fail4269g.d b/compiler/test/fail_compilation/fail4269g.d index 69d9a9a1cb90..44f984869930 100644 --- a/compiler/test/fail_compilation/fail4269g.d +++ b/compiler/test/fail_compilation/fail4269g.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4269g.d(10): Error: alias `fail4269g.Xg` cannot alias an expression `d[1]` +fail_compilation/fail4269g.d(12): Error: alias `fail4269g.Xg` cannot alias an expression `d[1]` +alias d[1] Xg; +^ --- */ diff --git a/compiler/test/fail_compilation/fail4375a.d b/compiler/test/fail_compilation/fail4375a.d index 322bcb3289bb..ba11b204cf5a 100644 --- a/compiler/test/fail_compilation/fail4375a.d +++ b/compiler/test/fail_compilation/fail4375a.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375a.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375a.d(13) +fail_compilation/fail4375a.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375a.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375b.d b/compiler/test/fail_compilation/fail4375b.d index 6e6b9b092622..003c5e1b755f 100644 --- a/compiler/test/fail_compilation/fail4375b.d +++ b/compiler/test/fail_compilation/fail4375b.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375b.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375b.d(14) +fail_compilation/fail4375b.d(20): Warning: else is dangling, add { } after condition at fail_compilation/fail4375b.d(16) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375c.d b/compiler/test/fail_compilation/fail4375c.d index ef7a79272c9e..5dca5d345382 100644 --- a/compiler/test/fail_compilation/fail4375c.d +++ b/compiler/test/fail_compilation/fail4375c.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375c.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375c.d(13) +fail_compilation/fail4375c.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375c.d(15) + else { + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375d.d b/compiler/test/fail_compilation/fail4375d.d index 7b2740ac5207..0e719b969ba0 100644 --- a/compiler/test/fail_compilation/fail4375d.d +++ b/compiler/test/fail_compilation/fail4375d.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375d.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375d.d(13) +fail_compilation/fail4375d.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375d.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375e.d b/compiler/test/fail_compilation/fail4375e.d index 1b7f7d29cfe5..b30bea3f642a 100644 --- a/compiler/test/fail_compilation/fail4375e.d +++ b/compiler/test/fail_compilation/fail4375e.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375e.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375e.d(13) +fail_compilation/fail4375e.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375e.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375f.d b/compiler/test/fail_compilation/fail4375f.d index c603bfa2262f..44765e815096 100644 --- a/compiler/test/fail_compilation/fail4375f.d +++ b/compiler/test/fail_compilation/fail4375f.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375f.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375f.d(13) +fail_compilation/fail4375f.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375f.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375g.d b/compiler/test/fail_compilation/fail4375g.d index a3d7c85f7a5f..aadde59951f7 100644 --- a/compiler/test/fail_compilation/fail4375g.d +++ b/compiler/test/fail_compilation/fail4375g.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375g.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375g.d(13) +fail_compilation/fail4375g.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375g.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375h.d b/compiler/test/fail_compilation/fail4375h.d index 04833b1bc738..69be3fd11738 100644 --- a/compiler/test/fail_compilation/fail4375h.d +++ b/compiler/test/fail_compilation/fail4375h.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375h.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375h.d(15) +fail_compilation/fail4375h.d(20): Warning: else is dangling, add { } after condition at fail_compilation/fail4375h.d(17) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375i.d b/compiler/test/fail_compilation/fail4375i.d index 2fe2bb718b1c..62e2c4dfc480 100644 --- a/compiler/test/fail_compilation/fail4375i.d +++ b/compiler/test/fail_compilation/fail4375i.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375i.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375i.d(13) +fail_compilation/fail4375i.d(20): Warning: else is dangling, add { } after condition at fail_compilation/fail4375i.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375j.d b/compiler/test/fail_compilation/fail4375j.d index 89ad096dc7bc..d9ab8b005fff 100644 --- a/compiler/test/fail_compilation/fail4375j.d +++ b/compiler/test/fail_compilation/fail4375j.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375j.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375j.d(13) +fail_compilation/fail4375j.d(20): Warning: else is dangling, add { } after condition at fail_compilation/fail4375j.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375l.d b/compiler/test/fail_compilation/fail4375l.d index 731ead64cc27..7a2b78077520 100644 --- a/compiler/test/fail_compilation/fail4375l.d +++ b/compiler/test/fail_compilation/fail4375l.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375l.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375l.d(13) +fail_compilation/fail4375l.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375l.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375m.d b/compiler/test/fail_compilation/fail4375m.d index b5d1c1683161..d3ea9af986ce 100644 --- a/compiler/test/fail_compilation/fail4375m.d +++ b/compiler/test/fail_compilation/fail4375m.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375m.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375m.d(14) +fail_compilation/fail4375m.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375m.d(16) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375o.d b/compiler/test/fail_compilation/fail4375o.d index 3112de7d10f7..ecd26940dc1a 100644 --- a/compiler/test/fail_compilation/fail4375o.d +++ b/compiler/test/fail_compilation/fail4375o.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375o.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375o.d(13) +fail_compilation/fail4375o.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375o.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375p.d b/compiler/test/fail_compilation/fail4375p.d index 62c61a4cb7a4..7e2adf6a9de7 100644 --- a/compiler/test/fail_compilation/fail4375p.d +++ b/compiler/test/fail_compilation/fail4375p.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375p.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375p.d(12) -fail_compilation/fail4375p.d(16): Error: undefined identifier `x` +fail_compilation/fail4375p.d(23): Warning: else is dangling, add { } after condition at fail_compilation/fail4375p.d(16) + else + ^ +fail_compilation/fail4375p.d(20): Error: undefined identifier `x` + synchronized (x) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4375q.d b/compiler/test/fail_compilation/fail4375q.d index f57e746b6ed3..87c259374a9e 100644 --- a/compiler/test/fail_compilation/fail4375q.d +++ b/compiler/test/fail_compilation/fail4375q.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375q.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375q.d(13) -fail_compilation/fail4375q.d(14): Error: `with` expression types must be enums or aggregates or pointers to them, not `int` +fail_compilation/fail4375q.d(21): Warning: else is dangling, add { } after condition at fail_compilation/fail4375q.d(17) + else + ^ +fail_compilation/fail4375q.d(18): Error: `with` expression types must be enums or aggregates or pointers to them, not `int` + with (x) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4375r.d b/compiler/test/fail_compilation/fail4375r.d index 865bd6dae8e3..53f86d3841eb 100644 --- a/compiler/test/fail_compilation/fail4375r.d +++ b/compiler/test/fail_compilation/fail4375r.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375r.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375r.d(13) +fail_compilation/fail4375r.d(21): Warning: else is dangling, add { } after condition at fail_compilation/fail4375r.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375s.d b/compiler/test/fail_compilation/fail4375s.d index 972f27643af1..e8195fd9bcbb 100644 --- a/compiler/test/fail_compilation/fail4375s.d +++ b/compiler/test/fail_compilation/fail4375s.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375s.d(19): Warning: else is dangling, add { } after condition at fail_compilation/fail4375s.d(13) +fail_compilation/fail4375s.d(21): Warning: else is dangling, add { } after condition at fail_compilation/fail4375s.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375t.d b/compiler/test/fail_compilation/fail4375t.d index 07a79e57200f..232b5c647789 100644 --- a/compiler/test/fail_compilation/fail4375t.d +++ b/compiler/test/fail_compilation/fail4375t.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375t.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375t.d(13) +fail_compilation/fail4375t.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375t.d(15) + else + ^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375u.d b/compiler/test/fail_compilation/fail4375u.d index a3b22e950743..7fa97953ace6 100644 --- a/compiler/test/fail_compilation/fail4375u.d +++ b/compiler/test/fail_compilation/fail4375u.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375u.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375u.d(13) +fail_compilation/fail4375u.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375u.d(15) +else +^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375v.d b/compiler/test/fail_compilation/fail4375v.d index 2be98a61fbf3..56e0687c7674 100644 --- a/compiler/test/fail_compilation/fail4375v.d +++ b/compiler/test/fail_compilation/fail4375v.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375v.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375v.d(13) +fail_compilation/fail4375v.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375v.d(15) +else +^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375w.d b/compiler/test/fail_compilation/fail4375w.d index eb0779f9c0e3..3e795c1ed65b 100644 --- a/compiler/test/fail_compilation/fail4375w.d +++ b/compiler/test/fail_compilation/fail4375w.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375w.d(15): Warning: else is dangling, add { } after condition at fail_compilation/fail4375w.d(13) +fail_compilation/fail4375w.d(17): Warning: else is dangling, add { } after condition at fail_compilation/fail4375w.d(15) +else +^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375x.d b/compiler/test/fail_compilation/fail4375x.d index 6a5f9dbefd69..1ef9467083ff 100644 --- a/compiler/test/fail_compilation/fail4375x.d +++ b/compiler/test/fail_compilation/fail4375x.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375x.d(16): Warning: else is dangling, add { } after condition at fail_compilation/fail4375x.d(13) +fail_compilation/fail4375x.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375x.d(15) +else +^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail4375y.d b/compiler/test/fail_compilation/fail4375y.d index 28dc991469ee..7438ddb1daf1 100644 --- a/compiler/test/fail_compilation/fail4375y.d +++ b/compiler/test/fail_compilation/fail4375y.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4375y.d(18): Warning: else is dangling, add { } after condition at fail_compilation/fail4375y.d(13) +fail_compilation/fail4375y.d(20): Warning: else is dangling, add { } after condition at fail_compilation/fail4375y.d(15) +else +^ Error: warnings are treated as errors Use -wi if you wish to treat warnings only as informational. --- diff --git a/compiler/test/fail_compilation/fail44.d b/compiler/test/fail_compilation/fail44.d index 826bdba6af10..3382632058ae 100644 --- a/compiler/test/fail_compilation/fail44.d +++ b/compiler/test/fail_compilation/fail44.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail44.d(18): Error: expression `bar[i]` is `void` and has no value +fail_compilation/fail44.d(20): Error: expression `bar[i]` is `void` and has no value + foo[i] = bar[i]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4421.d b/compiler/test/fail_compilation/fail4421.d index 3aedfc31f3ea..fc57443e59d5 100644 --- a/compiler/test/fail_compilation/fail4421.d +++ b/compiler/test/fail_compilation/fail4421.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4421.d(16): Error: function `fail4421.U1.__postblit` destructors, postblits and invariants are not allowed in union `U1` -fail_compilation/fail4421.d(17): Error: destructor `fail4421.U1.~this` destructors, postblits and invariants are not allowed in union `U1` -fail_compilation/fail4421.d(18): Error: function `fail4421.U1.__invariant1` destructors, postblits and invariants are not allowed in union `U1` +fail_compilation/fail4421.d(22): Error: function `fail4421.U1.__postblit` destructors, postblits and invariants are not allowed in union `U1` + this(this); + ^ +fail_compilation/fail4421.d(23): Error: destructor `fail4421.U1.~this` destructors, postblits and invariants are not allowed in union `U1` + ~this(); + ^ +fail_compilation/fail4421.d(24): Error: function `fail4421.U1.__invariant1` destructors, postblits and invariants are not allowed in union `U1` + invariant() { } + ^ --- diff --git a/compiler/test/fail_compilation/fail4448.d b/compiler/test/fail_compilation/fail4448.d index d5a0d4eb2573..9d7fc9b6ff29 100644 --- a/compiler/test/fail_compilation/fail4448.d +++ b/compiler/test/fail_compilation/fail4448.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4448.d(19): Error: label `L1` has no `break` -fail_compilation/fail4448.d(26): called from here: `bug4448()` -fail_compilation/fail4448.d(26): while evaluating: `static assert(bug4448() == 3)` +fail_compilation/fail4448.d(25): Error: label `L1` has no `break` + break L1; + ^ +fail_compilation/fail4448.d(32): called from here: `bug4448()` +static assert(bug4448()==3); + ^ +fail_compilation/fail4448.d(32): while evaluating: `static assert(bug4448() == 3)` +static assert(bug4448()==3); +^ --- */ diff --git a/compiler/test/fail_compilation/fail45.d b/compiler/test/fail_compilation/fail45.d index 503ac610d6a6..7731e64dfed6 100644 --- a/compiler/test/fail_compilation/fail45.d +++ b/compiler/test/fail_compilation/fail45.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail45.d(10): Error: variable `fail45.main.O` cannot be declared to be a function +fail_compilation/fail45.d(12): Error: variable `fail45.main.O` cannot be declared to be a function + typeof(main) O = 0; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4510.d b/compiler/test/fail_compilation/fail4510.d index 64a8d45afd13..2a12d248a5ee 100644 --- a/compiler/test/fail_compilation/fail4510.d +++ b/compiler/test/fail_compilation/fail4510.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4510.d(12): Error: argument type mismatch, `float` to `ref double` +fail_compilation/fail4510.d(14): Error: argument type mismatch, `float` to `ref double` + foreach (ref double elem; arr) { + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4511.d b/compiler/test/fail_compilation/fail4511.d index efe4d41aeddb..8bd1f9e8b7c7 100644 --- a/compiler/test/fail_compilation/fail4511.d +++ b/compiler/test/fail_compilation/fail4511.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4511.d(18): Error: cannot implicitly override base class method `fail4511.test72.X.func` with `fail4511.test72.Y.func`; add `override` attribute +fail_compilation/fail4511.d(20): Error: cannot implicitly override base class method `fail4511.test72.X.func` with `fail4511.test72.Y.func`; add `override` attribute + B func() { return new A(); } + ^ --- */ void test72() diff --git a/compiler/test/fail_compilation/fail4544.d b/compiler/test/fail_compilation/fail4544.d index cf1554da2358..17b04c35454e 100644 --- a/compiler/test/fail_compilation/fail4544.d +++ b/compiler/test/fail_compilation/fail4544.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4544.d(15): Error: character constant has multiple characters -fail_compilation/fail4544.d(16): Error: `0x` isn't a valid integer literal, use `0x0` instead -fail_compilation/fail4544.d(16): Error: no identifier for declarator `int` -fail_compilation/fail4544.d(17): Error: unterminated character constant -fail_compilation/fail4544.d(18): Error: character constant has multiple characters +fail_compilation/fail4544.d(25): Error: character constant has multiple characters + char c = 'asd'; + ^ +fail_compilation/fail4544.d(26): Error: `0x` isn't a valid integer literal, use `0x0` instead + int 0x = 'k'; + ^ +fail_compilation/fail4544.d(26): Error: no identifier for declarator `int` + int 0x = 'k'; + ^ +fail_compilation/fail4544.d(27): Error: unterminated character constant + foo('dasadasdaasdasdaslkdhasdlashdsalk, xxx); + ^ +fail_compilation/fail4544.d(28): Error: character constant has multiple characters + goo('asdasdsa'); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail46.d b/compiler/test/fail_compilation/fail46.d index 9d97ba12614c..9b47622ec107 100644 --- a/compiler/test/fail_compilation/fail46.d +++ b/compiler/test/fail_compilation/fail46.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail46.d(19): Error: calling non-static function `bug` requires an instance of type `MyStruct` +fail_compilation/fail46.d(21): Error: calling non-static function `bug` requires an instance of type `MyStruct` + assert(MyStruct.bug() == 3); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail4611.d b/compiler/test/fail_compilation/fail4611.d index 259a6da847dd..803bc822a4ee 100644 --- a/compiler/test/fail_compilation/fail4611.d +++ b/compiler/test/fail_compilation/fail4611.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -m32 TEST_OUTPUT: --- -fail_compilation/fail4611.d(15): Error: `Vec[cast(size_t)2147483647]` size 4 * 2147483647 exceeds 0x7fffffff size limit for static array +fail_compilation/fail4611.d(17): Error: `Vec[cast(size_t)2147483647]` size 4 * 2147483647 exceeds 0x7fffffff size limit for static array + Vec[ptrdiff_t.max] a; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail47.d b/compiler/test/fail_compilation/fail47.d index c45a99031b54..0858d95a772c 100644 --- a/compiler/test/fail_compilation/fail47.d +++ b/compiler/test/fail_compilation/fail47.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail47.d(8): Error: variable `fail47._foo` is aliased to a function +fail_compilation/fail47.d(10): Error: variable `fail47._foo` is aliased to a function +int _foo; + ^ --- */ void foo() {} diff --git a/compiler/test/fail_compilation/fail4923.d b/compiler/test/fail_compilation/fail4923.d index 836b14ac6745..4bc484be7994 100644 --- a/compiler/test/fail_compilation/fail4923.d +++ b/compiler/test/fail_compilation/fail4923.d @@ -2,6 +2,8 @@ TEST_OUTPUT: --- fail_compilation/fail4923.d(5): Error: immutable variable `bar` initialization is not allowed in `static this` +fail_compilation/fail4923.d(5): Use `shared static this` instead. + ^ fail_compilation/fail4923.d(5): Use `shared static this` instead. fail_compilation/fail4923.d(6): Deprecation: const variable `baz` initialization is not allowed in `static this` fail_compilation/fail4923.d(6): Use `shared static this` instead. diff --git a/compiler/test/fail_compilation/fail4958.d b/compiler/test/fail_compilation/fail4958.d index 02bbc61666bf..aed1eb79c013 100644 --- a/compiler/test/fail_compilation/fail4958.d +++ b/compiler/test/fail_compilation/fail4958.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail4958.d(8): Error: enum member `fail4958.FloatEnum.B` has inexact value due to loss of precision +fail_compilation/fail4958.d(10): Error: enum member `fail4958.FloatEnum.B` has inexact value due to loss of precision +enum FloatEnum : float { A = float.max/2, B, C } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail50.d b/compiler/test/fail_compilation/fail50.d index c6aa178bdaa4..edaee9964160 100644 --- a/compiler/test/fail_compilation/fail50.d +++ b/compiler/test/fail_compilation/fail50.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail50.d(12): Error: taking the address of non-static variable `a` requires an instance of `Marko` -fail_compilation/fail50.d(12): Error: variable `a` cannot be read at compile time +fail_compilation/fail50.d(16): Error: taking the address of non-static variable `a` requires an instance of `Marko` + int* m = &a; + ^ +fail_compilation/fail50.d(16): Error: variable `a` cannot be read at compile time + int* m = &a; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail51.d b/compiler/test/fail_compilation/fail51.d index b5a11d45c3cc..7ceb87b01249 100644 --- a/compiler/test/fail_compilation/fail51.d +++ b/compiler/test/fail_compilation/fail51.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail51.d(11): Error: interface `fail51.B` circular inheritance of interface +fail_compilation/fail51.d(13): Error: interface `fail51.B` circular inheritance of interface +interface B : A { void g(); } +^ --- */ diff --git a/compiler/test/fail_compilation/fail5153.d b/compiler/test/fail_compilation/fail5153.d index 21de06e036a0..c9263d5931dc 100644 --- a/compiler/test/fail_compilation/fail5153.d +++ b/compiler/test/fail_compilation/fail5153.d @@ -3,8 +3,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail5153.d(26): Error: cannot implicitly convert expression `new Foo(0)` of type `Foo*` to `Foo` -fail_compilation/fail5153.d(26): Perhaps remove the `new` keyword? +fail_compilation/fail5153.d(28): Error: cannot implicitly convert expression `new Foo(0)` of type `Foo*` to `Foo` + Foo f = new Foo(0); + ^ +fail_compilation/fail5153.d(28): Perhaps remove the `new` keyword? --- */ diff --git a/compiler/test/fail_compilation/fail52.d b/compiler/test/fail_compilation/fail52.d index 9743be257216..12b43aaaaa1b 100644 --- a/compiler/test/fail_compilation/fail52.d +++ b/compiler/test/fail_compilation/fail52.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail52.d(10): Error: class `fail52.C` circular inheritance +fail_compilation/fail52.d(12): Error: class `fail52.C` circular inheritance +class C : A { void g(); } +^ --- */ diff --git a/compiler/test/fail_compilation/fail53.d b/compiler/test/fail_compilation/fail53.d index 556896c76c35..bf8ea0b6ffc9 100644 --- a/compiler/test/fail_compilation/fail53.d +++ b/compiler/test/fail_compilation/fail53.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail53.d(26): Error: function `object.Object.opEquals(Object o)` is not callable using argument types `(int)` -fail_compilation/fail53.d(26): cannot pass argument `i` of type `int` to parameter `Object o` +fail_compilation/fail53.d(28): Error: function `object.Object.opEquals(Object o)` is not callable using argument types `(int)` + if (i == o) + ^ +fail_compilation/fail53.d(28): cannot pass argument `i` of type `int` to parameter `Object o` --- */ diff --git a/compiler/test/fail_compilation/fail54.d b/compiler/test/fail_compilation/fail54.d index e232523ed651..dee0c743d469 100644 --- a/compiler/test/fail_compilation/fail54.d +++ b/compiler/test/fail_compilation/fail54.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail54.d(27): Error: incompatible types for `(0) == (Exception)`: cannot use `==` with types -fail_compilation/fail54.d(28): Error: incompatible types for `("") == (int)`: cannot use `==` with types -fail_compilation/fail54.d(29): Error: incompatible types for `(true) == (int)`: cannot use `==` with types -fail_compilation/fail54.d(29): while evaluating: `static assert(true == (int))` -fail_compilation/fail54.d(30): Error: incompatible types for `(true) == (int[string])`: cannot use `==` with types -fail_compilation/fail54.d(30): while evaluating: `static assert(true == (int[string]))` +fail_compilation/fail54.d(39): Error: incompatible types for `(0) == (Exception)`: cannot use `==` with types + 0 == Exception; + ^ +fail_compilation/fail54.d(40): Error: incompatible types for `("") == (int)`: cannot use `==` with types + "" == int; + ^ +fail_compilation/fail54.d(41): Error: incompatible types for `(true) == (int)`: cannot use `==` with types + static assert(is(int) == int); + ^ +fail_compilation/fail54.d(41): while evaluating: `static assert(true == (int))` + static assert(is(int) == int); + ^ +fail_compilation/fail54.d(42): Error: incompatible types for `(true) == (int[string])`: cannot use `==` with types + static assert(is(int[string]) == int[string]); + ^ +fail_compilation/fail54.d(42): while evaluating: `static assert(true == (int[string]))` + static assert(is(int[string]) == int[string]); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail5435.d b/compiler/test/fail_compilation/fail5435.d index fefed374db5b..e7f8bc5b6fef 100644 --- a/compiler/test/fail_compilation/fail5435.d +++ b/compiler/test/fail_compilation/fail5435.d @@ -5,26 +5,58 @@ TEST_OUTPUT: Enum5435.A Enum5435.B Enum5435.C -fail_compilation/fail5435.d(38): Error: cannot implicitly convert expression `"foo"` of type `string` to `Enum5435` -fail_compilation/fail5435.d(38): while evaluating `pragma(msg, foo)` -fail_compilation/fail5435.d(38): Error: cannot implicitly convert expression `3.0` of type `double` to `Enum5435` -fail_compilation/fail5435.d(38): while evaluating `pragma(msg, foo)` -fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `Enum5435.A` of type `Enum5435` to `string` -fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` -fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `Enum5435.B` of type `Enum5435` to `string` -fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` -fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `Enum5435.C` of type `Enum5435` to `string` -fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(70): Error: cannot implicitly convert expression `"foo"` of type `string` to `Enum5435` + foreach (Enum5435 foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(70): while evaluating `pragma(msg, foo)` + foreach (Enum5435 foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(70): Error: cannot implicitly convert expression `3.0` of type `double` to `Enum5435` + foreach (Enum5435 foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(70): while evaluating `pragma(msg, foo)` + foreach (Enum5435 foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(71): Error: cannot implicitly convert expression `Enum5435.A` of type `Enum5435` to `string` + foreach ( string foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(71): while evaluating `pragma(msg, foo)` + foreach ( string foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(71): Error: cannot implicitly convert expression `Enum5435.B` of type `Enum5435` to `string` + foreach ( string foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(71): while evaluating `pragma(msg, foo)` + foreach ( string foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(71): Error: cannot implicitly convert expression `Enum5435.C` of type `Enum5435` to `string` + foreach ( string foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(71): while evaluating `pragma(msg, foo)` + foreach ( string foo; tup) pragma(msg, foo); + ^ foo -fail_compilation/fail5435.d(39): Error: cannot implicitly convert expression `3.0` of type `double` to `string` -fail_compilation/fail5435.d(39): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(71): Error: cannot implicitly convert expression `3.0` of type `double` to `string` + foreach ( string foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(71): while evaluating `pragma(msg, foo)` + foreach ( string foo; tup) pragma(msg, foo); + ^ 0 1 2 -fail_compilation/fail5435.d(40): Error: cannot implicitly convert expression `"foo"` of type `string` to `int` -fail_compilation/fail5435.d(40): while evaluating `pragma(msg, foo)` -fail_compilation/fail5435.d(40): Error: cannot implicitly convert expression `3.0` of type `double` to `int` -fail_compilation/fail5435.d(40): while evaluating `pragma(msg, foo)` +fail_compilation/fail5435.d(72): Error: cannot implicitly convert expression `"foo"` of type `string` to `int` + foreach ( int foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(72): while evaluating `pragma(msg, foo)` + foreach ( int foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(72): Error: cannot implicitly convert expression `3.0` of type `double` to `int` + foreach ( int foo; tup) pragma(msg, foo); + ^ +fail_compilation/fail5435.d(72): while evaluating `pragma(msg, foo)` + foreach ( int foo; tup) pragma(msg, foo); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail55.d b/compiler/test/fail_compilation/fail55.d index 290c2b6695f0..699c4885d1f4 100644 --- a/compiler/test/fail_compilation/fail55.d +++ b/compiler/test/fail_compilation/fail55.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail55.d(23): Error: function `object.Object.opCmp(Object o)` is not callable using argument types `(int)` -fail_compilation/fail55.d(23): cannot pass argument `0` of type `int` to parameter `Object o` +fail_compilation/fail55.d(25): Error: function `object.Object.opCmp(Object o)` is not callable using argument types `(int)` + 0 < Exception; + ^ +fail_compilation/fail55.d(25): cannot pass argument `0` of type `int` to parameter `Object o` --- */ diff --git a/compiler/test/fail_compilation/fail56.d b/compiler/test/fail_compilation/fail56.d index 64902fedec34..55a640ca4ecf 100644 --- a/compiler/test/fail_compilation/fail56.d +++ b/compiler/test/fail_compilation/fail56.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail56.d(21): Error: mixin `dstress.nocompile.bug_20050330_A.main.Blah!(5, a).Blah!(5, a)` recursive mixin instantiation -fail_compilation/fail56.d(26): Error: mixin `dstress.nocompile.bug_20050330_A.main.Blah!(5, a)` error instantiating +fail_compilation/fail56.d(25): Error: mixin `dstress.nocompile.bug_20050330_A.main.Blah!(5, a).Blah!(5, a)` recursive mixin instantiation + mixin Blah!(a, B) Foo; + ^ +fail_compilation/fail56.d(30): Error: mixin `dstress.nocompile.bug_20050330_A.main.Blah!(5, a)` error instantiating + mixin Blah!(5,a); + ^ --- */ // $HeadURL$ diff --git a/compiler/test/fail_compilation/fail5634.d b/compiler/test/fail_compilation/fail5634.d index e2442e65593f..c3de4f0509e4 100644 --- a/compiler/test/fail_compilation/fail5634.d +++ b/compiler/test/fail_compilation/fail5634.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: ---- -fail_compilation/fail5634.d(9): Error: function `D main()` conflicts with previous declaration at fail_compilation/fail5634.d(8) +fail_compilation/fail5634.d(11): Error: function `D main()` conflicts with previous declaration at fail_compilation/fail5634.d(10) +void main() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail57.d b/compiler/test/fail_compilation/fail57.d index 41149cdc2f5d..be3cfbd7c9f4 100644 --- a/compiler/test/fail_compilation/fail57.d +++ b/compiler/test/fail_compilation/fail57.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail57.d(11): Error: divide by 0 -fail_compilation/fail57.d(11): Error: divide by 0 +fail_compilation/fail57.d(15): Error: divide by 0 + int x = 1 / 0; + ^ +fail_compilation/fail57.d(15): Error: divide by 0 + int x = 1 / 0; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail5733.d b/compiler/test/fail_compilation/fail5733.d index d58b362315b0..51721c8d84a5 100644 --- a/compiler/test/fail_compilation/fail5733.d +++ b/compiler/test/fail_compilation/fail5733.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail5733.d(12): Error: `opDispatch!"foo"` isn't a template +fail_compilation/fail5733.d(14): Error: `opDispatch!"foo"` isn't a template +auto temp = Test().foo!(int); + ^ --- */ struct Test diff --git a/compiler/test/fail_compilation/fail58.d b/compiler/test/fail_compilation/fail58.d index ae70da259b69..a6f1db664ee4 100644 --- a/compiler/test/fail_compilation/fail58.d +++ b/compiler/test/fail_compilation/fail58.d @@ -1,12 +1,20 @@ /* TEST_OUTPUT: ---- -fail_compilation/fail58.d(28): Error: function `SomeFunc` is not callable using argument types `(string, int)` -fail_compilation/fail58.d(28): cannot pass argument `"123"` of type `string` to parameter `dchar[] pText` -fail_compilation/fail58.d(14): `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` declared here -fail_compilation/fail58.d(32): Error: function `SomeFunc` is not callable using argument types `(string, int)` -fail_compilation/fail58.d(32): cannot pass argument `""` of type `string` to parameter `dchar[] pText` -fail_compilation/fail58.d(14): `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` declared here +fail_compilation/fail58.d(36): Error: function `SomeFunc` is not callable using argument types `(string, int)` + SomeFunc("123", sp); + ^ +fail_compilation/fail58.d(36): cannot pass argument `"123"` of type `string` to parameter `dchar[] pText` +fail_compilation/fail58.d(22): `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` declared here +dchar[] SomeFunc( dchar[] pText, out int pStopPosn) + ^ +fail_compilation/fail58.d(40): Error: function `SomeFunc` is not callable using argument types `(string, int)` + SomeFunc("", sp); + ^ +fail_compilation/fail58.d(40): cannot pass argument `""` of type `string` to parameter `dchar[] pText` +fail_compilation/fail58.d(22): `fail58.SomeFunc(dchar[] pText, out int pStopPosn)` declared here +dchar[] SomeFunc( dchar[] pText, out int pStopPosn) + ^ ---- */ debug import std.stdio; diff --git a/compiler/test/fail_compilation/fail5851.d b/compiler/test/fail_compilation/fail5851.d index 236a956de923..3ffe3e43dce6 100644 --- a/compiler/test/fail_compilation/fail5851.d +++ b/compiler/test/fail_compilation/fail5851.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail5851.d(11): Error: alias this is not reachable as `Foo` already converts to `object.Object` +fail_compilation/fail5851.d(13): Error: alias this is not reachable as `Foo` already converts to `object.Object` + alias o this; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail59.d b/compiler/test/fail_compilation/fail59.d index 536049561dea..82a3addca716 100644 --- a/compiler/test/fail_compilation/fail59.d +++ b/compiler/test/fail_compilation/fail59.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail59.d(50): Error: cannot construct nested class `C2` because no implicit `this` reference to outer class `C1` is available +fail_compilation/fail59.d(52): Error: cannot construct nested class `C2` because no implicit `this` reference to outer class `C1` is available + C1.C2 q = new C1.C2(3); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail5908.d b/compiler/test/fail_compilation/fail5908.d index f9a50602755f..4a71a6605fe8 100644 --- a/compiler/test/fail_compilation/fail5908.d +++ b/compiler/test/fail_compilation/fail5908.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -O TEST_OUTPUT: --- -fail_compilation/fail5908.d(16): Error: divide by zero -fail_compilation/fail5908.d(17): Error: divide by zero +fail_compilation/fail5908.d(20): Error: divide by zero + return (a % b) + + ^ +fail_compilation/fail5908.d(21): Error: divide by zero + (a / b); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail5953a1.d b/compiler/test/fail_compilation/fail5953a1.d index cd64e74b85ff..d3bc58c0d7c6 100644 --- a/compiler/test/fail_compilation/fail5953a1.d +++ b/compiler/test/fail_compilation/fail5953a1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail5953a1.d(9): Error: expression expected, not `,` +fail_compilation/fail5953a1.d(11): Error: expression expected, not `,` + auto a2 = [,]; // invalid, but compiles + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail5953a2.d b/compiler/test/fail_compilation/fail5953a2.d index 2edbc1029872..c7719e347205 100644 --- a/compiler/test/fail_compilation/fail5953a2.d +++ b/compiler/test/fail_compilation/fail5953a2.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail5953a2.d(11): Error: expression expected, not `,` -fail_compilation/fail5953a2.d(11): Error: expression expected, not `,` -fail_compilation/fail5953a2.d(11): Error: expression expected, not `,` +fail_compilation/fail5953a2.d(17): Error: expression expected, not `,` + auto a3 = [,,,]; // invalid, but compiles + ^ +fail_compilation/fail5953a2.d(17): Error: expression expected, not `,` + auto a3 = [,,,]; // invalid, but compiles + ^ +fail_compilation/fail5953a2.d(17): Error: expression expected, not `,` + auto a3 = [,,,]; // invalid, but compiles + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail5953s1.d b/compiler/test/fail_compilation/fail5953s1.d index 275c3f957987..e7c2b87b04f4 100644 --- a/compiler/test/fail_compilation/fail5953s1.d +++ b/compiler/test/fail_compilation/fail5953s1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail5953s1.d(10): Error: expression expected, not `,` +fail_compilation/fail5953s1.d(12): Error: expression expected, not `,` + S s2 = {,}; // invalid, but compiles + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail5953s2.d b/compiler/test/fail_compilation/fail5953s2.d index d66ff5d20d34..2c004d44d9f0 100644 --- a/compiler/test/fail_compilation/fail5953s2.d +++ b/compiler/test/fail_compilation/fail5953s2.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail5953s2.d(12): Error: expression expected, not `,` -fail_compilation/fail5953s2.d(12): Error: expression expected, not `,` -fail_compilation/fail5953s2.d(12): Error: expression expected, not `,` +fail_compilation/fail5953s2.d(18): Error: expression expected, not `,` + S s3 = {,,,}; // invalid, but compiles + ^ +fail_compilation/fail5953s2.d(18): Error: expression expected, not `,` + S s3 = {,,,}; // invalid, but compiles + ^ +fail_compilation/fail5953s2.d(18): Error: expression expected, not `,` + S s3 = {,,,}; // invalid, but compiles + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/fail60.d b/compiler/test/fail_compilation/fail60.d index 42fb4acd0c9d..063441ae761a 100644 --- a/compiler/test/fail_compilation/fail60.d +++ b/compiler/test/fail_compilation/fail60.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail60.d(14): Error: cannot construct nested class `B` because no implicit `this` reference to outer class `A` is available +fail_compilation/fail60.d(16): Error: cannot construct nested class `B` because no implicit `this` reference to outer class `A` is available + B b=new B; + ^ --- */ class A diff --git a/compiler/test/fail_compilation/fail6029.d b/compiler/test/fail_compilation/fail6029.d index 45797ebccc92..1f5b43e76ad9 100644 --- a/compiler/test/fail_compilation/fail6029.d +++ b/compiler/test/fail_compilation/fail6029.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6029.d(10): Error: alias this is not reachable as `A` already converts to `A` +fail_compilation/fail6029.d(12): Error: alias this is not reachable as `A` already converts to `A` + alias a this; + ^ --- */ struct A diff --git a/compiler/test/fail_compilation/fail61.d b/compiler/test/fail_compilation/fail61.d index e7175b44245f..65c960933dcf 100644 --- a/compiler/test/fail_compilation/fail61.d +++ b/compiler/test/fail_compilation/fail61.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/fail61.d(25): Error: no property `B` for type `fail61.A.B` -fail_compilation/fail61.d(16): class `B` defined here -fail_compilation/fail61.d(26): Error: no property `B` for type `fail61.A.B` -fail_compilation/fail61.d(16): class `B` defined here -fail_compilation/fail61.d(35): Error: no property `A2` for type `fail61.B2` -fail_compilation/fail61.d(30): class `B2` defined here -fail_compilation/fail61.d(44): Error: calling non-static function `foo` requires an instance of type `B3` +fail_compilation/fail61.d(39): Error: no property `B` for type `fail61.A.B` + int n2 = A.B.B.C; // Line22 + ^ +fail_compilation/fail61.d(30): class `B` defined here + class B : A + ^ +fail_compilation/fail61.d(40): Error: no property `B` for type `fail61.A.B` + int n3 = A.B.B.B.C; // Line23 + ^ +fail_compilation/fail61.d(30): class `B` defined here + class B : A + ^ +fail_compilation/fail61.d(49): Error: no property `A2` for type `fail61.B2` + B2.A2.foo(); // Line32 + ^ +fail_compilation/fail61.d(44): class `B2` defined here +class B2 : A2 { override void foo(){} } +^ +fail_compilation/fail61.d(58): Error: calling non-static function `foo` requires an instance of type `B3` + B3.foo(); // Line41 + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6107.d b/compiler/test/fail_compilation/fail6107.d index a21fbb78f2f0..526c777cb3d4 100644 --- a/compiler/test/fail_compilation/fail6107.d +++ b/compiler/test/fail_compilation/fail6107.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6107.d(10): Error: variable `fail6107.Foo.__ctor` is not a constructor; identifiers starting with `__` are reserved for the implementation -fail_compilation/fail6107.d(14): Error: variable `fail6107.Bar.__ctor` is not a constructor; identifiers starting with `__` are reserved for the implementation +fail_compilation/fail6107.d(14): Error: variable `fail6107.Foo.__ctor` is not a constructor; identifiers starting with `__` are reserved for the implementation + enum __ctor = 4; + ^ +fail_compilation/fail6107.d(18): Error: variable `fail6107.Bar.__ctor` is not a constructor; identifiers starting with `__` are reserved for the implementation + int __ctor = 4; + ^ --- */ struct Foo diff --git a/compiler/test/fail_compilation/fail62.d b/compiler/test/fail_compilation/fail62.d index 6e939dbf91ed..26822201b739 100644 --- a/compiler/test/fail_compilation/fail62.d +++ b/compiler/test/fail_compilation/fail62.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail62.d(11): Error: version `Foo` defined after use +fail_compilation/fail62.d(13): Error: version `Foo` defined after use +version = Foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6242.d b/compiler/test/fail_compilation/fail6242.d index cb2de2c539e4..6b0cbd7363ad 100644 --- a/compiler/test/fail_compilation/fail6242.d +++ b/compiler/test/fail_compilation/fail6242.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6242.d(9): Error: cannot implicitly override base class method `fail6242.A.fun` with `fail6242.B.fun`; add `override` attribute +fail_compilation/fail6242.d(11): Error: cannot implicitly override base class method `fail6242.A.fun` with `fail6242.B.fun`; add `override` attribute +class B : A { void fun(int x) in { assert(x > 0); } do {} } + ^ --- */ class A { void fun(int) {} } diff --git a/compiler/test/fail_compilation/fail63.d b/compiler/test/fail_compilation/fail63.d index e4080ebeac98..bfff2da0bd0f 100644 --- a/compiler/test/fail_compilation/fail63.d +++ b/compiler/test/fail_compilation/fail63.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail63.d(11): Error: debug `Foo` defined after use +fail_compilation/fail63.d(13): Error: debug `Foo` defined after use +debug = Foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6334.d b/compiler/test/fail_compilation/fail6334.d index 7abdb9e26a37..f71b6a1ff424 100644 --- a/compiler/test/fail_compilation/fail6334.d +++ b/compiler/test/fail_compilation/fail6334.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6334.d(13): Error: static assert: `0` is false -fail_compilation/fail6334.d(11): instantiated from here: `T2!()` +fail_compilation/fail6334.d(17): Error: static assert: `0` is false + mixin template T2() { static assert(0); } + ^ +fail_compilation/fail6334.d(15): instantiated from here: `T2!()` + mixin T2; //compiles if these lines + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6451.d b/compiler/test/fail_compilation/fail6451.d index fcc1d76a70a9..9e58b1a39522 100644 --- a/compiler/test/fail_compilation/fail6451.d +++ b/compiler/test/fail_compilation/fail6451.d @@ -2,7 +2,9 @@ DISABLED: win32 win64 linux32 osx32 freebsd32 openbsd32 TEST_OUTPUT: --- -fail_compilation/fail6451.d(9): Error: `__va_list_tag` is not defined, perhaps `import core.stdc.stdarg;` ? +fail_compilation/fail6451.d(11): Error: `__va_list_tag` is not defined, perhaps `import core.stdc.stdarg;` ? +void error(...){} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6453.d b/compiler/test/fail_compilation/fail6453.d index f6ce89f73dcb..1326775e26dc 100644 --- a/compiler/test/fail_compilation/fail6453.d +++ b/compiler/test/fail_compilation/fail6453.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6453.d(13): Error: struct `fail6453.S6453x` mixing invariants with different `shared`/`synchronized` qualifiers is not supported -fail_compilation/fail6453.d(18): Error: class `fail6453.C6453y` mixing invariants with different `shared`/`synchronized` qualifiers is not supported -fail_compilation/fail6453.d(23): Error: class `fail6453.C6453z` mixing invariants with different `shared`/`synchronized` qualifiers is not supported +fail_compilation/fail6453.d(19): Error: struct `fail6453.S6453x` mixing invariants with different `shared`/`synchronized` qualifiers is not supported + shared invariant() {} + ^ +fail_compilation/fail6453.d(24): Error: class `fail6453.C6453y` mixing invariants with different `shared`/`synchronized` qualifiers is not supported + synchronized invariant() {} + ^ +fail_compilation/fail6453.d(29): Error: class `fail6453.C6453z` mixing invariants with different `shared`/`synchronized` qualifiers is not supported + synchronized invariant() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6497.d b/compiler/test/fail_compilation/fail6497.d index 3ac90b5c0c08..fa54f0f2e5b3 100644 --- a/compiler/test/fail_compilation/fail6497.d +++ b/compiler/test/fail_compilation/fail6497.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6497.d(12): Error: cannot take address of local `n` in `@safe` function `main` -fail_compilation/fail6497.d(12): Error: cannot take address of local `n` in `@safe` function `main` +fail_compilation/fail6497.d(16): Error: cannot take address of local `n` in `@safe` function `main` + auto b = &(0 ? n : n); + ^ +fail_compilation/fail6497.d(16): Error: cannot take address of local `n` in `@safe` function `main` + auto b = &(0 ? n : n); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6561.d b/compiler/test/fail_compilation/fail6561.d index 456ef0de7f57..4256456218ad 100644 --- a/compiler/test/fail_compilation/fail6561.d +++ b/compiler/test/fail_compilation/fail6561.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6561.d(9): Error: undefined identifier `x` +fail_compilation/fail6561.d(11): Error: undefined identifier `x` + alias x this; // should cause undefined identifier error + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/fail6611.d b/compiler/test/fail_compilation/fail6611.d index 26587dc7e5ab..7707f2bf6f46 100644 --- a/compiler/test/fail_compilation/fail6611.d +++ b/compiler/test/fail_compilation/fail6611.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6611.d(11): Error: cannot post-increment array slice `x[]`, use pre-increment instead +fail_compilation/fail6611.d(13): Error: cannot post-increment array slice `x[]`, use pre-increment instead + x[]++; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6652.d b/compiler/test/fail_compilation/fail6652.d index 78cea67723c0..8e3a8b9f0d8b 100644 --- a/compiler/test/fail_compilation/fail6652.d +++ b/compiler/test/fail_compilation/fail6652.d @@ -6,10 +6,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6652.d(20): Error: cannot modify `const` expression `i` -fail_compilation/fail6652.d(25): Error: cannot modify `const` expression `i` -fail_compilation/fail6652.d(30): Error: cannot modify `const` expression `i` -fail_compilation/fail6652.d(35): Error: cannot modify `const` expression `i` +fail_compilation/fail6652.d(28): Error: cannot modify `const` expression `i` + ++i; + ^ +fail_compilation/fail6652.d(33): Error: cannot modify `const` expression `i` + ++i; + ^ +fail_compilation/fail6652.d(38): Error: cannot modify `const` expression `i` + ++i; + ^ +fail_compilation/fail6652.d(43): Error: cannot modify `const` expression `i` + ++i; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6781.d b/compiler/test/fail_compilation/fail6781.d index 174ca3d2481a..08218c0567ac 100644 --- a/compiler/test/fail_compilation/fail6781.d +++ b/compiler/test/fail_compilation/fail6781.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6781.d(9): Error: undefined identifier `some_error` -fail_compilation/fail6781.d(14): Error: template instance `fail6781.C6781.makeSortedIndices.bug6781!(greater)` error instantiating +fail_compilation/fail6781.d(13): Error: undefined identifier `some_error` + some_error; + ^ +fail_compilation/fail6781.d(18): Error: template instance `fail6781.C6781.makeSortedIndices.bug6781!(greater)` error instantiating + bug6781!greater(); + ^ --- */ void bug6781(alias xxx)() { diff --git a/compiler/test/fail_compilation/fail6795.d b/compiler/test/fail_compilation/fail6795.d index 26d442964988..c51d24234815 100644 --- a/compiler/test/fail_compilation/fail6795.d +++ b/compiler/test/fail_compilation/fail6795.d @@ -2,12 +2,24 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6795.d(19): Error: cannot modify expression `[0][0]` because it is not an lvalue -fail_compilation/fail6795.d(20): Error: cannot modify expression `[0:0][0]` because it is not an lvalue -fail_compilation/fail6795.d(22): Error: cannot modify expression `[0][0]` because it is not an lvalue -fail_compilation/fail6795.d(23): Error: cannot modify expression `[0:0][0]` because it is not an lvalue -fail_compilation/fail6795.d(25): Error: cannot take address of expression `[0][0]` because it is not an lvalue -fail_compilation/fail6795.d(26): Error: cannot take address of expression `[0:0][0]` because it is not an lvalue +fail_compilation/fail6795.d(31): Error: cannot modify expression `[0][0]` because it is not an lvalue + sa[0]++; + ^ +fail_compilation/fail6795.d(32): Error: cannot modify expression `[0:0][0]` because it is not an lvalue + --aa[0]; + ^ +fail_compilation/fail6795.d(34): Error: cannot modify expression `[0][0]` because it is not an lvalue + sa[0] *= 3; + ^ +fail_compilation/fail6795.d(35): Error: cannot modify expression `[0:0][0]` because it is not an lvalue + aa[0] /= 3; + ^ +fail_compilation/fail6795.d(37): Error: cannot take address of expression `[0][0]` because it is not an lvalue + auto ps = &sa[0]; + ^ +fail_compilation/fail6795.d(38): Error: cannot take address of expression `[0:0][0]` because it is not an lvalue + auto pa = &aa[0]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail6968.d b/compiler/test/fail_compilation/fail6968.d index aca90c6c3dd0..213945fa8d09 100644 --- a/compiler/test/fail_compilation/fail6968.d +++ b/compiler/test/fail_compilation/fail6968.d @@ -2,11 +2,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail6968.d(26): Error: cannot pass type `int` as a function argument -fail_compilation/fail6968.d(26): Error: cannot pass type `long` as a function argument -fail_compilation/fail6968.d(26): Error: circular initialization of variable `fail6968.PredAny!(int, long, float).PredAny` -fail_compilation/fail6968.d(31): Error: template instance `fail6968.PredAny!(int, long, float)` error instantiating -fail_compilation/fail6968.d(31): while evaluating `pragma(msg, PredAny!(int, long, float))` +fail_compilation/fail6968.d(36): Error: cannot pass type `int` as a function argument + enum bool PredAny = Pred(A, B[0]) || PredAny(A, B[1..$]); + ^ +fail_compilation/fail6968.d(36): Error: cannot pass type `long` as a function argument + enum bool PredAny = Pred(A, B[0]) || PredAny(A, B[1..$]); + ^ +fail_compilation/fail6968.d(36): Error: circular initialization of variable `fail6968.PredAny!(int, long, float).PredAny` + enum bool PredAny = Pred(A, B[0]) || PredAny(A, B[1..$]); + ^ +fail_compilation/fail6968.d(41): Error: template instance `fail6968.PredAny!(int, long, float)` error instantiating + pragma(msg, PredAny!(int, long, float)); + ^ +fail_compilation/fail6968.d(41): while evaluating `pragma(msg, PredAny!(int, long, float))` + pragma(msg, PredAny!(int, long, float)); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7077.d b/compiler/test/fail_compilation/fail7077.d index 8a3af6f9e691..524d82c4f9ff 100644 --- a/compiler/test/fail_compilation/fail7077.d +++ b/compiler/test/fail_compilation/fail7077.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7077.d(11): Error: undefined identifier `x` +fail_compilation/fail7077.d(13): Error: undefined identifier `x` + assert(x == 2); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7173.d b/compiler/test/fail_compilation/fail7173.d index 05ba7f9fc0a4..bebc07c49f91 100644 --- a/compiler/test/fail_compilation/fail7173.d +++ b/compiler/test/fail_compilation/fail7173.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7173.d(23): Error: expression `b1._a.opBinary(b2._a).fun()` is `void` and has no value +fail_compilation/fail7173.d(25): Error: expression `b1._a.opBinary(b2._a).fun()` is `void` and has no value + B b1, b2, b3; b3 = (b1 - b2).fun(); + ^ --- */ struct A{ diff --git a/compiler/test/fail_compilation/fail7178.d b/compiler/test/fail_compilation/fail7178.d index 38c4b007684c..bfbf4d5386c9 100644 --- a/compiler/test/fail_compilation/fail7178.d +++ b/compiler/test/fail_compilation/fail7178.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7178.d(10): Error: undefined identifier `contents` in module `fail7178` -fail_compilation/fail7178.d(12): Error: mixin `fail7178.populate!int` error instantiating +fail_compilation/fail7178.d(14): Error: undefined identifier `contents` in module `fail7178` + mixin populate!(.contents); + ^ +fail_compilation/fail7178.d(16): Error: mixin `fail7178.populate!int` error instantiating +public mixin populate!int; + ^ --- */ template populate(overloads...) diff --git a/compiler/test/fail_compilation/fail72.d b/compiler/test/fail_compilation/fail72.d index 919baec4a215..8e285ea9f336 100644 --- a/compiler/test/fail_compilation/fail72.d +++ b/compiler/test/fail_compilation/fail72.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail72.d(10): Error: undefined identifier `foo` +fail_compilation/fail72.d(12): Error: undefined identifier `foo` + synchronized( foo ) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7234.d b/compiler/test/fail_compilation/fail7234.d index eb5ec7a590de..b9b89ec17f7d 100644 --- a/compiler/test/fail_compilation/fail7234.d +++ b/compiler/test/fail_compilation/fail7234.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7234.d(14): Error: no property `empty` for type `Contract*`, perhaps `import std.range;` is needed? +fail_compilation/fail7234.d(16): Error: no property `empty` for type `Contract*`, perhaps `import std.range;` is needed? + Contract* r; if (r.empty) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail73.d b/compiler/test/fail_compilation/fail73.d index d9dd8a37fee7..dc4d4541af96 100644 --- a/compiler/test/fail_compilation/fail73.d +++ b/compiler/test/fail_compilation/fail73.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail73.d(20): Error: `case` not in `switch` statement +fail_compilation/fail73.d(22): Error: `case` not in `switch` statement + case 2: + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7352.d b/compiler/test/fail_compilation/fail7352.d index f5e8f9b37595..067aaf56b0c2 100644 --- a/compiler/test/fail_compilation/fail7352.d +++ b/compiler/test/fail_compilation/fail7352.d @@ -1,17 +1,33 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7352.d(42): Error: template instance `Type!(1)` does not match template declaration `Type(T)` -fail_compilation/fail7352.d(43): Error: template instance `Type!(b)` does not match template declaration `Type(T)` -fail_compilation/fail7352.d(43): `b` is not a type -fail_compilation/fail7352.d(44): Error: template instance `Type!(function () pure nothrow @nogc @safe => 1)` does not match template declaration `Type(T)` -fail_compilation/fail7352.d(45): Error: template instance `Type!(fun)` does not match template declaration `Type(T)` -fail_compilation/fail7352.d(45): `fun` is not a type -fail_compilation/fail7352.d(47): Error: template instance `Immutable!int` does not match template declaration `Immutable(T : immutable(T))` -fail_compilation/fail7352.d(49): Error: template instance `Value!int` does not match template declaration `Value(string s)` -fail_compilation/fail7352.d(50): Error: template instance `Value!(1)` does not match template declaration `Value(string s)` -fail_compilation/fail7352.d(51): Error: template instance `Value!(fun)` does not match template declaration `Value(string s)` -fail_compilation/fail7352.d(51): `fun` is not of a value of type `string` +fail_compilation/fail7352.d(58): Error: template instance `Type!(1)` does not match template declaration `Type(T)` + Type!a testTypeValue; + ^ +fail_compilation/fail7352.d(59): Error: template instance `Type!(b)` does not match template declaration `Type(T)` + Type!b testTypeVar; + ^ +fail_compilation/fail7352.d(59): `b` is not a type +fail_compilation/fail7352.d(60): Error: template instance `Type!(function () pure nothrow @nogc @safe => 1)` does not match template declaration `Type(T)` + Type!(() => 1) testTypeFuncLiteral; + ^ +fail_compilation/fail7352.d(61): Error: template instance `Type!(fun)` does not match template declaration `Type(T)` + Type!fun testTypeFunc; + ^ +fail_compilation/fail7352.d(61): `fun` is not a type +fail_compilation/fail7352.d(63): Error: template instance `Immutable!int` does not match template declaration `Immutable(T : immutable(T))` + Immutable!int testImmutable; + ^ +fail_compilation/fail7352.d(65): Error: template instance `Value!int` does not match template declaration `Value(string s)` + auto testValueType = Value!int.x; + ^ +fail_compilation/fail7352.d(66): Error: template instance `Value!(1)` does not match template declaration `Value(string s)` + auto testValueWrongType = Value!a.x; + ^ +fail_compilation/fail7352.d(67): Error: template instance `Value!(fun)` does not match template declaration `Value(string s)` + auto testValueFunc = Value!fun.x; + ^ +fail_compilation/fail7352.d(67): `fun` is not of a value of type `string` --- */ diff --git a/compiler/test/fail_compilation/fail7369.d b/compiler/test/fail_compilation/fail7369.d index 4ba11e4abb78..6debc04ee22f 100644 --- a/compiler/test/fail_compilation/fail7369.d +++ b/compiler/test/fail_compilation/fail7369.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7369.d(9): Error: cannot modify `this.a` in `const` function +fail_compilation/fail7369.d(11): Error: cannot modify `this.a` in `const` function + invariant() { a += 5; } + ^ --- */ struct S7369 { diff --git a/compiler/test/fail_compilation/fail7372.d b/compiler/test/fail_compilation/fail7372.d index 2d56e0969c28..e97d6ad65203 100644 --- a/compiler/test/fail_compilation/fail7372.d +++ b/compiler/test/fail_compilation/fail7372.d @@ -2,7 +2,11 @@ TEST_OUTPUT: --- fail_compilation/imports/fail7372.d(7): Error: undefined identifier `X` + int foo = X; + ^ fail_compilation/fail7372.d(4): parent scope from here: `mixin Issue7372!()` +fail_compilation/imports/fail7372.d(7): Error: undefined identifier `X` + ^ --- */ #line 1 diff --git a/compiler/test/fail_compilation/fail74.d b/compiler/test/fail_compilation/fail74.d index 79449eb1db31..d33f2482c7b3 100644 --- a/compiler/test/fail_compilation/fail74.d +++ b/compiler/test/fail_compilation/fail74.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail74.d(13): Error: cannot append type `C[1]` to type `C[1]` +fail_compilation/fail74.d(15): Error: cannot append type `C[1]` to type `C[1]` + c ~= c; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7424b.d b/compiler/test/fail_compilation/fail7424b.d index c3fc3116939c..eb625e10cfa6 100644 --- a/compiler/test/fail_compilation/fail7424b.d +++ b/compiler/test/fail_compilation/fail7424b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424b.d(10): Error: template `this.g()()` has no value +fail_compilation/fail7424b.d(12): Error: template `this.g()()` has no value + void test() const { int f = g; } + ^ --- */ struct S7424b diff --git a/compiler/test/fail_compilation/fail7424c.d b/compiler/test/fail_compilation/fail7424c.d index f13ba14419ff..2bbf0b48650f 100644 --- a/compiler/test/fail_compilation/fail7424c.d +++ b/compiler/test/fail_compilation/fail7424c.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424c.d(10): Error: template `this.g()()` has no value +fail_compilation/fail7424c.d(12): Error: template `this.g()()` has no value + void test() immutable { int f = g; } + ^ --- */ struct S7424c diff --git a/compiler/test/fail_compilation/fail7424d.d b/compiler/test/fail_compilation/fail7424d.d index 920956bf2f98..ca09633a3e29 100644 --- a/compiler/test/fail_compilation/fail7424d.d +++ b/compiler/test/fail_compilation/fail7424d.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424d.d(10): Error: template `this.g()() immutable` has no value +fail_compilation/fail7424d.d(12): Error: template `this.g()() immutable` has no value + void test() const { int f = g; } + ^ --- */ struct S7424d diff --git a/compiler/test/fail_compilation/fail7424e.d b/compiler/test/fail_compilation/fail7424e.d index ddf9d1a89b39..e96ee444d716 100644 --- a/compiler/test/fail_compilation/fail7424e.d +++ b/compiler/test/fail_compilation/fail7424e.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424e.d(10): Error: template `this.g()() immutable` has no value +fail_compilation/fail7424e.d(12): Error: template `this.g()() immutable` has no value + void test() { int f = g; } + ^ --- */ struct S7424e diff --git a/compiler/test/fail_compilation/fail7424f.d b/compiler/test/fail_compilation/fail7424f.d index 2f7f8f36153f..91d6e48ec544 100644 --- a/compiler/test/fail_compilation/fail7424f.d +++ b/compiler/test/fail_compilation/fail7424f.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424f.d(10): Error: template `this.g()() shared` has no value +fail_compilation/fail7424f.d(12): Error: template `this.g()() shared` has no value + void test() { int f = g; } + ^ --- */ struct S7424f diff --git a/compiler/test/fail_compilation/fail7424g.d b/compiler/test/fail_compilation/fail7424g.d index 4499b97bbd27..369096c83b01 100644 --- a/compiler/test/fail_compilation/fail7424g.d +++ b/compiler/test/fail_compilation/fail7424g.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424g.d(10): Error: template `this.g()()` has no value +fail_compilation/fail7424g.d(12): Error: template `this.g()()` has no value + void test() shared { int f = g; } + ^ --- */ struct S7424g diff --git a/compiler/test/fail_compilation/fail7424h.d b/compiler/test/fail_compilation/fail7424h.d index e48408c46812..56a38ca788f2 100644 --- a/compiler/test/fail_compilation/fail7424h.d +++ b/compiler/test/fail_compilation/fail7424h.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424h.d(10): Error: template `this.g()()` has no value +fail_compilation/fail7424h.d(12): Error: template `this.g()()` has no value + void test() inout { int f = g; } + ^ --- */ struct S7424g diff --git a/compiler/test/fail_compilation/fail7424i.d b/compiler/test/fail_compilation/fail7424i.d index 4e922d6f5bea..e7f56ca0bd08 100644 --- a/compiler/test/fail_compilation/fail7424i.d +++ b/compiler/test/fail_compilation/fail7424i.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7424i.d(10): Error: template `this.g()() immutable` has no value +fail_compilation/fail7424i.d(12): Error: template `this.g()() immutable` has no value + void test() inout { int f = g; } + ^ --- */ struct S7424g diff --git a/compiler/test/fail_compilation/fail7443.d b/compiler/test/fail_compilation/fail7443.d index 2c5c94007462..8ea73ed32ab3 100644 --- a/compiler/test/fail_compilation/fail7443.d +++ b/compiler/test/fail_compilation/fail7443.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7443.d(11): Error: `static` has no effect on a constructor inside a `static` block. Use `static this()` -fail_compilation/fail7443.d(12): Error: `shared static` has no effect on a constructor inside a `shared static` block. Use `shared static this()` +fail_compilation/fail7443.d(15): Error: `static` has no effect on a constructor inside a `static` block. Use `static this()` + public static { this() {}} + ^ +fail_compilation/fail7443.d(16): Error: `shared static` has no effect on a constructor inside a `shared static` block. Use `shared static this()` + public shared static { this() {}} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail75.d b/compiler/test/fail_compilation/fail75.d index 0b0b8e09ddee..76c65a685993 100644 --- a/compiler/test/fail_compilation/fail75.d +++ b/compiler/test/fail_compilation/fail75.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail75.d(13): Error: cannot append type `fail75.C` to type `C[1]` +fail_compilation/fail75.d(15): Error: cannot append type `fail75.C` to type `C[1]` + c ~= this; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7524a.d b/compiler/test/fail_compilation/fail7524a.d index 237b313baaa9..93c8d38fca05 100644 --- a/compiler/test/fail_compilation/fail7524a.d +++ b/compiler/test/fail_compilation/fail7524a.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: ---- -fail_compilation/fail7524a.d(9): Error: invalid filename for `#line` directive +fail_compilation/fail7524a.d(11): Error: invalid filename for `#line` directive +#line 47 __DATE__ + ^ ---- */ diff --git a/compiler/test/fail_compilation/fail7524b.d b/compiler/test/fail_compilation/fail7524b.d index feee61b8d7d3..acf8873ed774 100644 --- a/compiler/test/fail_compilation/fail7524b.d +++ b/compiler/test/fail_compilation/fail7524b.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7524b.d(9): Error: invalid filename for `#line` directive +fail_compilation/fail7524b.d(11): Error: invalid filename for `#line` directive +#line 47 __VERSION__ + ^ --- */ diff --git a/compiler/test/fail_compilation/fail76.d b/compiler/test/fail_compilation/fail76.d index 673fc7a13ffd..99c78ce16345 100644 --- a/compiler/test/fail_compilation/fail76.d +++ b/compiler/test/fail_compilation/fail76.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail76.d(9): Error: alias `fail76.a` conflicts with alias `fail76.a` at fail_compilation/fail76.d(8) +fail_compilation/fail76.d(11): Error: alias `fail76.a` conflicts with alias `fail76.a` at fail_compilation/fail76.d(10) +alias void a; +^ --- */ diff --git a/compiler/test/fail_compilation/fail7603a.d b/compiler/test/fail_compilation/fail7603a.d index a106a566a5c4..6e3fc0063cf8 100644 --- a/compiler/test/fail_compilation/fail7603a.d +++ b/compiler/test/fail_compilation/fail7603a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7603a.d(7): Error: cannot create default argument for `ref` / `out` parameter from constant `true` +fail_compilation/fail7603a.d(9): Error: cannot create default argument for `ref` / `out` parameter from constant `true` +void test(ref bool val = true) { } + ^ --- */ void test(ref bool val = true) { } diff --git a/compiler/test/fail_compilation/fail7603b.d b/compiler/test/fail_compilation/fail7603b.d index a6524221afd8..b5907f55ad78 100644 --- a/compiler/test/fail_compilation/fail7603b.d +++ b/compiler/test/fail_compilation/fail7603b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7603b.d(7): Error: cannot create default argument for `ref` / `out` parameter from constant `true` +fail_compilation/fail7603b.d(9): Error: cannot create default argument for `ref` / `out` parameter from constant `true` +void test(out bool val = true) { } + ^ --- */ void test(out bool val = true) { } diff --git a/compiler/test/fail_compilation/fail7603c.d b/compiler/test/fail_compilation/fail7603c.d index 3d030fc9668c..af2fc7bb2d2e 100644 --- a/compiler/test/fail_compilation/fail7603c.d +++ b/compiler/test/fail_compilation/fail7603c.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7603c.d(8): Error: cannot create default argument for `ref` / `out` parameter from constant `3` +fail_compilation/fail7603c.d(10): Error: cannot create default argument for `ref` / `out` parameter from constant `3` +void test(ref int val = x) { } + ^ --- */ enum x = 3; diff --git a/compiler/test/fail_compilation/fail77.d b/compiler/test/fail_compilation/fail77.d index 2d291fc9f5cf..3b9c5d11ef8c 100644 --- a/compiler/test/fail_compilation/fail77.d +++ b/compiler/test/fail_compilation/fail77.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail77.d(11): Error: cannot cast expression `& i` of type `int*` to `ubyte[4]` +fail_compilation/fail77.d(13): Error: cannot cast expression `& i` of type `int*` to `ubyte[4]` + ub[] = cast(ubyte[4]) &i; + ^ --- */ void test() diff --git a/compiler/test/fail_compilation/fail7702.d b/compiler/test/fail_compilation/fail7702.d index 4638c0bcfa4e..9c4675d1acb0 100644 --- a/compiler/test/fail_compilation/fail7702.d +++ b/compiler/test/fail_compilation/fail7702.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7702.d(14): Error: `s.opDispatch!"x"` isn't a template +fail_compilation/fail7702.d(16): Error: `s.opDispatch!"x"` isn't a template + s.x!int; + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/fail7751.d b/compiler/test/fail_compilation/fail7751.d index 87143fa7d243..c207411535a9 100644 --- a/compiler/test/fail_compilation/fail7751.d +++ b/compiler/test/fail_compilation/fail7751.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7751.d(15): Error: no constructor for `Foo` -fail_compilation/fail7751.d(23): Error: template instance `fail7751.foo!int` error instantiating +fail_compilation/fail7751.d(19): Error: no constructor for `Foo` + return new Foo!T(x, y); + ^ +fail_compilation/fail7751.d(27): Error: template instance `fail7751.foo!int` error instantiating + bar(foo(0)); + ^ --- */ class Foo(T) diff --git a/compiler/test/fail_compilation/fail78.d b/compiler/test/fail_compilation/fail78.d index 99572c431c36..fbd5dfffbdec 100644 --- a/compiler/test/fail_compilation/fail78.d +++ b/compiler/test/fail_compilation/fail78.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail78.d(9): Error: undefined identifier `inch` +fail_compilation/fail78.d(11): Error: undefined identifier `inch` +auto ft = inch * 12; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7848.d b/compiler/test/fail_compilation/fail7848.d index 001c7d75443c..33abf02a8f8c 100644 --- a/compiler/test/fail_compilation/fail7848.d +++ b/compiler/test/fail_compilation/fail7848.d @@ -3,18 +3,42 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7848.d(27): Error: `pure` function `fail7848.C.__unittest_L25_C30` cannot call impure function `fail7848.func` -fail_compilation/fail7848.d(27): Error: `@safe` function `fail7848.C.__unittest_L25_C30` cannot call `@system` function `fail7848.func` -fail_compilation/fail7848.d(21): `fail7848.func` is declared here -fail_compilation/fail7848.d(27): Error: `@nogc` function `fail7848.C.__unittest_L25_C30` cannot call non-@nogc function `fail7848.func` -fail_compilation/fail7848.d(27): Error: function `fail7848.func` is not `nothrow` -fail_compilation/fail7848.d(25): Error: function `fail7848.C.__unittest_L25_C30` may throw but is marked as `nothrow` -fail_compilation/fail7848.d(32): Error: `pure` function `fail7848.C.__invariant0` cannot call impure function `fail7848.func` -fail_compilation/fail7848.d(32): Error: `@safe` function `fail7848.C.__invariant0` cannot call `@system` function `fail7848.func` -fail_compilation/fail7848.d(21): `fail7848.func` is declared here -fail_compilation/fail7848.d(32): Error: `@nogc` function `fail7848.C.__invariant0` cannot call non-@nogc function `fail7848.func` -fail_compilation/fail7848.d(32): Error: function `fail7848.func` is not `nothrow` -fail_compilation/fail7848.d(30): Error: function `fail7848.C.__invariant0` may throw but is marked as `nothrow` +fail_compilation/fail7848.d(51): Error: `pure` function `fail7848.C.__unittest_L49_C30` cannot call impure function `fail7848.func` + func(); + ^ +fail_compilation/fail7848.d(51): Error: `@safe` function `fail7848.C.__unittest_L49_C30` cannot call `@system` function `fail7848.func` + func(); + ^ +fail_compilation/fail7848.d(45): `fail7848.func` is declared here +void func() {} + ^ +fail_compilation/fail7848.d(51): Error: `@nogc` function `fail7848.C.__unittest_L49_C30` cannot call non-@nogc function `fail7848.func` + func(); + ^ +fail_compilation/fail7848.d(51): Error: function `fail7848.func` is not `nothrow` + func(); + ^ +fail_compilation/fail7848.d(49): Error: function `fail7848.C.__unittest_L49_C30` may throw but is marked as `nothrow` + @safe pure nothrow @nogc unittest + ^ +fail_compilation/fail7848.d(56): Error: `pure` function `fail7848.C.__invariant0` cannot call impure function `fail7848.func` + func(); + ^ +fail_compilation/fail7848.d(56): Error: `@safe` function `fail7848.C.__invariant0` cannot call `@system` function `fail7848.func` + func(); + ^ +fail_compilation/fail7848.d(45): `fail7848.func` is declared here +void func() {} + ^ +fail_compilation/fail7848.d(56): Error: `@nogc` function `fail7848.C.__invariant0` cannot call non-@nogc function `fail7848.func` + func(); + ^ +fail_compilation/fail7848.d(56): Error: function `fail7848.func` is not `nothrow` + func(); + ^ +fail_compilation/fail7848.d(54): Error: function `fail7848.C.__invariant0` may throw but is marked as `nothrow` + @safe pure nothrow @nogc invariant + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7851.d b/compiler/test/fail_compilation/fail7851.d index acc49f144c3b..6d191b182908 100644 --- a/compiler/test/fail_compilation/fail7851.d +++ b/compiler/test/fail_compilation/fail7851.d @@ -2,9 +2,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7851.d(38): Error: accessing non-static variable `__mem_field_0` requires an instance of `Tuple` -fail_compilation/fail7851.d(38): Error: accessing non-static variable `__mem_field_1` requires an instance of `Tuple` -fail_compilation/fail7851.d(38): Error: accessing non-static variable `__mem_field_2` requires an instance of `Tuple` +fail_compilation/fail7851.d(44): Error: accessing non-static variable `__mem_field_0` requires an instance of `Tuple` + foreach (i; TL) + ^ +fail_compilation/fail7851.d(44): Error: accessing non-static variable `__mem_field_1` requires an instance of `Tuple` + foreach (i; TL) + ^ +fail_compilation/fail7851.d(44): Error: accessing non-static variable `__mem_field_2` requires an instance of `Tuple` + foreach (i; TL) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7859.d b/compiler/test/fail_compilation/fail7859.d index c3d437c52f4e..be9911b30957 100644 --- a/compiler/test/fail_compilation/fail7859.d +++ b/compiler/test/fail_compilation/fail7859.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7859.d(9): Error: undefined identifier `NonExistent` +fail_compilation/fail7859.d(11): Error: undefined identifier `NonExistent` +mixin template C(alias B = cast(NonExistent)null) { + ^ --- */ template A(alias B) {} diff --git a/compiler/test/fail_compilation/fail7861.d b/compiler/test/fail_compilation/fail7861.d index a24eb95fbdf4..54ad8d18de65 100644 --- a/compiler/test/fail_compilation/fail7861.d +++ b/compiler/test/fail_compilation/fail7861.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7861.d(18): Error: no property `nonexistent` for type `test.B` -fail_compilation/fail7861.d(14): struct `B` defined here +fail_compilation/fail7861.d(22): Error: no property `nonexistent` for type `test.B` +enum C = B.nonexistent; + ^ +fail_compilation/fail7861.d(18): struct `B` defined here +struct B { +^ --- */ module test; diff --git a/compiler/test/fail_compilation/fail7862.d b/compiler/test/fail_compilation/fail7862.d index 08e6f6930c0b..a52bcc1878f5 100644 --- a/compiler/test/fail_compilation/fail7862.d +++ b/compiler/test/fail_compilation/fail7862.d @@ -3,8 +3,12 @@ TEST_OUTPUT: --- A: false A: false -fail_compilation/fail7862.d(26): Error: template instance `nonExistent!()` template `nonExistent` is not defined -fail_compilation/fail7862.d(25): Error: template instance `fail7862.B!(A)` error instantiating +fail_compilation/fail7862.d(30): Error: template instance `nonExistent!()` template `nonExistent` is not defined + static if (nonExistent!()) {} + ^ +fail_compilation/fail7862.d(29): Error: template instance `fail7862.B!(A)` error instantiating + B!A c; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail79.d b/compiler/test/fail_compilation/fail79.d index affda7907d5d..25772e5fde29 100644 --- a/compiler/test/fail_compilation/fail79.d +++ b/compiler/test/fail_compilation/fail79.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail79.d(13): Error: incompatible types for `(& a) + (& b)`: both operands are of type `int*` +fail_compilation/fail79.d(15): Error: incompatible types for `(& a) + (& b)`: both operands are of type `int*` + p = &a + &b; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail7903.d b/compiler/test/fail_compilation/fail7903.d index 18168ea23618..d46050216201 100644 --- a/compiler/test/fail_compilation/fail7903.d +++ b/compiler/test/fail_compilation/fail7903.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail7903.d(21): Error: variable `fail7903.F1.x` Field members of a `synchronized` class cannot be `public` -fail_compilation/fail7903.d(22): Error: variable `fail7903.F1.y` Field members of a `synchronized` class cannot be `export` -fail_compilation/fail7903.d(27): Error: variable `fail7903.F2.x` Field members of a `synchronized` class cannot be `public` +fail_compilation/fail7903.d(27): Error: variable `fail7903.F1.x` Field members of a `synchronized` class cannot be `public` + public int x; + ^ +fail_compilation/fail7903.d(28): Error: variable `fail7903.F1.y` Field members of a `synchronized` class cannot be `export` + export int y; + ^ +fail_compilation/fail7903.d(33): Error: variable `fail7903.F2.x` Field members of a `synchronized` class cannot be `public` + int x; + ^ --- */ synchronized class K1 diff --git a/compiler/test/fail_compilation/fail8009.d b/compiler/test/fail_compilation/fail8009.d index f2abfcc0083f..dd8379ac55a1 100644 --- a/compiler/test/fail_compilation/fail8009.d +++ b/compiler/test/fail_compilation/fail8009.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8009.d(9): Error: template `filter` is not callable using argument types `!()(void)` -fail_compilation/fail8009.d(8): Candidate is: `filter(R)(scope bool delegate(ref BAD!R) func)` +fail_compilation/fail8009.d(13): Error: template `filter` is not callable using argument types `!()(void)` +void main() { filter(r => r); } + ^ +fail_compilation/fail8009.d(12): Candidate is: `filter(R)(scope bool delegate(ref BAD!R) func)` +void filter(R)(scope bool delegate(ref BAD!R) func) { } + ^ --- */ void filter(R)(scope bool delegate(ref BAD!R) func) { } diff --git a/compiler/test/fail_compilation/fail8032.d b/compiler/test/fail_compilation/fail8032.d index 9f6dc40669f6..18c73f7fada8 100644 --- a/compiler/test/fail_compilation/fail8032.d +++ b/compiler/test/fail_compilation/fail8032.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8032.d(19): Error: function `fail8032.B.f` cannot determine overridden function +fail_compilation/fail8032.d(21): Error: function `fail8032.B.f` cannot determine overridden function + override void f() { } + ^ --- */ mixin template T() diff --git a/compiler/test/fail_compilation/fail80_m32.d b/compiler/test/fail_compilation/fail80_m32.d index a378fbbfdeb6..92df340dedbf 100644 --- a/compiler/test/fail_compilation/fail80_m32.d +++ b/compiler/test/fail_compilation/fail80_m32.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail80_m32.d(28): Error: cannot implicitly convert expression `"progress_rem"` of type `string` to `uint` -fail_compilation/fail80_m32.d(29): Error: cannot implicitly convert expression `"redo"` of type `string` to `uint` +fail_compilation/fail80_m32.d(32): Error: cannot implicitly convert expression `"progress_rem"` of type `string` to `uint` + images["progress_rem"] = ResourceManager.getImage("progress_rem.gif"); // delete_obj_dis + ^ +fail_compilation/fail80_m32.d(33): Error: cannot implicitly convert expression `"redo"` of type `string` to `uint` + images["redo"] = ResourceManager.getImage("redo.gif"); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail80_m64.d b/compiler/test/fail_compilation/fail80_m64.d index e0cc871323bb..197828b864bc 100644 --- a/compiler/test/fail_compilation/fail80_m64.d +++ b/compiler/test/fail_compilation/fail80_m64.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail80_m64.d(28): Error: cannot implicitly convert expression `"progress_rem"` of type `string` to `ulong` -fail_compilation/fail80_m64.d(29): Error: cannot implicitly convert expression `"redo"` of type `string` to `ulong` +fail_compilation/fail80_m64.d(32): Error: cannot implicitly convert expression `"progress_rem"` of type `string` to `ulong` + images["progress_rem"] = ResourceManager.getImage("progress_rem.gif"); // delete_obj_dis + ^ +fail_compilation/fail80_m64.d(33): Error: cannot implicitly convert expression `"redo"` of type `string` to `ulong` + images["redo"] = ResourceManager.getImage("redo.gif"); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail8168.d b/compiler/test/fail_compilation/fail8168.d index 9ee1ce7fcc68..3672bbe7867a 100644 --- a/compiler/test/fail_compilation/fail8168.d +++ b/compiler/test/fail_compilation/fail8168.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8168.d(9): Error: opcode expected, not `unknown` +fail_compilation/fail8168.d(11): Error: opcode expected, not `unknown` + unknown; // wrong opcode + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/fail8179b.d b/compiler/test/fail_compilation/fail8179b.d index e59648f007f4..abd5ccc951a6 100644 --- a/compiler/test/fail_compilation/fail8179b.d +++ b/compiler/test/fail_compilation/fail8179b.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8179b.d(10): Error: cannot cast expression `[1, 2]` of type `int[]` to `int[2][1]` +fail_compilation/fail8179b.d(12): Error: cannot cast expression `[1, 2]` of type `int[]` to `int[2][1]` + foo(cast(int[2][1])[1, 2]); + ^ --- */ void foo(int[2][1]) {} diff --git a/compiler/test/fail_compilation/fail8217.d b/compiler/test/fail_compilation/fail8217.d index 477ca63a9e8e..23867fa2cefe 100644 --- a/compiler/test/fail_compilation/fail8217.d +++ b/compiler/test/fail_compilation/fail8217.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8217.d(22): Error: `this` for `foo` needs to be type `D` not type `fail8217.D.C` +fail_compilation/fail8217.d(24): Error: `this` for `foo` needs to be type `D` not type `fail8217.D.C` + return bar!().foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail8262.d b/compiler/test/fail_compilation/fail8262.d index 2df1bca4fe35..02cc3fd1794f 100644 --- a/compiler/test/fail_compilation/fail8262.d +++ b/compiler/test/fail_compilation/fail8262.d @@ -1,8 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8262.d(32): Error: initializer must be an expression, not `Tuple8262!1` -fail_compilation/fail8262.d(27): Error: template instance `fail8262.T8262!(Tuple8262!1)` error instantiating -fail_compilation/fail8262.d(19): Error: cannot implicitly convert expression `S(0)` of type `S` to `int` +fail_compilation/fail8262.d(38): Error: initializer must be an expression, not `Tuple8262!1` + immutable(int) T8262 = T; + ^ +fail_compilation/fail8262.d(33): Error: template instance `fail8262.T8262!(Tuple8262!1)` error instantiating +auto data = T8262!(Tuple8262!1); + ^ +fail_compilation/fail8262.d(25): Error: cannot implicitly convert expression `S(0)` of type `S` to `int` +int si = S.init; + ^ --- * https://issues.dlang.org/show_bug.cgi?id=8262 */ diff --git a/compiler/test/fail_compilation/fail8313.d b/compiler/test/fail_compilation/fail8313.d index 2badeff454bc..c3adfc8f818e 100644 --- a/compiler/test/fail_compilation/fail8313.d +++ b/compiler/test/fail_compilation/fail8313.d @@ -1,11 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8313.d(13): Error: `fail8313.bar` called with argument types `(int)` matches both: -fail_compilation/fail8313.d(11): `fail8313.bar!().bar(int x)` +fail_compilation/fail8313.d(17): Error: `fail8313.bar` called with argument types `(int)` matches both: +fail_compilation/fail8313.d(15): `fail8313.bar!().bar(int x)` and: -fail_compilation/fail8313.d(12): `fail8313.bar!().bar(int x)` -fail_compilation/fail8313.d(13): while evaluating: `static assert(bar()(int x)(1))` +fail_compilation/fail8313.d(16): `fail8313.bar!().bar(int x)` +static assert(bar(1)); + ^ +fail_compilation/fail8313.d(17): while evaluating: `static assert(bar()(int x)(1))` +static assert(bar(1)); +^ --- */ auto bar()(int x){return x;} diff --git a/compiler/test/fail_compilation/fail8373.d b/compiler/test/fail_compilation/fail8373.d index 6f6337db2ce9..9c86113916d1 100644 --- a/compiler/test/fail_compilation/fail8373.d +++ b/compiler/test/fail_compilation/fail8373.d @@ -1,14 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8373.d(21): Error: `fail8373.fun1` called with argument types `(int)` matches both: -fail_compilation/fail8373.d(15): `fail8373.fun1!().fun1!int.fun1(int)` +fail_compilation/fail8373.d(25): Error: `fail8373.fun1` called with argument types `(int)` matches both: +fail_compilation/fail8373.d(19): `fail8373.fun1!().fun1!int.fun1(int)` and: -fail_compilation/fail8373.d(16): `fail8373.fun1!int.fun1(int)` -fail_compilation/fail8373.d(22): Error: `fail8373.fun2` called with argument types `(int)` matches both: -fail_compilation/fail8373.d(18): `fail8373.fun2!int.fun2(int)` +fail_compilation/fail8373.d(20): `fail8373.fun1!int.fun1(int)` +enum x1 = fun1(0); + ^ +fail_compilation/fail8373.d(26): Error: `fail8373.fun2` called with argument types `(int)` matches both: +fail_compilation/fail8373.d(22): `fail8373.fun2!int.fun2(int)` and: -fail_compilation/fail8373.d(19): `fail8373.fun2!().fun2!int.fun2(int)` +fail_compilation/fail8373.d(23): `fail8373.fun2!().fun2!int.fun2(int)` +enum x2 = fun2(0); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail86.d b/compiler/test/fail_compilation/fail86.d index 4f56e95ca6fa..14fc773daaea 100644 --- a/compiler/test/fail_compilation/fail86.d +++ b/compiler/test/fail_compilation/fail86.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail86.d(12): Error: alias `Foo` recursive alias declaration +fail_compilation/fail86.d(14): Error: alias `Foo` recursive alias declaration + alias Foo!(int) Foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail8631.d b/compiler/test/fail_compilation/fail8631.d index 4f5b0763d481..b2dad9659df9 100644 --- a/compiler/test/fail_compilation/fail8631.d +++ b/compiler/test/fail_compilation/fail8631.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8631.d(14): Error: function `shared const int fail8631.D.foo()` does not override any function, did you mean to override `immutable int fail8631.B.foo()`? +fail_compilation/fail8631.d(16): Error: function `shared const int fail8631.D.foo()` does not override any function, did you mean to override `immutable int fail8631.B.foo()`? + override int foo() const shared { return 2; } // doesn't override any + ^ --- */ diff --git a/compiler/test/fail_compilation/fail8691.d b/compiler/test/fail_compilation/fail8691.d index 8e46023d3bda..101537508035 100644 --- a/compiler/test/fail_compilation/fail8691.d +++ b/compiler/test/fail_compilation/fail8691.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8691.d(7): Error: struct `fail8691.Foo` cannot have field `f` with static array of same struct type +fail_compilation/fail8691.d(9): Error: struct `fail8691.Foo` cannot have field `f` with static array of same struct type +struct Foo +^ --- */ struct Foo diff --git a/compiler/test/fail_compilation/fail8724.d b/compiler/test/fail_compilation/fail8724.d index 92d313a5624e..f13904a231fb 100644 --- a/compiler/test/fail_compilation/fail8724.d +++ b/compiler/test/fail_compilation/fail8724.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail8724.d(14): Error: `object.Exception` is thrown but not caught -fail_compilation/fail8724.d(12): Error: constructor `fail8724.Foo.this` may throw but is marked as `nothrow` +fail_compilation/fail8724.d(18): Error: `object.Exception` is thrown but not caught + throw new Exception("something"); + ^ +fail_compilation/fail8724.d(16): Error: constructor `fail8724.Foo.this` may throw but is marked as `nothrow` + this(int) nothrow + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9.d b/compiler/test/fail_compilation/fail9.d index 080ac1e5ebe6..88d25f86c45b 100644 --- a/compiler/test/fail_compilation/fail9.d +++ b/compiler/test/fail_compilation/fail9.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9.d(24): Error: no property `Vector` for type `fail9.Vector!int` -fail_compilation/fail9.d(13): class `Vector` defined here +fail_compilation/fail9.d(28): Error: no property `Vector` for type `fail9.Vector!int` + alias Vector!(int).Vector vector_t; + ^ +fail_compilation/fail9.d(17): class `Vector` defined here + class Vector + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9063.d b/compiler/test/fail_compilation/fail9063.d index 36f04ade23cb..d8b8a83839d4 100644 --- a/compiler/test/fail_compilation/fail9063.d +++ b/compiler/test/fail_compilation/fail9063.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9063.d(9): Error: static assert: "msg" +fail_compilation/fail9063.d(11): Error: static assert: "msg" +static assert(false, bar); +^ --- */ diff --git a/compiler/test/fail_compilation/fail9081.d b/compiler/test/fail_compilation/fail9081.d index 3d65beaeef7f..c7861f511750 100644 --- a/compiler/test/fail_compilation/fail9081.d +++ b/compiler/test/fail_compilation/fail9081.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9081.d(12): Error: package `core` has no type -fail_compilation/fail9081.d(13): Error: package `stdc` has no type -fail_compilation/fail9081.d(14): Error: module `stdio` has no type +fail_compilation/fail9081.d(18): Error: package `core` has no type +typeof(core) a; + ^ +fail_compilation/fail9081.d(19): Error: package `stdc` has no type +typeof(core.stdc) b; + ^ +fail_compilation/fail9081.d(20): Error: module `stdio` has no type +typeof(core.stdc.stdio) c; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail91.d b/compiler/test/fail_compilation/fail91.d index 41be80140ef3..ef3f5534ef30 100644 --- a/compiler/test/fail_compilation/fail91.d +++ b/compiler/test/fail_compilation/fail91.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail91.d(12): Error: struct `fail91.S` unknown size +fail_compilation/fail91.d(14): Error: struct `fail91.S` unknown size + S* s = new S(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail92.d b/compiler/test/fail_compilation/fail92.d index ba4655e7025b..312661e68c21 100644 --- a/compiler/test/fail_compilation/fail92.d +++ b/compiler/test/fail_compilation/fail92.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail92.d(15): Error: invalid `foreach` aggregate `t` of type `typeof(null)` -fail_compilation/fail92.d(23): Error: template instance `fail92.crash!(typeof(null))` error instantiating +fail_compilation/fail92.d(19): Error: invalid `foreach` aggregate `t` of type `typeof(null)` + foreach (u; t) + ^ +fail_compilation/fail92.d(27): Error: template instance `fail92.crash!(typeof(null))` error instantiating + crash(null); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9279.d b/compiler/test/fail_compilation/fail9279.d index 102cd05370f1..58361b58c2f1 100644 --- a/compiler/test/fail_compilation/fail9279.d +++ b/compiler/test/fail_compilation/fail9279.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9279.d(10): Error: escaping reference to stack allocated value returned by `b()` -fail_compilation/fail9279.d(13): Error: escaping reference to stack allocated value returned by `getArr()` +fail_compilation/fail9279.d(14): Error: escaping reference to stack allocated value returned by `b()` +string a() { return b(); } + ^ +fail_compilation/fail9279.d(17): Error: escaping reference to stack allocated value returned by `getArr()` +string getString() { return getArr(); } + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9290.d b/compiler/test/fail_compilation/fail9290.d index 6b51b2b902a4..4c6e243076fc 100644 --- a/compiler/test/fail_compilation/fail9290.d +++ b/compiler/test/fail_compilation/fail9290.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9290.d(15): Error: slice `s1[]` is not mutable, struct `S` has immutable members -fail_compilation/fail9290.d(16): Error: array `s1` is not mutable, struct `S` has immutable members +fail_compilation/fail9290.d(19): Error: slice `s1[]` is not mutable, struct `S` has immutable members + s1 = S(3); + ^ +fail_compilation/fail9290.d(20): Error: array `s1` is not mutable, struct `S` has immutable members + s1 = s2; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail93.d b/compiler/test/fail_compilation/fail93.d index 29893959b17d..823822141bc1 100644 --- a/compiler/test/fail_compilation/fail93.d +++ b/compiler/test/fail_compilation/fail93.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail93.d(14): Error: variable `i` is shadowing variable `fail93.main.i` -fail_compilation/fail93.d(13): declared here +fail_compilation/fail93.d(18): Error: variable `i` is shadowing variable `fail93.main.i` + synchronized int i = 2; // should fail to compile + ^ +fail_compilation/fail93.d(17): declared here + int i = 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9301.d b/compiler/test/fail_compilation/fail9301.d index eee727036959..f3cf62c51730 100644 --- a/compiler/test/fail_compilation/fail9301.d +++ b/compiler/test/fail_compilation/fail9301.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -m64 -o- TEST_OUTPUT: --- -fail_compilation/fail9301.d(11): Error: cannot implicitly convert expression `0` of type `int` to `__vector(void[16])` +fail_compilation/fail9301.d(13): Error: cannot implicitly convert expression `0` of type `int` to `__vector(void[16])` + __vector(void[16]) x = 0x0; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9346.d b/compiler/test/fail_compilation/fail9346.d index 19d0baa65f88..c743b86f56dd 100644 --- a/compiler/test/fail_compilation/fail9346.d +++ b/compiler/test/fail_compilation/fail9346.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9346.d(26): Error: struct `fail9346.S` is not copyable because it has a disabled postblit -fail_compilation/fail9346.d(27): Error: struct `fail9346.S` is not copyable because it has a disabled postblit +fail_compilation/fail9346.d(30): Error: struct `fail9346.S` is not copyable because it has a disabled postblit + SS1 ss1 = SS1(s); + ^ +fail_compilation/fail9346.d(31): Error: struct `fail9346.S` is not copyable because it has a disabled postblit + SS2 ss2 = SS2(s); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail94.d b/compiler/test/fail_compilation/fail94.d index aa722bf24a07..046e28ddb407 100644 --- a/compiler/test/fail_compilation/fail94.d +++ b/compiler/test/fail_compilation/fail94.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail94.d(28): Error: cannot implicitly override base class method `fail94.A.clone` with `fail94.B.clone`; add `override` attribute +fail_compilation/fail94.d(30): Error: cannot implicitly override base class method `fail94.A.clone` with `fail94.B.clone`; add `override` attribute + IA clone() + ^ --- */ interface I diff --git a/compiler/test/fail_compilation/fail9413.d b/compiler/test/fail_compilation/fail9413.d index c17e7136dee2..be733224793d 100644 --- a/compiler/test/fail_compilation/fail9413.d +++ b/compiler/test/fail_compilation/fail9413.d @@ -1,24 +1,60 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9413.d(45): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(32): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(33): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9413.d(38): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(39): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9413.d(40): Error: variable `fail9413.foo.bar.s` cannot modify result `s` in contract -fail_compilation/fail9413.d(50): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(73): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(74): Error: variable `fail9413.foo.r` cannot modify result `r` in contract -fail_compilation/fail9413.d(58): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(59): Error: variable `fail9413.foo.r` cannot modify result `r` in contract -fail_compilation/fail9413.d(60): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9413.d(65): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(66): Error: variable `fail9413.foo.r` cannot modify result `r` in contract -fail_compilation/fail9413.d(67): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9413.d(68): Error: variable `fail9413.foo.baz.s` cannot modify result `s` in contract -fail_compilation/fail9413.d(79): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9413.d(80): Error: variable `fail9413.foo.r` cannot modify result `r` in contract +fail_compilation/fail9413.d(81): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(68): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(69): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9413.d(74): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(75): Error: variable `fail9413.foo.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9413.d(76): Error: variable `fail9413.foo.bar.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9413.d(86): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(109): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(110): Error: variable `fail9413.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9413.d(94): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(95): Error: variable `fail9413.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9413.d(96): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9413.d(101): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(102): Error: variable `fail9413.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9413.d(103): Error: variable `fail9413.foo.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9413.d(104): Error: variable `fail9413.foo.baz.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9413.d(115): Error: variable `fail9413.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9413.d(116): Error: variable `fail9413.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9414a.d b/compiler/test/fail_compilation/fail9414a.d index b6e2a6f25aaf..ae38ce0e965e 100644 --- a/compiler/test/fail_compilation/fail9414a.d +++ b/compiler/test/fail_compilation/fail9414a.d @@ -1,24 +1,60 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9414a.d(47): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414a.d(34): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414a.d(35): Error: variable `fail9414a.C.foo.__require.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414a.d(40): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414a.d(41): Error: variable `fail9414a.C.foo.__require.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414a.d(42): Error: variable `fail9414a.C.foo.__require.bar.s` cannot modify result `s` in contract -fail_compilation/fail9414a.d(52): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414a.d(75): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414a.d(76): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract -fail_compilation/fail9414a.d(60): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414a.d(61): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract -fail_compilation/fail9414a.d(62): Error: variable `fail9414a.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414a.d(67): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414a.d(68): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract -fail_compilation/fail9414a.d(69): Error: variable `fail9414a.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414a.d(70): Error: variable `fail9414a.C.foo.__ensure.baz.s` cannot modify result `s` in contract -fail_compilation/fail9414a.d(81): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414a.d(82): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract +fail_compilation/fail9414a.d(83): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(70): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(71): Error: variable `fail9414a.C.foo.__require.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414a.d(76): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(77): Error: variable `fail9414a.C.foo.__require.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414a.d(78): Error: variable `fail9414a.C.foo.__require.bar.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414a.d(88): Error: variable `fail9414a.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(111): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(112): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414a.d(96): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(97): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414a.d(98): Error: variable `fail9414a.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414a.d(103): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(104): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414a.d(105): Error: variable `fail9414a.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414a.d(106): Error: variable `fail9414a.C.foo.__ensure.baz.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414a.d(117): Error: variable `fail9414a.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414a.d(118): Error: variable `fail9414a.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9414b.d b/compiler/test/fail_compilation/fail9414b.d index dbb76da1348c..c0adafb66d95 100644 --- a/compiler/test/fail_compilation/fail9414b.d +++ b/compiler/test/fail_compilation/fail9414b.d @@ -1,24 +1,60 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9414b.d(47): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414b.d(34): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414b.d(35): Error: variable `fail9414b.C.foo.__require.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414b.d(40): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414b.d(41): Error: variable `fail9414b.C.foo.__require.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414b.d(42): Error: variable `fail9414b.C.foo.__require.bar.s` cannot modify result `s` in contract -fail_compilation/fail9414b.d(52): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract -fail_compilation/fail9414b.d(75): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414b.d(76): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract -fail_compilation/fail9414b.d(60): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414b.d(61): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract -fail_compilation/fail9414b.d(62): Error: variable `fail9414b.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414b.d(67): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414b.d(68): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract -fail_compilation/fail9414b.d(69): Error: variable `fail9414b.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414b.d(70): Error: variable `fail9414b.C.foo.__ensure.baz.s` cannot modify result `s` in contract -fail_compilation/fail9414b.d(81): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract -fail_compilation/fail9414b.d(82): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract +fail_compilation/fail9414b.d(83): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(70): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(71): Error: variable `fail9414b.C.foo.__require.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414b.d(76): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(77): Error: variable `fail9414b.C.foo.__require.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414b.d(78): Error: variable `fail9414b.C.foo.__require.bar.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414b.d(88): Error: variable `fail9414b.C.foo.__require.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(111): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(112): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414b.d(96): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(97): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414b.d(98): Error: variable `fail9414b.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414b.d(103): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(104): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414b.d(105): Error: variable `fail9414b.C.foo.__ensure.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414b.d(106): Error: variable `fail9414b.C.foo.__ensure.baz.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414b.d(117): Error: variable `fail9414b.C.foo.__ensure.x` cannot modify result `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414b.d(118): Error: variable `fail9414b.C.foo.__ensure.r` cannot modify result `r` in contract + r = 10; // err + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9414c.d b/compiler/test/fail_compilation/fail9414c.d index 3e0311aea7b1..7d1bdd0c3ffe 100644 --- a/compiler/test/fail_compilation/fail9414c.d +++ b/compiler/test/fail_compilation/fail9414c.d @@ -1,24 +1,60 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9414c.d(47): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(34): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(35): Error: variable `fail9414c.C.foo.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414c.d(40): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(41): Error: variable `fail9414c.C.foo.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414c.d(42): Error: variable `fail9414c.C.foo.bar.s` cannot modify result `s` in contract -fail_compilation/fail9414c.d(52): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(75): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(76): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract -fail_compilation/fail9414c.d(60): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(61): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract -fail_compilation/fail9414c.d(62): Error: variable `fail9414c.C.foo.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414c.d(67): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(68): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract -fail_compilation/fail9414c.d(69): Error: variable `fail9414c.C.foo.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414c.d(70): Error: variable `fail9414c.C.foo.baz.s` cannot modify result `s` in contract -fail_compilation/fail9414c.d(81): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414c.d(82): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract +fail_compilation/fail9414c.d(83): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(70): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(71): Error: variable `fail9414c.C.foo.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414c.d(76): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(77): Error: variable `fail9414c.C.foo.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414c.d(78): Error: variable `fail9414c.C.foo.bar.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414c.d(88): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(111): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(112): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414c.d(96): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(97): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414c.d(98): Error: variable `fail9414c.C.foo.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414c.d(103): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(104): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414c.d(105): Error: variable `fail9414c.C.foo.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414c.d(106): Error: variable `fail9414c.C.foo.baz.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414c.d(117): Error: variable `fail9414c.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414c.d(118): Error: variable `fail9414c.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9414d.d b/compiler/test/fail_compilation/fail9414d.d index 06d37ce8c601..e934c99ef27b 100644 --- a/compiler/test/fail_compilation/fail9414d.d +++ b/compiler/test/fail_compilation/fail9414d.d @@ -1,24 +1,60 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9414d.d(47): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(34): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(35): Error: variable `fail9414d.C.foo.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414d.d(40): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(41): Error: variable `fail9414d.C.foo.bar.y` cannot modify parameter `y` in contract -fail_compilation/fail9414d.d(42): Error: variable `fail9414d.C.foo.bar.s` cannot modify result `s` in contract -fail_compilation/fail9414d.d(52): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(75): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(76): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract -fail_compilation/fail9414d.d(60): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(61): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract -fail_compilation/fail9414d.d(62): Error: variable `fail9414d.C.foo.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414d.d(67): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(68): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract -fail_compilation/fail9414d.d(69): Error: variable `fail9414d.C.foo.baz.y` cannot modify parameter `y` in contract -fail_compilation/fail9414d.d(70): Error: variable `fail9414d.C.foo.baz.s` cannot modify result `s` in contract -fail_compilation/fail9414d.d(81): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract -fail_compilation/fail9414d.d(82): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract +fail_compilation/fail9414d.d(83): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(70): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(71): Error: variable `fail9414d.C.foo.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414d.d(76): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(77): Error: variable `fail9414d.C.foo.bar.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414d.d(78): Error: variable `fail9414d.C.foo.bar.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414d.d(88): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(111): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(112): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414d.d(96): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(97): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414d.d(98): Error: variable `fail9414d.C.foo.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414d.d(103): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(104): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ +fail_compilation/fail9414d.d(105): Error: variable `fail9414d.C.foo.baz.y` cannot modify parameter `y` in contract + y = 10; // err + ^ +fail_compilation/fail9414d.d(106): Error: variable `fail9414d.C.foo.baz.s` cannot modify result `s` in contract + s = 10; // err + ^ +fail_compilation/fail9414d.d(117): Error: variable `fail9414d.C.foo.x` cannot modify parameter `x` in contract + x = 10; // err + ^ +fail_compilation/fail9414d.d(118): Error: variable `fail9414d.C.foo.r` cannot modify result `r` in contract + r = 10; // err + ^ --- */ diff --git a/compiler/test/fail_compilation/fail95.d b/compiler/test/fail_compilation/fail95.d index 0e613363b087..8af33977d2cb 100644 --- a/compiler/test/fail_compilation/fail95.d +++ b/compiler/test/fail_compilation/fail95.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail95.d(19): Error: template `A` is not callable using argument types `!()(int)` -fail_compilation/fail95.d(11): Candidate is: `A(alias T)(T)` +fail_compilation/fail95.d(23): Error: template `A` is not callable using argument types `!()(int)` + A(i); + ^ +fail_compilation/fail95.d(15): Candidate is: `A(alias T)(T)` +template A(alias T) +^ --- */ diff --git a/compiler/test/fail_compilation/fail9537.d b/compiler/test/fail_compilation/fail9537.d index 4d593e39ddb1..a23710d44aeb 100644 --- a/compiler/test/fail_compilation/fail9537.d +++ b/compiler/test/fail_compilation/fail9537.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9537.d(26): Error: cannot take address of expression `foo(tuple(1, 2))` because it is not an lvalue +fail_compilation/fail9537.d(28): Error: cannot take address of expression `foo(tuple(1, 2))` because it is not an lvalue + int* p = &foo(tuple(1, 2)); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9562.d b/compiler/test/fail_compilation/fail9562.d index 7c40c41bc447..a3169a9cdc26 100644 --- a/compiler/test/fail_compilation/fail9562.d +++ b/compiler/test/fail_compilation/fail9562.d @@ -2,11 +2,21 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: --- -fail_compilation/fail9562.d(16): Error: `int[]` is not an expression -fail_compilation/fail9562.d(17): Error: no property `reverse` for type `int[]` -fail_compilation/fail9562.d(18): Error: no property `sort` for type `int[]`, perhaps `import std.algorithm;` is needed? -fail_compilation/fail9562.d(19): Error: no property `dup` for type `int[]` -fail_compilation/fail9562.d(20): Error: no property `idup` for type `int[]` +fail_compilation/fail9562.d(26): Error: `int[]` is not an expression + auto len = A.length; + ^ +fail_compilation/fail9562.d(27): Error: no property `reverse` for type `int[]` + auto rev = A.reverse; + ^ +fail_compilation/fail9562.d(28): Error: no property `sort` for type `int[]`, perhaps `import std.algorithm;` is needed? + auto sort = A.sort; + ^ +fail_compilation/fail9562.d(29): Error: no property `dup` for type `int[]` + auto dup = A.dup; + ^ +fail_compilation/fail9562.d(30): Error: no property `idup` for type `int[]` + auto idup = A.idup; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9572.d b/compiler/test/fail_compilation/fail9572.d index 75b42349916d..42be517d174b 100644 --- a/compiler/test/fail_compilation/fail9572.d +++ b/compiler/test/fail_compilation/fail9572.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9572.d(10): Error: index type `ubyte` cannot cover index range 0..300 +fail_compilation/fail9572.d(12): Error: index type `ubyte` cannot cover index range 0..300 + foreach (ubyte i, x; data) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail96.d b/compiler/test/fail_compilation/fail96.d index 639fb6c08e0c..86121b126a14 100644 --- a/compiler/test/fail_compilation/fail96.d +++ b/compiler/test/fail_compilation/fail96.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail96.d(21): Error: template instance `foo!long` `foo` is not a template declaration, it is a function alias +fail_compilation/fail96.d(23): Error: template instance `foo!long` `foo` is not a template declaration, it is a function alias + foo!(long); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9613.d b/compiler/test/fail_compilation/fail9613.d index d88cd2ffb96c..a93e23904a05 100644 --- a/compiler/test/fail_compilation/fail9613.d +++ b/compiler/test/fail_compilation/fail9613.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9613.d(12): Error: `(arguments)` expected following `const(byte)`, not `.` -fail_compilation/fail9613.d(12): Error: semicolon expected following auto declaration, not `.` +fail_compilation/fail9613.d(16): Error: `(arguments)` expected following `const(byte)`, not `.` + auto x = const byte.init; + ^ +fail_compilation/fail9613.d(16): Error: semicolon expected following auto declaration, not `.` + auto x = const byte.init; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9665a.d b/compiler/test/fail_compilation/fail9665a.d index 3d1b07e716ec..0bf97ea3ed39 100644 --- a/compiler/test/fail_compilation/fail9665a.d +++ b/compiler/test/fail_compilation/fail9665a.d @@ -1,33 +1,87 @@ /+ TEST_OUTPUT: --- -fail_compilation/fail9665a.d(43): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(42): Previous initialization is here. -fail_compilation/fail9665a.d(53): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(52): Previous initialization is here. -fail_compilation/fail9665a.d(58): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(57): Previous initialization is here. -fail_compilation/fail9665a.d(63): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(62): Previous initialization is here. -fail_compilation/fail9665a.d(73): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(72): Previous initialization is here. -fail_compilation/fail9665a.d(78): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(77): Previous initialization is here. -fail_compilation/fail9665a.d(83): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(82): Previous initialization is here. -fail_compilation/fail9665a.d(96): Error: immutable field `v` initialization is not allowed in loops or after labels -fail_compilation/fail9665a.d(101): Error: immutable field `v` initialization is not allowed in loops or after labels -fail_compilation/fail9665a.d(106): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(105): Previous initialization is here. -fail_compilation/fail9665a.d(111): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(110): Previous initialization is here. -fail_compilation/fail9665a.d(116): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(115): Previous initialization is here. -fail_compilation/fail9665a.d(130): Error: immutable field `v` initialized multiple times -fail_compilation/fail9665a.d(129): Previous initialization is here. -fail_compilation/fail9665a.d(134): Error: immutable field `w` initialized multiple times -fail_compilation/fail9665a.d(133): Previous initialization is here. -fail_compilation/fail9665a.d(148): Error: static assert: `__traits(compiles, this.v = 1)` is false +fail_compilation/fail9665a.d(97): Error: immutable field `v` initialized multiple times + v = 2; // multiple initialization + ^ +fail_compilation/fail9665a.d(96): Previous initialization is here. + v = 1; + ^ +fail_compilation/fail9665a.d(107): Error: immutable field `v` initialized multiple times + v = 3; // multiple initialization + ^ +fail_compilation/fail9665a.d(106): Previous initialization is here. + if (true) v = 1; else v = 2; + ^ +fail_compilation/fail9665a.d(112): Error: immutable field `v` initialized multiple times + v = 3; // multiple initialization + ^ +fail_compilation/fail9665a.d(111): Previous initialization is here. + if (true) v = 1; + ^ +fail_compilation/fail9665a.d(117): Error: immutable field `v` initialized multiple times + v = 3; // multiple initialization + ^ +fail_compilation/fail9665a.d(116): Previous initialization is here. + if (true) {} else v = 2; + ^ +fail_compilation/fail9665a.d(127): Error: immutable field `v` initialized multiple times + v = 3; // multiple initialization + ^ +fail_compilation/fail9665a.d(126): Previous initialization is here. + true ? (v = 1) : (v = 2); + ^ +fail_compilation/fail9665a.d(132): Error: immutable field `v` initialized multiple times + v = 3; // multiple initialization + ^ +fail_compilation/fail9665a.d(131): Previous initialization is here. + auto x = true ? (v = 1) : 2; + ^ +fail_compilation/fail9665a.d(137): Error: immutable field `v` initialized multiple times + v = 3; // multiple initialization + ^ +fail_compilation/fail9665a.d(136): Previous initialization is here. + auto x = true ? 1 : (v = 2); + ^ +fail_compilation/fail9665a.d(150): Error: immutable field `v` initialization is not allowed in loops or after labels + v = 1; // after labels + ^ +fail_compilation/fail9665a.d(155): Error: immutable field `v` initialization is not allowed in loops or after labels + v = 1; // in loops + ^ +fail_compilation/fail9665a.d(160): Error: immutable field `v` initialized multiple times + L: v = 2; // assignment after labels + ^ +fail_compilation/fail9665a.d(159): Previous initialization is here. + v = 1; // initialization + ^ +fail_compilation/fail9665a.d(165): Error: immutable field `v` initialized multiple times + foreach (i; 0..1) v = 2; // assignment in loops + ^ +fail_compilation/fail9665a.d(164): Previous initialization is here. + v = 1; // initialization + ^ +fail_compilation/fail9665a.d(170): Error: immutable field `v` initialized multiple times + v = 2; // multiple initialization + ^ +fail_compilation/fail9665a.d(169): Previous initialization is here. + v = 1; return; + ^ +fail_compilation/fail9665a.d(184): Error: immutable field `v` initialized multiple times + v = 2; // multiple initialization + ^ +fail_compilation/fail9665a.d(183): Previous initialization is here. + v = 1; + ^ +fail_compilation/fail9665a.d(188): Error: immutable field `w` initialized multiple times + w = 2; // multiple initialization + ^ +fail_compilation/fail9665a.d(187): Previous initialization is here. + w = 1; + ^ +fail_compilation/fail9665a.d(202): Error: static assert: `__traits(compiles, this.v = 1)` is false + static assert(__traits(compiles, v = 1)); // multiple initialization + ^ --- +/ diff --git a/compiler/test/fail_compilation/fail97.d b/compiler/test/fail_compilation/fail97.d index cec9819abc91..c55a96744380 100644 --- a/compiler/test/fail_compilation/fail97.d +++ b/compiler/test/fail_compilation/fail97.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail97.d(11): Error: pragma `lib` is missing a terminating `;` +fail_compilation/fail97.d(13): Error: pragma `lib` is missing a terminating `;` +pragma(lib,"ws2_32.lib")//; +^ --- */ diff --git a/compiler/test/fail_compilation/fail9710.d b/compiler/test/fail_compilation/fail9710.d index dc772cde53ca..7d983654f0cc 100644 --- a/compiler/test/fail_compilation/fail9710.d +++ b/compiler/test/fail_compilation/fail9710.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9710.d(9): Error: static variable `e` cannot be read at compile time +fail_compilation/fail9710.d(11): Error: static variable `e` cannot be read at compile time +enum v = e[1]; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9735.d b/compiler/test/fail_compilation/fail9735.d index 631468bc01cb..dff2f8ae55f6 100644 --- a/compiler/test/fail_compilation/fail9735.d +++ b/compiler/test/fail_compilation/fail9735.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/fail9735.d(10): Deprecation: casting from void delegate() to void* is deprecated +fail_compilation/fail9735.d(12): Deprecation: casting from void delegate() to void* is deprecated + return cast(void*) dg; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9766.d b/compiler/test/fail_compilation/fail9766.d index 03a94cb795f6..24af91ce8c16 100644 --- a/compiler/test/fail_compilation/fail9766.d +++ b/compiler/test/fail_compilation/fail9766.d @@ -1,12 +1,29 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9766.d(14): Error: integer constant expression expected instead of `Foo!int` -fail_compilation/fail9766.d(14): Error: alignment must be an integer positive power of 2, not 0x0 +fail_compilation/fail9766.d(15): Error: declaration expected, not `^` +--- +^ fail_compilation/fail9766.d(17): Error: alignment must be an integer positive power of 2, not 0xffffffffffffffff +#line 12 +^ fail_compilation/fail9766.d(20): Error: alignment must be an integer positive power of 2, not 0x0 +align(Foo!int) +^ +fail_compilation/fail9766.d(23): Error: alignment must be an integer positive power of 2, not 0x3 +*/ +^ +fail_compilation/fail9766.d(26): Error: alignment must be an integer positive power of 2, not 0x80000001 +template Foo(T) {} +^ +--- +^ fail_compilation/fail9766.d(23): Error: alignment must be an integer positive power of 2, not 0x3 +#line 12 +^ fail_compilation/fail9766.d(26): Error: alignment must be an integer positive power of 2, not 0x80000001 +align(Foo!int) +^ --- */ diff --git a/compiler/test/fail_compilation/fail9773.d b/compiler/test/fail_compilation/fail9773.d index 26447a73914e..2d4009d161a5 100644 --- a/compiler/test/fail_compilation/fail9773.d +++ b/compiler/test/fail_compilation/fail9773.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9773.d(7): Error: cannot create default argument for `ref` / `out` parameter from expression `""` because it is not an lvalue +fail_compilation/fail9773.d(9): Error: cannot create default argument for `ref` / `out` parameter from expression `""` because it is not an lvalue +void f(ref string a = "") + ^ --- */ void f(ref string a = "") diff --git a/compiler/test/fail_compilation/fail9790.d b/compiler/test/fail_compilation/fail9790.d index cae33c28b65b..ac5ac0e46337 100644 --- a/compiler/test/fail_compilation/fail9790.d +++ b/compiler/test/fail_compilation/fail9790.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9790.d(13): Error: undefined identifier `_Unused_` -fail_compilation/fail9790.d(20): Error: template instance `fail9790.foo!()` error instantiating -fail_compilation/fail9790.d(18): Error: undefined identifier `_Unused_` -fail_compilation/fail9790.d(21): Error: template instance `fail9790.bar!()` error instantiating +fail_compilation/fail9790.d(21): Error: undefined identifier `_Unused_` + enum bool _foo = _Unused_._unused_; + ^ +fail_compilation/fail9790.d(28): Error: template instance `fail9790.foo!()` error instantiating +alias Foo = foo!(); + ^ +fail_compilation/fail9790.d(26): Error: undefined identifier `_Unused_` + enum bool bar = _Unused_._unused_; + ^ +fail_compilation/fail9790.d(29): Error: template instance `fail9790.bar!()` error instantiating +alias Bar = bar!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail98.d b/compiler/test/fail_compilation/fail98.d index 7541d3718c7b..9bc44712631a 100644 --- a/compiler/test/fail_compilation/fail98.d +++ b/compiler/test/fail_compilation/fail98.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail98.d(17): Error: cannot implicitly convert expression `256` of type `int` to `E` +fail_compilation/fail98.d(19): Error: cannot implicitly convert expression `256` of type `int` to `E` + D3DTS_WORLD = 256, + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9891.d b/compiler/test/fail_compilation/fail9891.d index 0c2384fccfa4..da34321fd98b 100644 --- a/compiler/test/fail_compilation/fail9891.d +++ b/compiler/test/fail_compilation/fail9891.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9891.d(13): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `ref int` of parameter `n` -fail_compilation/fail9891.d(18): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `out int` of parameter `n` -fail_compilation/fail9891.d(23): Error: cannot create default argument for `ref` / `out` parameter from expression `prop()` because it is not an lvalue +fail_compilation/fail9891.d(19): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `ref int` of parameter `n` +void f1(ref int n = i) + ^ +fail_compilation/fail9891.d(24): Error: expression `i` of type `immutable(int)` is not implicitly convertible to type `out int` of parameter `n` +void f2(out int n = i) + ^ +fail_compilation/fail9891.d(29): Error: cannot create default argument for `ref` / `out` parameter from expression `prop()` because it is not an lvalue +void f3(ref int n = prop) + ^ --- */ diff --git a/compiler/test/fail_compilation/fail9892.d b/compiler/test/fail_compilation/fail9892.d index c3fbf7a10a95..cd91d2f365f5 100644 --- a/compiler/test/fail_compilation/fail9892.d +++ b/compiler/test/fail_compilation/fail9892.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9892.d(11): Error: enum member `fail9892.a` circular reference to `enum` member +fail_compilation/fail9892.d(13): Error: enum member `fail9892.a` circular reference to `enum` member + a = b, //Segfault! + ^ --- */ diff --git a/compiler/test/fail_compilation/fail99.d b/compiler/test/fail_compilation/fail99.d index a12fa3f4cc69..3c2f4acff8df 100644 --- a/compiler/test/fail_compilation/fail99.d +++ b/compiler/test/fail_compilation/fail99.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/fail99.d(13): Error: delegate `dg(int)` is not callable using argument types `()` -fail_compilation/fail99.d(13): too few arguments, expected 1, got 0 +fail_compilation/fail99.d(15): Error: delegate `dg(int)` is not callable using argument types `()` + dg(); + ^ +fail_compilation/fail99.d(15): too few arguments, expected 1, got 0 --- */ diff --git a/compiler/test/fail_compilation/fail9936.d b/compiler/test/fail_compilation/fail9936.d index 0d7d44ae439b..d35f9e2dfb96 100644 --- a/compiler/test/fail_compilation/fail9936.d +++ b/compiler/test/fail_compilation/fail9936.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fail9936.d(25): Error: `S().opBinary` isn't a template -fail_compilation/fail9936.d(26): Error: `S().opBinaryRight` isn't a template -fail_compilation/fail9936.d(27): Error: `S().opOpAssign` isn't a template -fail_compilation/fail9936.d(29): Error: `S().opIndexUnary` isn't a template -fail_compilation/fail9936.d(30): Error: `S().opUnary` isn't a template +fail_compilation/fail9936.d(35): Error: `S().opBinary` isn't a template + S() + S(); + ^ +fail_compilation/fail9936.d(36): Error: `S().opBinaryRight` isn't a template + 100 + S(); + ^ +fail_compilation/fail9936.d(37): Error: `S().opOpAssign` isn't a template + S() += S(); + ^ +fail_compilation/fail9936.d(39): Error: `S().opIndexUnary` isn't a template + +S()[0]; + ^ +fail_compilation/fail9936.d(40): Error: `S().opUnary` isn't a template + +S(); + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/failCopyCtor2.d b/compiler/test/fail_compilation/failCopyCtor2.d index 5e8f8c40f7da..02516d6e6f36 100644 --- a/compiler/test/fail_compilation/failCopyCtor2.d +++ b/compiler/test/fail_compilation/failCopyCtor2.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/failCopyCtor2.d(15): Error: `struct B` may not define a rvalue constructor and have fields with copy constructors -fail_compilation/failCopyCtor2.d(18): rvalue constructor defined here -fail_compilation/failCopyCtor2.d(17): field with copy constructor defined here +fail_compilation/failCopyCtor2.d(21): Error: `struct B` may not define a rvalue constructor and have fields with copy constructors +struct B +^ +fail_compilation/failCopyCtor2.d(24): rvalue constructor defined here + this(immutable B b) shared {} + ^ +fail_compilation/failCopyCtor2.d(23): field with copy constructor defined here + A a; + ^ --- */ diff --git a/compiler/test/fail_compilation/fail_arrayexp.d b/compiler/test/fail_compilation/fail_arrayexp.d index c20541392e6a..9a0f757f1ee3 100644 --- a/compiler/test/fail_compilation/fail_arrayexp.d +++ b/compiler/test/fail_compilation/fail_arrayexp.d @@ -3,10 +3,16 @@ TEST_OUTPUT: --- fail_compilation/fail_arrayexp.d(24): Error: cannot use `[]` operator on expression of type `int` fail_compilation/fail_arrayexp.d(25): Error: cannot use `[]` operator on expression of type `void` +alias getTuple(T...) = T; + ^ fail_compilation/fail_arrayexp.d(26): Error: static array of `const(int)[]` with multiple lengths not allowed fail_compilation/fail_arrayexp.d(27): Error: only one index allowed to index `string` +void test19534() // https://issues.dlang.org/show_bug.cgi?id=19534 + ^ fail_compilation/fail_arrayexp.d(28): Error: no `[]` operator overload for type `U` -fail_compilation/fail_arrayexp.d(16): `fail_arrayexp.U` declared here +fail_compilation/fail_arrayexp.d(22): `fail_arrayexp.U` declared here +union U {} +^ fail_compilation/fail_arrayexp.d(29): Error: only one index allowed to index `(int, string)` --- */ diff --git a/compiler/test/fail_compilation/fail_casting.d b/compiler/test/fail_compilation/fail_casting.d index 88d579b4dffe..6d555a4bf5be 100644 --- a/compiler/test/fail_compilation/fail_casting.d +++ b/compiler/test/fail_compilation/fail_casting.d @@ -3,7 +3,8 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_casting.d(12): Error: cannot cast expression `x` of type `short[2]` to `int[2]` because of different sizes +fail_compilation/fail_casting.d(8): Error: declaration expected, not `^` +fail_compilation/fail_casting.d(16): Error: unmatched closing brace --- */ void test3133() @@ -12,15 +13,6 @@ void test3133() auto y = cast(int[2])x; // error } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(28): Error: cannot cast expression `null` of type `typeof(null)` to `S1` -fail_compilation/fail_casting.d(29): Error: cannot cast expression `null` of type `typeof(null)` to `S2` -fail_compilation/fail_casting.d(30): Error: cannot cast expression `s1` of type `S1` to `typeof(null)` -fail_compilation/fail_casting.d(31): Error: cannot cast expression `s2` of type `S2` to `typeof(null)` ---- -*/ void test9904() { static struct S1 { size_t m; } @@ -31,15 +23,6 @@ void test9904() { S2 s2; auto x = cast(typeof(null))s2; } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(46): Error: cannot cast expression `x` of type `Object[]` to `object.Object` -fail_compilation/fail_casting.d(47): Error: cannot cast expression `x` of type `Object[2]` to `object.Object` -fail_compilation/fail_casting.d(49): Error: cannot cast expression `x` of type `object.Object` to `Object[]` -fail_compilation/fail_casting.d(50): Error: cannot cast expression `x` of type `object.Object` to `Object[2]` ---- -*/ void test10646() { // T[] or T[n] --> Tclass @@ -50,19 +33,6 @@ void test10646() { Object x; auto y = cast(Object[2])x; } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(69): Error: cannot cast expression `x` of type `int[1]` to `int` -fail_compilation/fail_casting.d(70): Error: cannot cast expression `x` of type `int` to `int[1]` -fail_compilation/fail_casting.d(71): Error: cannot cast expression `x` of type `float[1]` to `int` -fail_compilation/fail_casting.d(72): Error: cannot cast expression `x` of type `int` to `float[1]` -fail_compilation/fail_casting.d(75): Error: cannot cast expression `x` of type `int[]` to `int` -fail_compilation/fail_casting.d(76): Error: cannot cast expression `x` of type `int` to `int[]` -fail_compilation/fail_casting.d(77): Error: cannot cast expression `x` of type `float[]` to `int` -fail_compilation/fail_casting.d(78): Error: cannot cast expression `x` of type `int` to `float[]` ---- -*/ void test11484() { // Tsarray <--> integer @@ -78,16 +48,6 @@ void test11484() { int x; auto y = cast(float[]) x; } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(97): Error: cannot cast expression `x` of type `int` to `fail_casting.test11485.C` -fail_compilation/fail_casting.d(98): Error: cannot cast expression `x` of type `int` to `fail_casting.test11485.I` -fail_compilation/fail_casting.d(101): Error: cannot cast expression `x` of type `fail_casting.test11485.C` to `int` -fail_compilation/fail_casting.d(102): Error: cannot cast expression `x` of type `fail_casting.test11485.I` to `int` ---- -*/ - void test11485() { class C {} @@ -102,12 +62,6 @@ void test11485() { I x; auto y = cast(int)x; } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(114): Error: cannot cast expression `x` of type `typeof(null)` to `int[2]` -fail_compilation/fail_casting.d(115): Error: cannot cast expression `x` of type `int[2]` to `typeof(null)` ---- */ void test8179() { @@ -115,13 +69,6 @@ void test8179() { int[2] x; auto y = cast(typeof(null))x; } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(128): Error: cannot cast expression `x` of type `S` to `int*` -fail_compilation/fail_casting.d(130): Error: cannot cast expression `x` of type `void*` to `S` ---- -*/ void test13959() { struct S { int* p; } @@ -130,12 +77,6 @@ void test13959() { void* x; auto y = cast(S)x; } } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(144): Error: cannot cast expression `mi` of type `MyInt14154` to `MyUbyte14154` because of different sizes ---- -*/ struct MyUbyte14154 { ubyte x; alias x this; } struct MyInt14154 { int x; alias x this; } void test14154() @@ -144,12 +85,6 @@ void test14154() ubyte t = cast(MyUbyte14154)mi; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(179): Error: cannot cast expression `point` of type `Tuple14093!(int, "x", int, "y")` to `object.Object` ---- -*/ alias TypeTuple14093(T...) = T; struct Tuple14093(T...) @@ -179,13 +114,6 @@ void test14093() auto newPoint = cast(Object)(point); } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(192): Error: cannot cast expression `p` of type `void*` to `char[]` -fail_compilation/fail_casting.d(193): Error: cannot cast expression `p` of type `void*` to `char[2]` ---- -*/ void test14596() { void* p = null; @@ -193,17 +121,6 @@ void test14596() char[2] sarr = cast(char[2])p; } -/* -TEST_OUTPUT: ---- -fail_compilation/fail_casting.d(217): Error: cannot cast expression `c` of type `fail_casting.test14629.C` to `typeof(null)` -fail_compilation/fail_casting.d(218): Error: cannot cast expression `p` of type `int*` to `typeof(null)` -fail_compilation/fail_casting.d(219): Error: cannot cast expression `da` of type `int[]` to `typeof(null)` -fail_compilation/fail_casting.d(220): Error: cannot cast expression `aa` of type `int[int]` to `typeof(null)` -fail_compilation/fail_casting.d(221): Error: cannot cast expression `fp` of type `int function()` to `typeof(null)` -fail_compilation/fail_casting.d(222): Error: cannot cast expression `dg` of type `int delegate()` to `typeof(null)` ---- -*/ void test14629() { alias P = int*; P p; diff --git a/compiler/test/fail_compilation/fail_casting2.d b/compiler/test/fail_compilation/fail_casting2.d index 16bc5bcead20..89461e56fa4f 100644 --- a/compiler/test/fail_compilation/fail_casting2.d +++ b/compiler/test/fail_compilation/fail_casting2.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_casting2.d(15): Error: type `int` is not an expression -fail_compilation/fail_casting2.d(17): Error: template lambda has no type -fail_compilation/fail_casting2.d(20): Error: template `Templ()` has no type +fail_compilation/fail_casting2.d(21): Error: type `int` is not an expression + cast(void)(Type); + ^ +fail_compilation/fail_casting2.d(23): Error: template lambda has no type + cast(void)(x => mixin(x)("mixin(x);")); + ^ +fail_compilation/fail_casting2.d(26): Error: template `Templ()` has no type + cast(void)(Templ); + ^ --- */ diff --git a/compiler/test/fail_compilation/fail_contracts1.d b/compiler/test/fail_compilation/fail_contracts1.d index 572b821e9824..29bfc142ae5e 100644 --- a/compiler/test/fail_compilation/fail_contracts1.d +++ b/compiler/test/fail_compilation/fail_contracts1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_contracts1.d(8): Error: `(identifier) { ... }` or `(identifier; expression)` following `out` expected, not `)` +fail_compilation/fail_contracts1.d(10): Error: `(identifier) { ... }` or `(identifier; expression)` following `out` expected, not `)` +void foo() out()){} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail_contracts2.d b/compiler/test/fail_compilation/fail_contracts2.d index 2a07a60e5f3a..b66b9e1e12b5 100644 --- a/compiler/test/fail_compilation/fail_contracts2.d +++ b/compiler/test/fail_compilation/fail_contracts2.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_contracts2.d(8): Error: missing `do { ... }` after `in` or `out` +fail_compilation/fail_contracts2.d(10): Error: missing `do { ... }` after `in` or `out` +void foo()in{}{} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail_contracts3.d b/compiler/test/fail_compilation/fail_contracts3.d index b0b366b3b7b6..9d4159a98401 100644 --- a/compiler/test/fail_compilation/fail_contracts3.d +++ b/compiler/test/fail_compilation/fail_contracts3.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_contracts3.d(13): Error: function `fail_contracts3.D.foo` cannot have an in contract when overridden function `fail_contracts3.C.foo` does not have an in contract +fail_compilation/fail_contracts3.d(15): Error: function `fail_contracts3.D.foo` cannot have an in contract when overridden function `fail_contracts3.C.foo` does not have an in contract + override void foo()in{}do{} + ^ --- */ diff --git a/compiler/test/fail_compilation/fail_isZeroInit.d b/compiler/test/fail_compilation/fail_isZeroInit.d index a352984742f8..8bff7f47c20d 100644 --- a/compiler/test/fail_compilation/fail_isZeroInit.d +++ b/compiler/test/fail_compilation/fail_isZeroInit.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_isZeroInit.d(11): Error: type expected as second argument of __traits `isZeroInit` instead of `a` +fail_compilation/fail_isZeroInit.d(13): Error: type expected as second argument of __traits `isZeroInit` instead of `a` + enum bool az = __traits(isZeroInit, a); + ^ --- */ void test() diff --git a/compiler/test/fail_compilation/fail_scope.d b/compiler/test/fail_compilation/fail_scope.d index 9851ffc1c74b..9945763ee4ec 100644 --- a/compiler/test/fail_compilation/fail_scope.d +++ b/compiler/test/fail_compilation/fail_scope.d @@ -1,17 +1,33 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_scope.d(43): Error: returning `cast(char[])string` escapes a reference to local variable `string` -fail_compilation/fail_scope.d(61): Error: returning `s.bar()` escapes a reference to local variable `s` -fail_compilation/fail_scope.d(72): Error: `fail_scope.foo8` called with argument types `(int)` matches both: -fail_compilation/fail_scope.d(66): `fail_scope.foo8(ref int x)` +fail_compilation/fail_scope.d(59): Error: returning `cast(char[])string` escapes a reference to local variable `string` + return string; + ^ +fail_compilation/fail_scope.d(77): Error: returning `s.bar()` escapes a reference to local variable `s` + return s.bar(); + ^ +fail_compilation/fail_scope.d(88): Error: `fail_scope.foo8` called with argument types `(int)` matches both: +fail_compilation/fail_scope.d(82): `fail_scope.foo8(ref int x)` and: -fail_compilation/fail_scope.d(67): `fail_scope.foo8(return ref int x)` -fail_compilation/fail_scope.d(80): Error: returning `& string` escapes a reference to local variable `string` -fail_compilation/fail_scope.d(90): Error: returning `cast(int[])a` escapes a reference to local variable `a` -fail_compilation/fail_scope.d(98): Error: returning `cast(int[])a` escapes a reference to local variable `a` -fail_compilation/fail_scope.d(106): Error: escaping reference to outer local variable `x` -fail_compilation/fail_scope.d(135): Error: returning `foo16226(i)` escapes a reference to local variable `i` +fail_compilation/fail_scope.d(83): `fail_scope.foo8(return ref int x)` + foo8(x); + ^ +fail_compilation/fail_scope.d(96): Error: returning `& string` escapes a reference to local variable `string` + return string.ptr; + ^ +fail_compilation/fail_scope.d(106): Error: returning `cast(int[])a` escapes a reference to local variable `a` + return a; + ^ +fail_compilation/fail_scope.d(114): Error: returning `cast(int[])a` escapes a reference to local variable `a` + return a; + ^ +fail_compilation/fail_scope.d(122): Error: escaping reference to outer local variable `x` + ref int bar(){ return x; } + ^ +fail_compilation/fail_scope.d(151): Error: returning `foo16226(i)` escapes a reference to local variable `i` + return foo16226(i); + ^ --- //fail_compilation/fail_scope.d(35): Error: scope variable `da` may not be returned //fail_compilation/fail_scope.d(37): Error: scope variable `o` may not be returned diff --git a/compiler/test/fail_compilation/fail_typeof.d b/compiler/test/fail_compilation/fail_typeof.d index a3b4d1a14153..c9f12682604a 100644 --- a/compiler/test/fail_compilation/fail_typeof.d +++ b/compiler/test/fail_compilation/fail_typeof.d @@ -1,14 +1,32 @@ /* TEST_OUTPUT: --- -fail_compilation/fail_typeof.d(15): Error: undefined identifier `this` -fail_compilation/fail_typeof.d(20): Error: `this` is not in a class or struct scope -fail_compilation/fail_typeof.d(25): Error: undefined identifier `super` -fail_compilation/fail_typeof.d(30): Error: `super` is not in a class scope -fail_compilation/fail_typeof.d(37): Error: undefined identifier `this`, did you mean `typeof(this)`? -fail_compilation/fail_typeof.d(47): Error: undefined identifier `super` -fail_compilation/fail_typeof.d(52): Error: `super` is not in a class scope -fail_compilation/fail_typeof.d(60): Error: undefined identifier `this`, did you mean `typeof(this)`? -fail_compilation/fail_typeof.d(70): Error: undefined identifier `super`, did you mean `typeof(super)`? +fail_compilation/fail_typeof.d(33): Error: undefined identifier `this` +enum E1 : this +^ +fail_compilation/fail_typeof.d(38): Error: `this` is not in a class or struct scope +enum E2 : typeof(this) + ^ +fail_compilation/fail_typeof.d(43): Error: undefined identifier `super` +enum E3 : super +^ +fail_compilation/fail_typeof.d(48): Error: `super` is not in a class scope +enum E4 : typeof(super) + ^ +fail_compilation/fail_typeof.d(55): Error: undefined identifier `this`, did you mean `typeof(this)`? + enum E1 : this + ^ +fail_compilation/fail_typeof.d(65): Error: undefined identifier `super` + enum E3 : super + ^ +fail_compilation/fail_typeof.d(70): Error: `super` is not in a class scope + enum E4 : typeof(super) + ^ +fail_compilation/fail_typeof.d(78): Error: undefined identifier `this`, did you mean `typeof(this)`? + enum E1 : this + ^ +fail_compilation/fail_typeof.d(88): Error: undefined identifier `super`, did you mean `typeof(super)`? + enum E3 : super + ^ --- */ diff --git a/compiler/test/fail_compilation/failcontracts.d b/compiler/test/fail_compilation/failcontracts.d index 51275d0140e2..6457d5ffd03d 100644 --- a/compiler/test/fail_compilation/failcontracts.d +++ b/compiler/test/fail_compilation/failcontracts.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/failcontracts.d(17): Error: missing `{ ... }` for function literal -fail_compilation/failcontracts.d(17): Error: semicolon expected following auto declaration, not `bode` -fail_compilation/failcontracts.d(18): Error: function declaration without return type. (Note that constructors are always named `this`) -fail_compilation/failcontracts.d(18): Error: no identifier for declarator `test1()` -fail_compilation/failcontracts.d(18): Error: semicolon expected following function declaration, not `bode` -fail_compilation/failcontracts.d(19): Error: semicolon expected following function declaration, not `bode` -fail_compilation/failcontracts.d(21): Error: unexpected `(` in declarator -fail_compilation/failcontracts.d(21): Error: found `T` when expecting `)` -fail_compilation/failcontracts.d(21): Error: expected `{`, not `;` for enum declaration +fail_compilation/failcontracts.d(33): Error: missing `{ ... }` for function literal + auto f1 = function() bode; + ^ +fail_compilation/failcontracts.d(33): Error: semicolon expected following auto declaration, not `bode` + auto f1 = function() bode; + ^ +fail_compilation/failcontracts.d(34): Error: function declaration without return type. (Note that constructors are always named `this`) + auto test1() bode; + ^ +fail_compilation/failcontracts.d(34): Error: no identifier for declarator `test1()` + auto test1() bode; + ^ +fail_compilation/failcontracts.d(34): Error: semicolon expected following function declaration, not `bode` + auto test1() bode; + ^ +fail_compilation/failcontracts.d(35): Error: semicolon expected following function declaration, not `bode` + auto test2()() bode; + ^ +fail_compilation/failcontracts.d(37): Error: unexpected `(` in declarator + enum : int (int function() bode T); + ^ +fail_compilation/failcontracts.d(37): Error: found `T` when expecting `)` + enum : int (int function() bode T); + ^ +fail_compilation/failcontracts.d(37): Error: expected `{`, not `;` for enum declaration --- */ diff --git a/compiler/test/fail_compilation/failcstuff1.c b/compiler/test/fail_compilation/failcstuff1.c index 0e6e1c85692f..cfaa07f1148c 100644 --- a/compiler/test/fail_compilation/failcstuff1.c +++ b/compiler/test/fail_compilation/failcstuff1.c @@ -1,94 +1,192 @@ // check the expression parser /* TEST_OUTPUT: --- -fail_compilation/failcstuff1.c(100): Error: no members for `enum E21962` -fail_compilation/failcstuff1.c(101): Error: no members for anonymous enum -fail_compilation/failcstuff1.c(152): Error: `;` or `,` expected -fail_compilation/failcstuff1.c(153): Error: `void` has no value -fail_compilation/failcstuff1.c(153): Error: missing comma -fail_compilation/failcstuff1.c(153): Error: `;` or `,` expected -fail_compilation/failcstuff1.c(157): Error: expression expected, not `struct` -fail_compilation/failcstuff1.c(157): Error: found `S22028` when expecting `)` -fail_compilation/failcstuff1.c(157): Error: missing comma or semicolon after declaration of `test22028`, found `ident` instead -fail_compilation/failcstuff1.c(203): Error: storage class not allowed in specifier-qualified-list -fail_compilation/failcstuff1.c(204): Error: storage class not allowed in specifier-qualified-list +fail_compilation/failcstuff1.c(184): Error: no members for `enum E21962` +enum E21962 { }; + ^ +fail_compilation/failcstuff1.c(185): Error: no members for anonymous enum +enum { }; + ^ +fail_compilation/failcstuff1.c(192): Error: `;` or `,` expected + int init = 1; + ^ +fail_compilation/failcstuff1.c(193): Error: `void` has no value + void vfield nocomma; + ^ +fail_compilation/failcstuff1.c(193): Error: missing comma + void vfield nocomma; + ^ +fail_compilation/failcstuff1.c(193): Error: `;` or `,` expected + void vfield nocomma; + ^ +fail_compilation/failcstuff1.c(197): Error: expression expected, not `struct` +int test22028 = sizeof(struct S22028 ident); + ^ +fail_compilation/failcstuff1.c(197): Error: found `S22028` when expecting `)` +int test22028 = sizeof(struct S22028 ident); + ^ +fail_compilation/failcstuff1.c(197): Error: missing comma or semicolon after declaration of `test22028`, found `ident` instead +int test22028 = sizeof(struct S22028 ident); + ^ fail_compilation/failcstuff1.c(205): Error: storage class not allowed in specifier-qualified-list + typedef int tfield; + ^ fail_compilation/failcstuff1.c(206): Error: storage class not allowed in specifier-qualified-list + extern int efield; + ^ fail_compilation/failcstuff1.c(207): Error: storage class not allowed in specifier-qualified-list + static int sfield; + ^ fail_compilation/failcstuff1.c(208): Error: storage class not allowed in specifier-qualified-list -fail_compilation/failcstuff1.c(251): Error: identifier or `(` expected -fail_compilation/failcstuff1.c(251): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(251): Error: expected identifier for declaration -fail_compilation/failcstuff1.c(252): Error: identifier or `(` expected -fail_compilation/failcstuff1.c(252): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(252): Error: expected identifier for declaration -fail_compilation/failcstuff1.c(253): Error: identifier or `(` expected -fail_compilation/failcstuff1.c(253): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(253): Error: expected identifier for declaration -fail_compilation/failcstuff1.c(258): Error: identifier or `(` expected -fail_compilation/failcstuff1.c(258): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(259): Error: identifier or `(` expected -fail_compilation/failcstuff1.c(259): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(260): Error: identifier or `(` expected -fail_compilation/failcstuff1.c(260): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(301): Error: illegal type combination -fail_compilation/failcstuff1.c(352): Error: found `2` when expecting `:` -fail_compilation/failcstuff1.c(352): Error: found `:` instead of statement -fail_compilation/failcstuff1.c(450): Error: static array parameters are not supported -fail_compilation/failcstuff1.c(450): Error: static or type qualifier used in non-outermost array type derivation -fail_compilation/failcstuff1.c(451): Error: static or type qualifier used in non-outermost array type derivation -fail_compilation/failcstuff1.c(451): Error: array type has incomplete element type `int[0]` -fail_compilation/failcstuff1.c(452): Error: array type has incomplete element type `int[0]` -fail_compilation/failcstuff1.c(453): Error: array type has incomplete element type `int[0]` -fail_compilation/failcstuff1.c(454): Error: found `const` when expecting `,` -fail_compilation/failcstuff1.c(458): Error: static array parameters are not supported -fail_compilation/failcstuff1.c(458): Error: static or type qualifier used outside of function prototype -fail_compilation/failcstuff1.c(459): Error: static or type qualifier used outside of function prototype -fail_compilation/failcstuff1.c(460): Error: variable length arrays are not supported -fail_compilation/failcstuff1.c(460): Error: variable length array used outside of function prototype -fail_compilation/failcstuff1.c(461): Error: array type has incomplete element type `int[0]` -fail_compilation/failcstuff1.c(462): Error: `=`, `;` or `,` expected to end declaration instead of `const` -fail_compilation/failcstuff1.c(502): Error: no type-specifier for parameter -fail_compilation/failcstuff1.c(502): Error: found `0` when expecting `,` -fail_compilation/failcstuff1.c(502): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(504): Error: expected identifier for declarator -fail_compilation/failcstuff1.c(551): Error: missing comma or semicolon after declaration of `pluto`, found `p` instead -fail_compilation/failcstuff1.c(601): Error: `=`, `;` or `,` expected to end declaration instead of `'s'` -fail_compilation/failcstuff1.c(652): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(653): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(654): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(655): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(656): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(657): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(658): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(659): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(660): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(661): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(662): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(663): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(664): Error: multiple storage classes in declaration specifiers -fail_compilation/failcstuff1.c(666): Error: `inline` and `_Noreturn` function specifiers not allowed for `_Thread_local` -fail_compilation/failcstuff1.c(667): Error: `inline` and `_Noreturn` function specifiers not allowed for `_Thread_local` -fail_compilation/failcstuff1.c(700): Error: `auto` and `register` storage class not allowed for global + _Thread_local int lfield; + ^ +fail_compilation/failcstuff1.c(209): Error: storage class not allowed in specifier-qualified-list + auto int afield; + ^ +fail_compilation/failcstuff1.c(210): Error: storage class not allowed in specifier-qualified-list + register int rfield; + ^ +fail_compilation/failcstuff1.c(216): Error: identifier or `(` expected +fail_compilation/failcstuff1.c(216): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(216): Error: expected identifier for declaration +fail_compilation/failcstuff1.c(217): Error: identifier or `(` expected +int &; + ^ +fail_compilation/failcstuff1.c(217): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(217): Error: expected identifier for declaration +fail_compilation/failcstuff1.c(218): Error: identifier or `(` expected +int , int; + ^ +fail_compilation/failcstuff1.c(218): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(218): Error: expected identifier for declaration +fail_compilation/failcstuff1.c(223): Error: identifier or `(` expected +fail_compilation/failcstuff1.c(223): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(224): Error: identifier or `(` expected + int &; + ^ +fail_compilation/failcstuff1.c(224): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(225): Error: identifier or `(` expected + int, int; + ^ +fail_compilation/failcstuff1.c(225): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(234): Error: illegal type combination +int test22032; + ^ +fail_compilation/failcstuff1.c(240): Error: found `2` when expecting `:` + case 1 2: + ^ +fail_compilation/failcstuff1.c(240): Error: found `:` instead of statement +fail_compilation/failcstuff1.c(249): Error: static array parameters are not supported +void test22103a(int array[4][static 4]); + ^ +fail_compilation/failcstuff1.c(249): Error: static or type qualifier used in non-outermost array type derivation +void test22103a(int array[4][static 4]); + ^ +fail_compilation/failcstuff1.c(250): Error: static or type qualifier used in non-outermost array type derivation +void test22103b(int array[4][restrict]); + ^ +fail_compilation/failcstuff1.c(250): Error: array type has incomplete element type `int[0]` +void test22103b(int array[4][restrict]); + ^ +fail_compilation/failcstuff1.c(251): Error: array type has incomplete element type `int[0]` +void test22103c(int array[4][]); + ^ +fail_compilation/failcstuff1.c(252): Error: array type has incomplete element type `int[0]` +void test22103d(int array[][]); + ^ +fail_compilation/failcstuff1.c(253): Error: found `const` when expecting `,` +void test22103e(int array[4] const); + ^ +fail_compilation/failcstuff1.c(257): Error: static array parameters are not supported +fail_compilation/failcstuff1.c(257): Error: static or type qualifier used outside of function prototype +fail_compilation/failcstuff1.c(258): Error: static or type qualifier used outside of function prototype +fail_compilation/failcstuff1.c(259): Error: variable length arrays are not supported +fail_compilation/failcstuff1.c(259): Error: variable length array used outside of function prototype +fail_compilation/failcstuff1.c(260): Error: array type has incomplete element type `int[0]` +fail_compilation/failcstuff1.c(261): Error: `=`, `;` or `,` expected to end declaration instead of `const` + int array4[4] const; + ^ +fail_compilation/failcstuff1.c(268): Error: no type-specifier for parameter + int(0); + ^ +fail_compilation/failcstuff1.c(268): Error: found `0` when expecting `,` + int(0); + ^ +fail_compilation/failcstuff1.c(268): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(270): Error: expected identifier for declarator +fail_compilation/failcstuff1.c(277): Error: missing comma or semicolon after declaration of `pluto`, found `p` instead +int * pluto p; + ^ +fail_compilation/failcstuff1.c(282): Error: `=`, `;` or `,` expected to end declaration instead of `'s'` +char c22909 = u8's'; + ^ +fail_compilation/failcstuff1.c(288): Error: multiple storage classes in declaration specifiers + static extern int aa; + ^ +fail_compilation/failcstuff1.c(289): Error: multiple storage classes in declaration specifiers + static auto int ab; + ^ +fail_compilation/failcstuff1.c(290): Error: multiple storage classes in declaration specifiers + static register int ac; + ^ +fail_compilation/failcstuff1.c(291): Error: multiple storage classes in declaration specifiers + static typedef int ad; + ^ +fail_compilation/failcstuff1.c(292): Error: multiple storage classes in declaration specifiers + extern auto int ah; + ^ +fail_compilation/failcstuff1.c(293): Error: multiple storage classes in declaration specifiers + extern register int ai; + ^ +fail_compilation/failcstuff1.c(294): Error: multiple storage classes in declaration specifiers + extern typedef int aj; + ^ +fail_compilation/failcstuff1.c(295): Error: multiple storage classes in declaration specifiers + auto register int an; + ^ +fail_compilation/failcstuff1.c(296): Error: multiple storage classes in declaration specifiers + auto typedef int ao; + ^ +fail_compilation/failcstuff1.c(297): Error: multiple storage classes in declaration specifiers + auto _Thread_local int ar; + ^ +fail_compilation/failcstuff1.c(298): Error: multiple storage classes in declaration specifiers + register typedef int as; + ^ +fail_compilation/failcstuff1.c(299): Error: multiple storage classes in declaration specifiers + register _Thread_local int av; + ^ +fail_compilation/failcstuff1.c(300): Error: multiple storage classes in declaration specifiers + typedef _Thread_local int ay; + ^ +fail_compilation/failcstuff1.c(302): Error: `inline` and `_Noreturn` function specifiers not allowed for `_Thread_local` + inline _Thread_local int ba; + ^ +fail_compilation/failcstuff1.c(303): Error: `inline` and `_Noreturn` function specifiers not allowed for `_Thread_local` + _Noreturn _Thread_local int bb; + ^ +fail_compilation/failcstuff1.c(323): Error: `auto` and `register` storage class not allowed for global +register char *stack_pointer; +^ --- */ /********************************/ // https://issues.dlang.org/show_bug.cgi?id=21937 -#line 50 +// Line 50 starts here void test21962() __attribute__((noinline)) { } /********************************/ // https://issues.dlang.org/show_bug.cgi?id=21962 -#line 100 +// Line 100 starts here enum E21962 { }; enum { }; /********************************/ // https://issues.dlang.org/show_bug.cgi?id=22028 -#line 150 +// Line 150 starts here struct S22028 { int init = 1; @@ -100,7 +198,7 @@ int test22028 = sizeof(struct S22028 ident); /********************************/ // https://issues.dlang.org/show_bug.cgi?id=22029 -#line 200 +// Line 200 starts here struct S22029 { int field; @@ -113,7 +211,7 @@ struct S22029 }; // https://issues.dlang.org/show_bug.cgi?id=22030 -#line 250 +// Line 250 starts here int; int *; int &; @@ -131,23 +229,23 @@ struct S22030 void test22030(struct S22030, struct S22030*, struct S22030[4]); // https://issues.dlang.org/show_bug.cgi?id=22032 -#line 300 +// Line 300 starts here struct S22032 { int field; } int test22032; // https://issues.dlang.org/show_bug.cgi?id=22035 -#line 350 +// Line 350 starts here void test22035() { case 1 2: } // https://issues.dlang.org/show_bug.cgi?id=21932 -#line 400 +// Line 400 starts here enum ENUM; // https://issues.dlang.org/show_bug.cgi?id=22103 -#line 450 +// Line 450 starts here void test22103a(int array[4][static 4]); void test22103b(int array[4][restrict]); void test22103c(int array[4][]); @@ -164,7 +262,7 @@ void test22103e() } // https://issues.dlang.org/show_bug.cgi?id=22102 -#line 500 +// Line 500 starts here void test22102() { int(0); @@ -174,17 +272,17 @@ void test22102() } /****************************************************/ -#line 550 +// Line 550 starts here int * pluto p; // https://issues.dlang.org/show_bug.cgi?id=22909 -#line 600 +// Line 600 starts here char c22909 = u8's'; /****************************************************/ -#line 650 +// Line 650 starts here void testDeclSpec() { static extern int aa; @@ -221,5 +319,5 @@ void testDeclSpec() } /****************************************************/ -#line 700 +// Line 700 starts here register char *stack_pointer; diff --git a/compiler/test/fail_compilation/failcstuff2.c b/compiler/test/fail_compilation/failcstuff2.c index fe86b7206ead..f24121c7354c 100644 --- a/compiler/test/fail_compilation/failcstuff2.c +++ b/compiler/test/fail_compilation/failcstuff2.c @@ -1,45 +1,111 @@ // check semantic analysis of C files /* TEST_OUTPUT: --- -fail_compilation/failcstuff2.c(113): Error: cannot modify expression `cast(int)var` because it is not an lvalue -fail_compilation/failcstuff2.c(114): Error: `sizeof` is not a member of `int` -fail_compilation/failcstuff2.c(115): Error: cannot modify expression `cast(short)3` because it is not an lvalue -fail_compilation/failcstuff2.c(116): Error: cannot modify constant `4` -fail_compilation/failcstuff2.c(117): Error: cannot modify constant `5` -fail_compilation/failcstuff2.c(118): Error: cannot take address of constant `6` -fail_compilation/failcstuff2.c(119): Error: cannot modify expression `cast(int)var` because it is not an lvalue -fail_compilation/failcstuff2.c(120): Error: cannot modify expression `cast(int)var` because it is not an lvalue -fail_compilation/failcstuff2.c(121): Error: cannot modify expression `cast(int)var` because it is not an lvalue -fail_compilation/failcstuff2.c(122): Error: cannot modify expression `cast(int)var` because it is not an lvalue -fail_compilation/failcstuff2.c(123): Error: cannot take address of expression `cast(int)var` because it is not an lvalue -fail_compilation/failcstuff2.c(124): Error: cannot take address of expression `makeS22067().field` because it is not an lvalue -fail_compilation/failcstuff2.c(125): Error: cannot modify expression `makeS22067().field` because it is not an lvalue -fail_compilation/failcstuff2.c(126): Error: cannot modify expression `makeS22067().field` because it is not an lvalue -fail_compilation/failcstuff2.c(127): Error: cannot modify expression `makeS22067().field` because it is not an lvalue -fail_compilation/failcstuff2.c(153): Error: cannot modify expression `cast(short)var` because it is not an lvalue -fail_compilation/failcstuff2.c(154): Error: cannot modify expression `cast(long)var` because it is not an lvalue -fail_compilation/failcstuff2.c(354): Error: variable `arr` cannot be read at compile time -fail_compilation/failcstuff2.c(360): Error: variable `str` cannot be read at compile time -fail_compilation/failcstuff2.c(352): Error: cannot take address of register variable `reg1` -fail_compilation/failcstuff2.c(355): Error: cannot take address of register variable `reg2` -fail_compilation/failcstuff2.c(358): Error: cannot take address of register variable `reg3` -fail_compilation/failcstuff2.c(359): Error: cannot index through register variable `reg3` -fail_compilation/failcstuff2.c(360): Error: cannot take address of register variable `reg3` -fail_compilation/failcstuff2.c(361): Error: cannot take address of register variable `reg3` -fail_compilation/failcstuff2.c(362): Error: cannot index through register variable `reg3` -fail_compilation/failcstuff2.c(373): Error: cannot take address of register variable `reg4` -fail_compilation/failcstuff2.c(374): Error: cannot take address of register variable `reg4` -fail_compilation/failcstuff2.c(375): Error: cannot take address of register variable `reg4` -fail_compilation/failcstuff2.c(376): Error: cannot take address of bit-field `b` -fail_compilation/failcstuff2.c(377): Error: cannot index through register variable `reg4` -fail_compilation/failcstuff2.c(378): Error: cannot index through register variable `reg4` -fail_compilation/failcstuff2.c(381): Error: cannot take address of register variable `reg5` +fail_compilation/failcstuff2.c(137): Error: cannot modify expression `cast(int)var` because it is not an lvalue + (int) var = 1; + ^ +fail_compilation/failcstuff2.c(138): Error: `sizeof` is not a member of `int` + sizeof(var) = 2; + ^ +fail_compilation/failcstuff2.c(139): Error: cannot modify expression `cast(short)3` because it is not an lvalue + ++(short)3; + ^ +fail_compilation/failcstuff2.c(140): Error: cannot modify constant `4` + --4; + ^ +fail_compilation/failcstuff2.c(141): Error: cannot modify constant `5` + (5)++; + ^ +fail_compilation/failcstuff2.c(142): Error: cannot take address of constant `6` + (&6); + ^ +fail_compilation/failcstuff2.c(143): Error: cannot modify expression `cast(int)var` because it is not an lvalue + ((int)var)++; + ^ +fail_compilation/failcstuff2.c(144): Error: cannot modify expression `cast(int)var` because it is not an lvalue + ((int)var)--; + ^ +fail_compilation/failcstuff2.c(145): Error: cannot modify expression `cast(int)var` because it is not an lvalue + ++(int)var; + ^ +fail_compilation/failcstuff2.c(146): Error: cannot modify expression `cast(int)var` because it is not an lvalue + --(int)var; + ^ +fail_compilation/failcstuff2.c(147): Error: cannot take address of expression `cast(int)var` because it is not an lvalue + &(int)var; + ^ +fail_compilation/failcstuff2.c(148): Error: cannot take address of expression `makeS22067().field` because it is not an lvalue + &makeS22067().field; + ^ +fail_compilation/failcstuff2.c(149): Error: cannot modify expression `makeS22067().field` because it is not an lvalue + makeS22067().field = 1; + ^ +fail_compilation/failcstuff2.c(150): Error: cannot modify expression `makeS22067().field` because it is not an lvalue + makeS22067().field++; + ^ +fail_compilation/failcstuff2.c(151): Error: cannot modify expression `makeS22067().field` because it is not an lvalue + --makeS22067().field; + ^ +fail_compilation/failcstuff2.c(160): Error: cannot modify expression `cast(short)var` because it is not an lvalue + ++(short) var; + ^ +fail_compilation/failcstuff2.c(161): Error: cannot modify expression `cast(long)var` because it is not an lvalue + --(long long) var; + ^ +fail_compilation/failcstuff2.c(185): Error: variable `arr` cannot be read at compile time + int arr2[] = arr; + ^ +fail_compilation/failcstuff2.c(191): Error: variable `str` cannot be read at compile time + char msg[] = str; + ^ +fail_compilation/failcstuff2.c(198): Error: cannot take address of register variable `reg1` + int *ptr1 = ®1; + ^ +fail_compilation/failcstuff2.c(201): Error: cannot take address of register variable `reg2` + int *ptr2 = ®2; + ^ +fail_compilation/failcstuff2.c(204): Error: cannot take address of register variable `reg3` + int *ptr3 = (int *)reg3; + ^ +fail_compilation/failcstuff2.c(205): Error: cannot index through register variable `reg3` + int idx3a = reg3[0]; + ^ +fail_compilation/failcstuff2.c(206): Error: cannot take address of register variable `reg3` + int idx3b = *reg3; + ^ +fail_compilation/failcstuff2.c(207): Error: cannot take address of register variable `reg3` + int idx3c = reg3 + 0; + ^ +fail_compilation/failcstuff2.c(208): Error: cannot index through register variable `reg3` + int idx3d = 0[reg3]; + ^ +fail_compilation/failcstuff2.c(219): Error: cannot take address of register variable `reg4` + int *ptr4a = &(reg4.inner.i); + ^ +fail_compilation/failcstuff2.c(220): Error: cannot take address of register variable `reg4` + int *ptr4b = reg4.inner.a; + ^ +fail_compilation/failcstuff2.c(221): Error: cannot take address of register variable `reg4` + int *ptr4c = (int*)reg4.inner.a; + ^ +fail_compilation/failcstuff2.c(222): Error: cannot take address of bit-field `b` + int *ptr4d = &(reg4.inner.b); + ^ +fail_compilation/failcstuff2.c(223): Error: cannot index through register variable `reg4` + int idx4a = reg4.inner.a[0]; + ^ +fail_compilation/failcstuff2.c(224): Error: cannot index through register variable `reg4` + int idx4b = 0[reg4.inner.a]; + ^ +fail_compilation/failcstuff2.c(227): Error: cannot take address of register variable `reg5` + int **ptr5 = ®5; + ^ --- */ /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=22069 -#line 50 +// Line 50 starts here void test22069() { int var; @@ -54,7 +120,7 @@ void test22069() /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=22067 -#line 100 +// Line 100 starts here struct S22067 { int field; @@ -87,7 +153,7 @@ void test22067() /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=22068 -#line 150 +// Line 150 starts here void test22068() { int var; @@ -97,7 +163,7 @@ void test22068() /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=22405 -#line 300 +// Line 300 starts here struct S22405 { int * const p; @@ -111,7 +177,7 @@ void test22405(struct S22405 *s) /***************************************************/ // https://issues.dlang.org/show_bug.cgi?id=22413 -#line 350 +// Line 350 starts here void test22413a() { @@ -126,7 +192,7 @@ void test22413b() } /***************************************************/ -#line 350 +// Line 350 starts here void testRegister(register int reg1) { int *ptr1 = ®1; diff --git a/compiler/test/fail_compilation/faildeleteaa.d b/compiler/test/fail_compilation/faildeleteaa.d index ed640fb896c4..eb723a9713e0 100644 --- a/compiler/test/fail_compilation/faildeleteaa.d +++ b/compiler/test/fail_compilation/faildeleteaa.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/faildeleteaa.d(12): Error: the `delete` keyword is obsolete -fail_compilation/faildeleteaa.d(12): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/faildeleteaa.d(14): Error: the `delete` keyword is obsolete + delete aa[1]; + ^ +fail_compilation/faildeleteaa.d(14): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead --- */ diff --git a/compiler/test/fail_compilation/failescape.d b/compiler/test/fail_compilation/failescape.d index 8376893e580a..c8fad245ac2f 100644 --- a/compiler/test/fail_compilation/failescape.d +++ b/compiler/test/fail_compilation/failescape.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/failescape.d(8): Error: character '\' is not a valid token +fail_compilation/failescape.d(10): Error: character '\' is not a valid token +string x = \n; + ^ --- */ diff --git a/compiler/test/fail_compilation/failinout1.d b/compiler/test/fail_compilation/failinout1.d index aa7a4b66f542..deb9faa89056 100644 --- a/compiler/test/fail_compilation/failinout1.d +++ b/compiler/test/fail_compilation/failinout1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/failinout1.d(9): Error: cannot modify `inout` expression `x` +fail_compilation/failinout1.d(11): Error: cannot modify `inout` expression `x` + x = 5; // cannot modify inout + ^ --- */ inout(int) foo(inout(int) x) diff --git a/compiler/test/fail_compilation/failinout2.d b/compiler/test/fail_compilation/failinout2.d index 6fe86434e29f..030208dc36f8 100644 --- a/compiler/test/fail_compilation/failinout2.d +++ b/compiler/test/fail_compilation/failinout2.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/failinout2.d(8): Error: variable `failinout2.x` - only parameters or stack-based variables can be `inout` -fail_compilation/failinout2.d(12): Error: variable `failinout2.S3748.err8` - only parameters or stack-based variables can be `inout` +fail_compilation/failinout2.d(12): Error: variable `failinout2.x` - only parameters or stack-based variables can be `inout` +inout int x; + ^ +fail_compilation/failinout2.d(16): Error: variable `failinout2.S3748.err8` - only parameters or stack-based variables can be `inout` + inout(int) err8; + ^ --- */ inout int x; diff --git a/compiler/test/fail_compilation/failoffset.d b/compiler/test/fail_compilation/failoffset.d index ff0d26be6737..21e81cb1387a 100644 --- a/compiler/test/fail_compilation/failoffset.d +++ b/compiler/test/fail_compilation/failoffset.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/failoffset.d(12): Error: no property `offset` for `b` of type `int` -fail_compilation/failoffset.d(12): while evaluating: `static assert(b.offset == 4)` +fail_compilation/failoffset.d(16): Error: no property `offset` for `b` of type `int` + static assert(S.b.offset == 4); + ^ +fail_compilation/failoffset.d(16): while evaluating: `static assert(b.offset == 4)` + static assert(S.b.offset == 4); + ^ --- */ diff --git a/compiler/test/fail_compilation/failsafea.d b/compiler/test/fail_compilation/failsafea.d index e121bda1b96e..eff7c10041e2 100644 --- a/compiler/test/fail_compilation/failsafea.d +++ b/compiler/test/fail_compilation/failsafea.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/failsafea.d(14): Error: `@safe` function `failsafea.callingsystem` cannot call `@system` function `failsafea.systemfunc` -fail_compilation/failsafea.d(9): `failsafea.systemfunc` is declared here +fail_compilation/failsafea.d(18): Error: `@safe` function `failsafea.callingsystem` cannot call `@system` function `failsafea.systemfunc` + systemfunc(); + ^ +fail_compilation/failsafea.d(13): `failsafea.systemfunc` is declared here +void systemfunc() @system {} + ^ --- */ diff --git a/compiler/test/fail_compilation/failsafeb.d b/compiler/test/fail_compilation/failsafeb.d index 6af6b6f98c64..def871567ec1 100644 --- a/compiler/test/fail_compilation/failsafeb.d +++ b/compiler/test/fail_compilation/failsafeb.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/failsafeb.d(13): Error: `@safe` function `failsafeb.callingsystem` cannot call `@system` function pointer `sysfuncptr` +fail_compilation/failsafeb.d(15): Error: `@safe` function `failsafeb.callingsystem` cannot call `@system` function pointer `sysfuncptr` + sysfuncptr(); + ^ --- */ diff --git a/compiler/test/fail_compilation/failsafec.d b/compiler/test/fail_compilation/failsafec.d index 979f46c3c167..0368ebededf4 100644 --- a/compiler/test/fail_compilation/failsafec.d +++ b/compiler/test/fail_compilation/failsafec.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/failsafec.d(13): Error: `@safe` function `failsafec.callingsystem` cannot call `@system` delegate `sysdelegate` +fail_compilation/failsafec.d(15): Error: `@safe` function `failsafec.callingsystem` cannot call `@system` delegate `sysdelegate` + sysdelegate(); + ^ --- */ diff --git a/compiler/test/fail_compilation/finalswitch.d b/compiler/test/fail_compilation/finalswitch.d index 634700940a50..4a72113907cd 100644 --- a/compiler/test/fail_compilation/finalswitch.d +++ b/compiler/test/fail_compilation/finalswitch.d @@ -1,27 +1,37 @@ /* TEST_OUTPUT: --- -fail_compilation/finalswitch.d(37): Error: missing cases for `enum` members in `final switch`: -fail_compilation/finalswitch.d(37): `B` -fail_compilation/finalswitch.d(55): Error: missing cases for `enum` members in `final switch`: -fail_compilation/finalswitch.d(55): `b` -fail_compilation/finalswitch.d(69): Error: missing cases for `enum` members in `final switch`: -fail_compilation/finalswitch.d(69): `B` -fail_compilation/finalswitch.d(87): Error: missing cases for `enum` members in `final switch`: -fail_compilation/finalswitch.d(87): `m3` -fail_compilation/finalswitch.d(87): `m4` -fail_compilation/finalswitch.d(87): `m5` -fail_compilation/finalswitch.d(87): `m6` -fail_compilation/finalswitch.d(87): `m7` -fail_compilation/finalswitch.d(87): `m9` -fail_compilation/finalswitch.d(92): Error: missing cases for `enum` members in `final switch`: -fail_compilation/finalswitch.d(92): `m1` -fail_compilation/finalswitch.d(92): `m2` -fail_compilation/finalswitch.d(92): `m3` -fail_compilation/finalswitch.d(92): `m4` -fail_compilation/finalswitch.d(92): `m5` -fail_compilation/finalswitch.d(92): `m6` -fail_compilation/finalswitch.d(92): ... (4 more, -v to show) ... +fail_compilation/finalswitch.d(47): Error: missing cases for `enum` members in `final switch`: + final switch(e) + ^ +fail_compilation/finalswitch.d(47): `B` +fail_compilation/finalswitch.d(65): Error: missing cases for `enum` members in `final switch`: + final switch (f) + ^ +fail_compilation/finalswitch.d(65): `b` +fail_compilation/finalswitch.d(79): Error: missing cases for `enum` members in `final switch`: + final switch (e) + ^ +fail_compilation/finalswitch.d(79): `B` +fail_compilation/finalswitch.d(97): Error: missing cases for `enum` members in `final switch`: + final switch (H.init) + ^ +fail_compilation/finalswitch.d(97): `m3` +fail_compilation/finalswitch.d(97): `m4` +fail_compilation/finalswitch.d(97): `m5` +fail_compilation/finalswitch.d(97): `m6` +fail_compilation/finalswitch.d(97): `m7` +fail_compilation/finalswitch.d(97): `m9` +fail_compilation/finalswitch.d(102): Error: missing cases for `enum` members in `final switch`: + final switch (H.init) + ^ +fail_compilation/finalswitch.d(102): `m1` +fail_compilation/finalswitch.d(102): `m2` +fail_compilation/finalswitch.d(102): `m3` +fail_compilation/finalswitch.d(102): `m4` +fail_compilation/finalswitch.d(102): `m5` +fail_compilation/finalswitch.d(102): `m6` +fail_compilation/finalswitch.d(102): ... (4 more, -v to show) ... --- */ diff --git a/compiler/test/fail_compilation/finalswitch_verbose.d b/compiler/test/fail_compilation/finalswitch_verbose.d index 4bf5d46f841e..bd9a91e19c9b 100644 --- a/compiler/test/fail_compilation/finalswitch_verbose.d +++ b/compiler/test/fail_compilation/finalswitch_verbose.d @@ -3,27 +3,29 @@ REQUIRED_ARGS: -v TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|semantic|entry|\s*$)") TEST_OUTPUT: --- -fail_compilation/finalswitch_verbose.d(40): Error: missing cases for `enum` members in `final switch`: -fail_compilation/finalswitch_verbose.d(40): `m1` -fail_compilation/finalswitch_verbose.d(40): `m2` -fail_compilation/finalswitch_verbose.d(40): `m3` -fail_compilation/finalswitch_verbose.d(40): `m4` -fail_compilation/finalswitch_verbose.d(40): `m5` -fail_compilation/finalswitch_verbose.d(40): `m6` -fail_compilation/finalswitch_verbose.d(40): `m7` -fail_compilation/finalswitch_verbose.d(40): `m8` -fail_compilation/finalswitch_verbose.d(40): `m9` -fail_compilation/finalswitch_verbose.d(40): `m10` -fail_compilation/finalswitch_verbose.d(40): `m11` -fail_compilation/finalswitch_verbose.d(40): `m12` -fail_compilation/finalswitch_verbose.d(40): `m13` -fail_compilation/finalswitch_verbose.d(40): `m14` -fail_compilation/finalswitch_verbose.d(40): `m15` -fail_compilation/finalswitch_verbose.d(40): `m16` -fail_compilation/finalswitch_verbose.d(40): `m17` -fail_compilation/finalswitch_verbose.d(40): `m18` -fail_compilation/finalswitch_verbose.d(40): `m19` -fail_compilation/finalswitch_verbose.d(40): `m20` +fail_compilation/finalswitch_verbose.d(42): Error: missing cases for `enum` members in `final switch`: + final switch (H.init) + ^ +fail_compilation/finalswitch_verbose.d(42): `m1` +fail_compilation/finalswitch_verbose.d(42): `m2` +fail_compilation/finalswitch_verbose.d(42): `m3` +fail_compilation/finalswitch_verbose.d(42): `m4` +fail_compilation/finalswitch_verbose.d(42): `m5` +fail_compilation/finalswitch_verbose.d(42): `m6` +fail_compilation/finalswitch_verbose.d(42): `m7` +fail_compilation/finalswitch_verbose.d(42): `m8` +fail_compilation/finalswitch_verbose.d(42): `m9` +fail_compilation/finalswitch_verbose.d(42): `m10` +fail_compilation/finalswitch_verbose.d(42): `m11` +fail_compilation/finalswitch_verbose.d(42): `m12` +fail_compilation/finalswitch_verbose.d(42): `m13` +fail_compilation/finalswitch_verbose.d(42): `m14` +fail_compilation/finalswitch_verbose.d(42): `m15` +fail_compilation/finalswitch_verbose.d(42): `m16` +fail_compilation/finalswitch_verbose.d(42): `m17` +fail_compilation/finalswitch_verbose.d(42): `m18` +fail_compilation/finalswitch_verbose.d(42): `m19` +fail_compilation/finalswitch_verbose.d(42): `m20` --- */ diff --git a/compiler/test/fail_compilation/fix17349.d b/compiler/test/fail_compilation/fix17349.d index 493d30f8f17d..c4fc90ee56f0 100644 --- a/compiler/test/fail_compilation/fix17349.d +++ b/compiler/test/fail_compilation/fix17349.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/fix17349.d(35): Error: cannot implicitly override base class method `fix17349.E.foo` with `fix17349.F.foo`; add `override` attribute +fail_compilation/fix17349.d(37): Error: cannot implicitly override base class method `fix17349.E.foo` with `fix17349.F.foo`; add `override` attribute + void foo(const void*); + ^ --- */ diff --git a/compiler/test/fail_compilation/fix17751.d b/compiler/test/fail_compilation/fix17751.d index 11b9c5489935..621a1c036f44 100644 --- a/compiler/test/fail_compilation/fix17751.d +++ b/compiler/test/fail_compilation/fix17751.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -m64 * TEST_OUTPUT: --- -fail_compilation/fix17751.d(15): Error: last parameter to `__simd()` must be a constant +fail_compilation/fix17751.d(17): Error: last parameter to `__simd()` must be a constant + return cast(V1)__simd(opcode, op1, op2, imm8); + ^ --- */ diff --git a/compiler/test/fail_compilation/fix18575.d b/compiler/test/fail_compilation/fix18575.d index 49c070712119..386dba34a895 100644 --- a/compiler/test/fail_compilation/fix18575.d +++ b/compiler/test/fail_compilation/fix18575.d @@ -1,10 +1,18 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fix18575.d(27): Error: returning `s.foo()` escapes a reference to parameter `s` -fail_compilation/fix18575.d(31): Error: returning `s.foo()` escapes a reference to parameter `s` -fail_compilation/fix18575.d(35): Error: returning `s.abc()` escapes a reference to parameter `s` -fail_compilation/fix18575.d(39): Error: returning `s.ghi(t)` escapes a reference to parameter `t` +fail_compilation/fix18575.d(35): Error: returning `s.foo()` escapes a reference to parameter `s` + return s.foo(); + ^ +fail_compilation/fix18575.d(39): Error: returning `s.foo()` escapes a reference to parameter `s` + return s.foo(); + ^ +fail_compilation/fix18575.d(43): Error: returning `s.abc()` escapes a reference to parameter `s` + return s.abc(); + ^ +fail_compilation/fix18575.d(47): Error: returning `s.ghi(t)` escapes a reference to parameter `t` + return s.ghi(t); + ^ --- */ diff --git a/compiler/test/fail_compilation/fix19018.d b/compiler/test/fail_compilation/fix19018.d index b2a2a304bb79..2e8e01a2f4e7 100644 --- a/compiler/test/fail_compilation/fix19018.d +++ b/compiler/test/fail_compilation/fix19018.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fix19018.d(16): Error: `0b` isn't a valid integer literal, use `0b0` instead -fail_compilation/fix19018.d(17): Error: `0B` isn't a valid integer literal, use `0B0` instead -fail_compilation/fix19018.d(18): Error: `0x` isn't a valid integer literal, use `0x0` instead -fail_compilation/fix19018.d(19): Error: `0X` isn't a valid integer literal, use `0X0` instead -fail_compilation/fix19018.d(20): Error: `0x_` isn't a valid integer literal, use `0x0` instead +fail_compilation/fix19018.d(26): Error: `0b` isn't a valid integer literal, use `0b0` instead + auto a = 0b; + ^ +fail_compilation/fix19018.d(27): Error: `0B` isn't a valid integer literal, use `0B0` instead + auto b = 0B; + ^ +fail_compilation/fix19018.d(28): Error: `0x` isn't a valid integer literal, use `0x0` instead + auto c = 0x; + ^ +fail_compilation/fix19018.d(29): Error: `0X` isn't a valid integer literal, use `0X0` instead + auto d = 0X; + ^ +fail_compilation/fix19018.d(30): Error: `0x_` isn't a valid integer literal, use `0x0` instead + auto e = 0x_; + ^ --- */ diff --git a/compiler/test/fail_compilation/fix19059.d b/compiler/test/fail_compilation/fix19059.d index b6bd9d33cf91..9a4d17e1a98e 100644 --- a/compiler/test/fail_compilation/fix19059.d +++ b/compiler/test/fail_compilation/fix19059.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/fix19059.d(16): Error: octal digit expected, not `8` -fail_compilation/fix19059.d(16): Error: octal literals larger than 7 are no longer supported -fail_compilation/fix19059.d(17): Error: octal digit expected, not `9` -fail_compilation/fix19059.d(17): Error: octal literals larger than 7 are no longer supported -fail_compilation/fix19059.d(18): Error: octal literals `010` are no longer supported, use `std.conv.octal!"10"` instead +fail_compilation/fix19059.d(26): Error: octal digit expected, not `8` + auto a = 08; + ^ +fail_compilation/fix19059.d(26): Error: octal literals larger than 7 are no longer supported + auto a = 08; + ^ +fail_compilation/fix19059.d(27): Error: octal digit expected, not `9` + auto b = 09; + ^ +fail_compilation/fix19059.d(27): Error: octal literals larger than 7 are no longer supported + auto b = 09; + ^ +fail_compilation/fix19059.d(28): Error: octal literals `010` are no longer supported, use `std.conv.octal!"10"` instead + auto c = 010; + ^ --- */ diff --git a/compiler/test/fail_compilation/fix19246.d b/compiler/test/fail_compilation/fix19246.d index 55b9650b6b69..7458d2ae9fc7 100644 --- a/compiler/test/fail_compilation/fix19246.d +++ b/compiler/test/fail_compilation/fix19246.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/fix19246.d(15): Error: `0b_` isn't a valid integer literal, use `0b0` instead -fail_compilation/fix19246.d(16): Error: `0B_` isn't a valid integer literal, use `0B0` instead -fail_compilation/fix19246.d(17): Error: `0b` isn't a valid integer literal, use `0b0` instead -fail_compilation/fix19246.d(18): Error: `0B` isn't a valid integer literal, use `0B0` instead +fail_compilation/fix19246.d(23): Error: `0b_` isn't a valid integer literal, use `0b0` instead + auto a = 0b_; + ^ +fail_compilation/fix19246.d(24): Error: `0B_` isn't a valid integer literal, use `0B0` instead + auto b = 0B_; + ^ +fail_compilation/fix19246.d(25): Error: `0b` isn't a valid integer literal, use `0b0` instead + auto c = 0b; + ^ +fail_compilation/fix19246.d(26): Error: `0B` isn't a valid integer literal, use `0B0` instead + auto d = 0B; + ^ --- */ diff --git a/compiler/test/fail_compilation/fix22108.d b/compiler/test/fail_compilation/fix22108.d index 149bebae0ea6..8795623bd935 100644 --- a/compiler/test/fail_compilation/fix22108.d +++ b/compiler/test/fail_compilation/fix22108.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fix22108.d(12): Error: scope variable `p` may not be returned +fail_compilation/fix22108.d(14): Error: scope variable `p` may not be returned + return *p; + ^ --- */ diff --git a/compiler/test/fail_compilation/fix23138.d b/compiler/test/fail_compilation/fix23138.d index 58766c86b7b1..b9cd267f728d 100644 --- a/compiler/test/fail_compilation/fix23138.d +++ b/compiler/test/fail_compilation/fix23138.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/fix23138.d(14): Error: function `fix23138.C2.foo` cannot override `@safe` method `fix23138.C1.foo` with a `@system` attribute +fail_compilation/fix23138.d(16): Error: function `fix23138.C2.foo` cannot override `@safe` method `fix23138.C1.foo` with a `@system` attribute + override void foo() @system + ^ --- */ diff --git a/compiler/test/fail_compilation/fix350a.d b/compiler/test/fail_compilation/fix350a.d index 2d60a009d7d2..b3d5b7b48dda 100644 --- a/compiler/test/fail_compilation/fix350a.d +++ b/compiler/test/fail_compilation/fix350a.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/fix350a.d(12): Error: comma expected separating field initializers -fail_compilation/fix350a.d(12): Error: comma expected separating field initializers +fail_compilation/fix350a.d(16): Error: comma expected separating field initializers + static immutable S1 C1 = { 1 2 3 }; // no commas here, compiles + ^ +fail_compilation/fix350a.d(16): Error: comma expected separating field initializers + static immutable S1 C1 = { 1 2 3 }; // no commas here, compiles + ^ --- */ struct S1 diff --git a/compiler/test/fail_compilation/fix350b.d b/compiler/test/fail_compilation/fix350b.d index 8ec428f88545..055dafbdb4da 100644 --- a/compiler/test/fail_compilation/fix350b.d +++ b/compiler/test/fail_compilation/fix350b.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/fix350b.d(15): Error: comma expected separating field initializers -fail_compilation/fix350b.d(15): Error: comma expected separating field initializers -fail_compilation/fix350b.d(16): Error: comma expected separating field initializers +fail_compilation/fix350b.d(21): Error: comma expected separating field initializers + static immutable S2 C1 = { foo() 2 3 }; // compiles (and works) + ^ +fail_compilation/fix350b.d(21): Error: comma expected separating field initializers + static immutable S2 C1 = { foo() 2 3 }; // compiles (and works) + ^ +fail_compilation/fix350b.d(22): Error: comma expected separating field initializers + static immutable S2 C2 = { foo() 2, 3 }; // compiles (and works) + ^ --- */ int foo() { return 3; } diff --git a/compiler/test/fail_compilation/fix5212.d b/compiler/test/fail_compilation/fix5212.d index 0b804dced960..6536b0eedde6 100644 --- a/compiler/test/fail_compilation/fix5212.d +++ b/compiler/test/fail_compilation/fix5212.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/fix5212.d(14): Error: scope variable `args_` assigned to non-scope `this.args` +fail_compilation/fix5212.d(16): Error: scope variable `args_` assigned to non-scope `this.args` + args = args_; + ^ --- */ diff --git a/compiler/test/fail_compilation/fnconstraint.d b/compiler/test/fail_compilation/fnconstraint.d index 21603f725f66..861c5a781b5b 100644 --- a/compiler/test/fail_compilation/fnconstraint.d +++ b/compiler/test/fail_compilation/fnconstraint.d @@ -1,12 +1,22 @@ /* TEST_OUTPUT: --- -fail_compilation/fnconstraint.d(14): Error: template constraint must follow parameter lists and attributes -fail_compilation/fnconstraint.d(14): Error: declaration expected, not `if` -fail_compilation/fnconstraint.d(23): Error: template constraint must follow parameter lists and attributes -fail_compilation/fnconstraint.d(23): Error: declaration expected, not `if` -fail_compilation/fnconstraint.d(27): Error: `}` expected following members in `struct` declaration -fail_compilation/fnconstraint.d(19): struct `S` starts here +fail_compilation/fnconstraint.d(24): Error: template constraint must follow parameter lists and attributes +if (true) +^ +fail_compilation/fnconstraint.d(24): Error: declaration expected, not `if` +if (true) +^ +fail_compilation/fnconstraint.d(33): Error: template constraint must follow parameter lists and attributes + if (true) {} + ^ +fail_compilation/fnconstraint.d(33): Error: declaration expected, not `if` + if (true) {} + ^ +fail_compilation/fnconstraint.d(37): Error: `}` expected following members in `struct` declaration +fail_compilation/fnconstraint.d(29): struct `S` starts here +struct S +^ --- */ void foo()() diff --git a/compiler/test/fail_compilation/foreach.d b/compiler/test/fail_compilation/foreach.d index 9a1c7c8ddb0e..5c53d94a23be 100644 --- a/compiler/test/fail_compilation/foreach.d +++ b/compiler/test/fail_compilation/foreach.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/foreach.d(12): Error: cannot declare `out` loop variable, use `ref` instead -fail_compilation/foreach.d(13): Error: cannot declare `out` loop variable, use `ref` instead -fail_compilation/foreach.d(13): Error: cannot declare `out` loop variable, use `ref` instead +fail_compilation/foreach.d(18): Error: cannot declare `out` loop variable, use `ref` instead + foreach (out val; array) {} + ^ +fail_compilation/foreach.d(19): Error: cannot declare `out` loop variable, use `ref` instead + foreach (out idx, out val; array) {} + ^ +fail_compilation/foreach.d(19): Error: cannot declare `out` loop variable, use `ref` instead + foreach (out idx, out val; array) {} + ^ --- */ void main () diff --git a/compiler/test/fail_compilation/foreach2.d b/compiler/test/fail_compilation/foreach2.d index 8bd4893b3fb9..f8ed8f953b52 100644 --- a/compiler/test/fail_compilation/foreach2.d +++ b/compiler/test/fail_compilation/foreach2.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/foreach2.d(15): Error: argument type mismatch, `int` to `ref immutable(int)` -fail_compilation/foreach2.d(16): Error: argument type mismatch, `int` to `ref immutable(int)` -fail_compilation/foreach2.d(19): Error: argument type mismatch, `int` to `ref double` -fail_compilation/foreach2.d(20): Error: argument type mismatch, `int` to `ref const(double)` -fail_compilation/foreach2.d(21): Error: argument type mismatch, `int` to `ref immutable(double)` +fail_compilation/foreach2.d(25): Error: argument type mismatch, `int` to `ref immutable(int)` + foreach (immutable ref x; arr) {} + ^ +fail_compilation/foreach2.d(26): Error: argument type mismatch, `int` to `ref immutable(int)` + foreach (immutable ref int x; arr) {} + ^ +fail_compilation/foreach2.d(29): Error: argument type mismatch, `int` to `ref double` + foreach ( ref double x; arr) {} + ^ +fail_compilation/foreach2.d(30): Error: argument type mismatch, `int` to `ref const(double)` + foreach ( const ref double x; arr) {} + ^ +fail_compilation/foreach2.d(31): Error: argument type mismatch, `int` to `ref immutable(double)` + foreach (immutable ref double x; arr) {} + ^ --- */ void test4090 () diff --git a/compiler/test/fail_compilation/foreach_index_overflow.d b/compiler/test/fail_compilation/foreach_index_overflow.d index aa6baa1274b9..d20745ed8a31 100644 --- a/compiler/test/fail_compilation/foreach_index_overflow.d +++ b/compiler/test/fail_compilation/foreach_index_overflow.d @@ -2,10 +2,18 @@ REQUIRED_ARGS: -de -m64 TEST_OUTPUT: --- -fail_compilation/foreach_index_overflow.d(19): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` -fail_compilation/foreach_index_overflow.d(21): Deprecation: foreach: loop index implicitly converted from `size_t` to `ushort` -fail_compilation/foreach_index_overflow.d(24): Deprecation: foreach: loop index implicitly converted from `size_t` to `ubyte` -fail_compilation/foreach_index_overflow.d(26): Deprecation: foreach: loop index implicitly converted from `size_t` to `byte` +fail_compilation/foreach_index_overflow.d(27): Deprecation: foreach: loop index implicitly converted from `size_t` to `int` + foreach (int index, element; arr[0 .. 0x8000_0001]) {} // error + ^ +fail_compilation/foreach_index_overflow.d(29): Deprecation: foreach: loop index implicitly converted from `size_t` to `ushort` + foreach (ushort index, element; arr[0 .. 0x1_0001]) {} // error + ^ +fail_compilation/foreach_index_overflow.d(32): Deprecation: foreach: loop index implicitly converted from `size_t` to `ubyte` + foreach (ubyte i, x; data[]) {} // error + ^ +fail_compilation/foreach_index_overflow.d(34): Deprecation: foreach: loop index implicitly converted from `size_t` to `byte` + foreach (byte i, x; data[0..0x81]) {} // error + ^ --- */ diff --git a/compiler/test/fail_compilation/funcpostattr.d b/compiler/test/fail_compilation/funcpostattr.d index b50db058e32c..02e826587b89 100644 --- a/compiler/test/fail_compilation/funcpostattr.d +++ b/compiler/test/fail_compilation/funcpostattr.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/funcpostattr.d(11): Error: `deprecated` token is not allowed in postfix position -fail_compilation/funcpostattr.d(11): Error: `extern` token is not allowed in postfix position -fail_compilation/funcpostattr.d(15): Error: `static` token is not allowed in postfix position -fail_compilation/funcpostattr.d(15): Error: `ref` token is not allowed in postfix position -fail_compilation/funcpostattr.d(20): Error: `override` token is not allowed in postfix position +fail_compilation/funcpostattr.d(21): Error: `deprecated` token is not allowed in postfix position +void foo() deprecated extern; + ^ +fail_compilation/funcpostattr.d(21): Error: `extern` token is not allowed in postfix position +void foo() deprecated extern; + ^ +fail_compilation/funcpostattr.d(25): Error: `static` token is not allowed in postfix position + int foo() static ref => i; + ^ +fail_compilation/funcpostattr.d(25): Error: `ref` token is not allowed in postfix position + int foo() static ref => i; + ^ +fail_compilation/funcpostattr.d(30): Error: `override` token is not allowed in postfix position + void foo() override {} + ^ --- */ void foo() deprecated extern; diff --git a/compiler/test/fail_compilation/gag4269a.d b/compiler/test/fail_compilation/gag4269a.d index 85a146c14ad4..b20ea924473f 100644 --- a/compiler/test/fail_compilation/gag4269a.d +++ b/compiler/test/fail_compilation/gag4269a.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/gag4269a.d(12): Error: undefined identifier `B` +fail_compilation/gag4269a.d(14): Error: undefined identifier `B` + void foo(B b); + ^ --- */ diff --git a/compiler/test/fail_compilation/gag4269b.d b/compiler/test/fail_compilation/gag4269b.d index e680721b213a..9f0789b525ab 100644 --- a/compiler/test/fail_compilation/gag4269b.d +++ b/compiler/test/fail_compilation/gag4269b.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/gag4269b.d(10): Error: undefined identifier `Y` +fail_compilation/gag4269b.d(12): Error: undefined identifier `Y` +struct X2 { Y y; } + ^ --- */ diff --git a/compiler/test/fail_compilation/gag4269c.d b/compiler/test/fail_compilation/gag4269c.d index 1fa1567cde84..5d58b760e595 100644 --- a/compiler/test/fail_compilation/gag4269c.d +++ b/compiler/test/fail_compilation/gag4269c.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/gag4269c.d(10): Error: undefined identifier `T3`, did you mean function `X3`? +fail_compilation/gag4269c.d(12): Error: undefined identifier `T3`, did you mean function `X3`? +void X3(T3) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/gag4269d.d b/compiler/test/fail_compilation/gag4269d.d index 3154ea580fc3..aed8269dede9 100644 --- a/compiler/test/fail_compilation/gag4269d.d +++ b/compiler/test/fail_compilation/gag4269d.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/gag4269d.d(10): Error: undefined identifier `Y4`, did you mean function `X4`? +fail_compilation/gag4269d.d(12): Error: undefined identifier `Y4`, did you mean function `X4`? +Y4 X4() { return typeof(return).init; } + ^ --- */ diff --git a/compiler/test/fail_compilation/gag4269e.d b/compiler/test/fail_compilation/gag4269e.d index 4a5757cdd7d2..06cb4e52dd57 100644 --- a/compiler/test/fail_compilation/gag4269e.d +++ b/compiler/test/fail_compilation/gag4269e.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/gag4269e.d(10): Error: undefined identifier `Y8`, did you mean class `X8`? +fail_compilation/gag4269e.d(12): Error: undefined identifier `Y8`, did you mean class `X8`? +class X8 : Y8 {} +^ --- */ diff --git a/compiler/test/fail_compilation/gag4269f.d b/compiler/test/fail_compilation/gag4269f.d index db781e9879c2..ee240ec2c9eb 100644 --- a/compiler/test/fail_compilation/gag4269f.d +++ b/compiler/test/fail_compilation/gag4269f.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/gag4269f.d(11): Error: undefined identifier `Y9`, did you mean interface `X9`? -fail_compilation/gag4269f.d(11): Error: field `y` not allowed in interface +fail_compilation/gag4269f.d(15): Error: undefined identifier `Y9`, did you mean interface `X9`? +interface X9 { Y9 y; } + ^ +fail_compilation/gag4269f.d(15): Error: field `y` not allowed in interface +interface X9 { Y9 y; } + ^ --- */ diff --git a/compiler/test/fail_compilation/gag4269g.d b/compiler/test/fail_compilation/gag4269g.d index 4799fa13c1f7..8c96f655f6d6 100644 --- a/compiler/test/fail_compilation/gag4269g.d +++ b/compiler/test/fail_compilation/gag4269g.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/gag4269g.d(10): Error: undefined identifier `Y13`, did you mean template `X13(Y13 y)`? +fail_compilation/gag4269g.d(12): Error: undefined identifier `Y13`, did you mean template `X13(Y13 y)`? +template X13(Y13 y) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/gccasm1.c b/compiler/test/fail_compilation/gccasm1.c index 3ba12bba0576..564f037be322 100644 --- a/compiler/test/fail_compilation/gccasm1.c +++ b/compiler/test/fail_compilation/gccasm1.c @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/gccasm1.c(12): Error: string literal expected for Assembler Template, not `%` +fail_compilation/gccasm1.c(14): Error: string literal expected for Assembler Template, not `%` + __fldcw(&_newcw); + ^ --- */ diff --git a/compiler/test/fail_compilation/hexstring.d b/compiler/test/fail_compilation/hexstring.d index edbb4e67bc0d..aeef352cea2f 100644 --- a/compiler/test/fail_compilation/hexstring.d +++ b/compiler/test/fail_compilation/hexstring.d @@ -1,21 +1,47 @@ /** TEST_OUTPUT: --- -fail_compilation/hexstring.d(29): Error: cannot implicitly convert expression `"123F"` of type `string` to `immutable(ubyte[])` -fail_compilation/hexstring.d(33): Error: hex string length 1 must be a multiple of 2 to cast to `immutable(ushort[])` -fail_compilation/hexstring.d(34): Error: hex string length 3 must be a multiple of 4 to cast to `immutable(uint[])` -fail_compilation/hexstring.d(35): Error: hex string length 5 must be a multiple of 8 to cast to `immutable(ulong[])` -fail_compilation/hexstring.d(36): Error: array cast from `wstring` to `immutable(ulong[])` is not supported at compile time -fail_compilation/hexstring.d(36): perhaps remove postfix `w` from hex string -fail_compilation/hexstring.d(37): Error: array cast from `string` to `immutable(uint[])` is not supported at compile time -fail_compilation/hexstring.d(38): Error: array cast from `string` to `immutable(ushort[])` is not supported at compile time -fail_compilation/hexstring.d(39): Error: array cast from `string` to `immutable(uint[])` is not supported at compile time -fail_compilation/hexstring.d(39): perhaps remove postfix `c` from hex string -fail_compilation/hexstring.d(40): Error: hex string with `dstring` type needs to be multiple of 4 bytes, not 5 -fail_compilation/hexstring.d(41): Error: cannot implicitly convert expression `x"11223344"d` of type `dstring` to `immutable(float[])` -fail_compilation/hexstring.d(42): Error: cannot implicitly convert expression `x"1122"w` of type `wstring` to `immutable(ubyte[])` -fail_compilation/hexstring.d(50): Error: array cast from `string` to `S[]` is not supported at compile time -fail_compilation/hexstring.d(28): Error: cannot implicitly convert expression `x"123F"` of type `string` to `ubyte[]` +fail_compilation/hexstring.d(55): Error: cannot implicitly convert expression `"123F"` of type `string` to `immutable(ubyte[])` +immutable ubyte[] f2 = "123F"; + ^ +fail_compilation/hexstring.d(59): Error: hex string length 1 must be a multiple of 2 to cast to `immutable(ushort[])` +immutable ushort[] f5 = cast(immutable ushort[]) x"11"; + ^ +fail_compilation/hexstring.d(60): Error: hex string length 3 must be a multiple of 4 to cast to `immutable(uint[])` +immutable uint[] f6 = cast(immutable uint[]) x"112233"; + ^ +fail_compilation/hexstring.d(61): Error: hex string length 5 must be a multiple of 8 to cast to `immutable(ulong[])` +immutable ulong[] f7 = cast(immutable ulong[]) x"1122334455"; + ^ +fail_compilation/hexstring.d(62): Error: array cast from `wstring` to `immutable(ulong[])` is not supported at compile time +immutable ulong[] f8 = cast(immutable ulong[]) x"11223344"w; + ^ +fail_compilation/hexstring.d(62): perhaps remove postfix `w` from hex string +fail_compilation/hexstring.d(63): Error: array cast from `string` to `immutable(uint[])` is not supported at compile time +immutable uint[] f9 = cast(immutable uint[]) "ABCD"; + ^ +fail_compilation/hexstring.d(64): Error: array cast from `string` to `immutable(ushort[])` is not supported at compile time +immutable ushort[] f10 = cast(immutable ushort[]) (x"1122" ~ ""); + ^ +fail_compilation/hexstring.d(65): Error: array cast from `string` to `immutable(uint[])` is not supported at compile time +immutable uint[] f11 = cast(immutable uint[]) x"AABBCCDD"c; + ^ +fail_compilation/hexstring.d(65): perhaps remove postfix `c` from hex string +fail_compilation/hexstring.d(66): Error: hex string with `dstring` type needs to be multiple of 4 bytes, not 5 +immutable uint[] f12 = x"1122334455"d; + ^ +fail_compilation/hexstring.d(67): Error: cannot implicitly convert expression `x"11223344"d` of type `dstring` to `immutable(float[])` +immutable float[] f13 = x"11223344"d; + ^ +fail_compilation/hexstring.d(68): Error: cannot implicitly convert expression `x"1122"w` of type `wstring` to `immutable(ubyte[])` +immutable ubyte[] f14 = x"1122"w; + ^ +fail_compilation/hexstring.d(76): Error: array cast from `string` to `S[]` is not supported at compile time +immutable S[] returnValues = cast(S[]) x"FFFFFFFFFFFFFFFFFFFFFFFF"; + ^ +fail_compilation/hexstring.d(54): Error: cannot implicitly convert expression `x"123F"` of type `string` to `ubyte[]` +ubyte[] f1 = x"123F"; + ^ --- */ immutable ubyte[] s0 = x"123F"; diff --git a/compiler/test/fail_compilation/ice10016.d b/compiler/test/fail_compilation/ice10016.d index 2f444f117138..545aa3589ffe 100644 --- a/compiler/test/fail_compilation/ice10016.d +++ b/compiler/test/fail_compilation/ice10016.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10016.d(33): Error: undefined identifier `unknownIdentifier` -fail_compilation/ice10016.d(47): Error: template instance `ice10016.RefCounted!(S)` error instantiating +fail_compilation/ice10016.d(37): Error: undefined identifier `unknownIdentifier` + int i = unknownIdentifier; + ^ +fail_compilation/ice10016.d(51): Error: template instance `ice10016.RefCounted!(S)` error instantiating + RefCounted!S _s; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10076.d b/compiler/test/fail_compilation/ice10076.d index 24f92d738e24..fd0969c2ed32 100644 --- a/compiler/test/fail_compilation/ice10076.d +++ b/compiler/test/fail_compilation/ice10076.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10076.d(18): Error: template instance `getMembersAndAttributesWhere!()` template `getMembersAndAttributesWhere` is not defined -fail_compilation/ice10076.d(23): Error: template instance `ice10076.getValidaterAttrs!string` error instantiating -fail_compilation/ice10076.d(13): instantiated from here: `validate!string` +fail_compilation/ice10076.d(24): Error: template instance `getMembersAndAttributesWhere!()` template `getMembersAndAttributesWhere` is not defined + alias getMembersAndAttributesWhere!().Elements getValidaterAttrs; + ^ +fail_compilation/ice10076.d(29): Error: template instance `ice10076.getValidaterAttrs!string` error instantiating + alias getValidaterAttrs!T memberAttrs; + ^ +fail_compilation/ice10076.d(19): instantiated from here: `validate!string` + validate(s); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10212.d b/compiler/test/fail_compilation/ice10212.d index 99fe1edf3e0e..22762cc163ce 100644 --- a/compiler/test/fail_compilation/ice10212.d +++ b/compiler/test/fail_compilation/ice10212.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10212.d(13): Error: expected return type of `int`, not `int function() pure nothrow @nogc @safe`: -fail_compilation/ice10212.d(13): Return type of `int` inferred here. +fail_compilation/ice10212.d(17): Error: expected return type of `int`, not `int function() pure nothrow @nogc @safe`: + return () => () { + ^ +fail_compilation/ice10212.d(17): Return type of `int` inferred here. + return () => () { + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10273.d b/compiler/test/fail_compilation/ice10273.d index 763fc06a0bbb..bcb5aa2be3fa 100644 --- a/compiler/test/fail_compilation/ice10273.d +++ b/compiler/test/fail_compilation/ice10273.d @@ -3,10 +3,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10273.d(14): Error: cannot implicitly convert expression `3.45` of type `double` to `int` -fail_compilation/ice10273.d(13): Error: CTFE failed because of previous errors in `Bug10273.init` -fail_compilation/ice10273.d(22): called from here: `bug10273()` -fail_compilation/ice10273.d(22): while evaluating: `static assert(bug10273())` +fail_compilation/ice10273.d(22): Error: cannot implicitly convert expression `3.45` of type `double` to `int` + int val = 3.45; + ^ +fail_compilation/ice10273.d(21): Error: CTFE failed because of previous errors in `Bug10273.init` +struct Bug10273 { +^ +fail_compilation/ice10273.d(30): called from here: `bug10273()` +static assert(bug10273()); + ^ +fail_compilation/ice10273.d(30): while evaluating: `static assert(bug10273())` +static assert(bug10273()); +^ --- */ diff --git a/compiler/test/fail_compilation/ice10283.d b/compiler/test/fail_compilation/ice10283.d index 489c45efe669..ac5f18ba2740 100644 --- a/compiler/test/fail_compilation/ice10283.d +++ b/compiler/test/fail_compilation/ice10283.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10283.d(14): Error: cannot implicitly convert expression `7` of type `int` to `string` +fail_compilation/ice10283.d(16): Error: cannot implicitly convert expression `7` of type `int` to `string` + string source = 7; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10341.d b/compiler/test/fail_compilation/ice10341.d index 56be4b38f1a1..090e61637f0d 100644 --- a/compiler/test/fail_compilation/ice10341.d +++ b/compiler/test/fail_compilation/ice10341.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10341.d(10): Error: case range not in `switch` statement +fail_compilation/ice10341.d(12): Error: case range not in `switch` statement + case 1: .. case 2: + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10382.d b/compiler/test/fail_compilation/ice10382.d index 618a02e8411a..2d1345812ada 100644 --- a/compiler/test/fail_compilation/ice10382.d +++ b/compiler/test/fail_compilation/ice10382.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10382.d(14): Error: can only catch class objects, not `int` +fail_compilation/ice10382.d(16): Error: can only catch class objects, not `int` + catch (int a) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10419.d b/compiler/test/fail_compilation/ice10419.d index fed8c6085698..7ec49e83ca88 100644 --- a/compiler/test/fail_compilation/ice10419.d +++ b/compiler/test/fail_compilation/ice10419.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10419.d(12): Error: cannot modify expression `arr().length` because it is not an lvalue +fail_compilation/ice10419.d(14): Error: cannot modify expression `arr().length` because it is not an lvalue + arr().length = 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10598.d b/compiler/test/fail_compilation/ice10598.d index ba6cdf73211e..888467cba95f 100644 --- a/compiler/test/fail_compilation/ice10598.d +++ b/compiler/test/fail_compilation/ice10598.d @@ -3,7 +3,11 @@ /* TEST_OUTPUT: --- fail_compilation/imports/ice10598a.d(5): Deprecation: module imports.ice10598b is not accessible here, perhaps add 'static import imports.ice10598b;' +alias TypeTuple!(__traits(getMember, imports.ice10598b, (__traits(allMembers, imports.ice10598b)[1])))[0] notImportedType; + ^ fail_compilation/imports/ice10598a.d(5): Deprecation: module imports.ice10598b is not accessible here, perhaps add 'static import imports.ice10598b;' +alias TypeTuple!(__traits(getMember, imports.ice10598b, (__traits(allMembers, imports.ice10598b)[1])))[0] notImportedType; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10599.d b/compiler/test/fail_compilation/ice10599.d index 378894db4683..e088d0200025 100644 --- a/compiler/test/fail_compilation/ice10599.d +++ b/compiler/test/fail_compilation/ice10599.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10599.d(13): Error: cannot implicitly convert expression `3.45` of type `double` to `int` -fail_compilation/ice10599.d(21): called from here: `bug10599()` -fail_compilation/ice10599.d(21): while evaluating: `static assert(bug10599())` +fail_compilation/ice10599.d(19): Error: cannot implicitly convert expression `3.45` of type `double` to `int` + int val = 3.45; + ^ +fail_compilation/ice10599.d(27): called from here: `bug10599()` +static assert(bug10599()); + ^ +fail_compilation/ice10599.d(27): while evaluating: `static assert(bug10599())` +static assert(bug10599()); +^ --- */ diff --git a/compiler/test/fail_compilation/ice10600.d b/compiler/test/fail_compilation/ice10600.d index a240045ce676..8be295555cb0 100644 --- a/compiler/test/fail_compilation/ice10600.d +++ b/compiler/test/fail_compilation/ice10600.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/ice10600a.d imports/ice10600b.d TEST_OUTPUT: --- -fail_compilation/ice10600.d(31): Error: template instance `to!(int, double)` does not match template declaration `to(T)` +fail_compilation/ice10600.d(33): Error: template instance `to!(int, double)` does not match template declaration `to(T)` + auto b = to!(int, double)(""); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10616.d b/compiler/test/fail_compilation/ice10616.d index 654e16fb2b98..d66679188760 100644 --- a/compiler/test/fail_compilation/ice10616.d +++ b/compiler/test/fail_compilation/ice10616.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10616.d(8): Error: class `ice10616.A` is forward referenced when looking for `B` +fail_compilation/ice10616.d(10): Error: class `ice10616.A` is forward referenced when looking for `B` +class A : A.B +^ --- */ diff --git a/compiler/test/fail_compilation/ice10624.d b/compiler/test/fail_compilation/ice10624.d index 3bc3c7d50285..b00c7e8e9f94 100644 --- a/compiler/test/fail_compilation/ice10624.d +++ b/compiler/test/fail_compilation/ice10624.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10624.d(38): Error: need member function `opCmp()` for struct `Tuple!(Msg)` to compare -fail_compilation/ice10624.d(48): Error: template instance `ice10624.Variant.handler!(Tuple!(Msg))` error instantiating -fail_compilation/ice10624.d(21): instantiated from here: `opAssign!(Tuple!(Msg))` +fail_compilation/ice10624.d(44): Error: need member function `opCmp()` for struct `Tuple!(Msg)` to compare + return *zis < *rhsPA ? -1 : 1; + ^ +fail_compilation/ice10624.d(54): Error: template instance `ice10624.Variant.handler!(Tuple!(Msg))` error instantiating + fptr = &handler!(T); + ^ +fail_compilation/ice10624.d(27): instantiated from here: `opAssign!(Tuple!(Msg))` + data = Tuple!Msg(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10651.d b/compiler/test/fail_compilation/ice10651.d index 8b6c7200bb72..48e71847832c 100644 --- a/compiler/test/fail_compilation/ice10651.d +++ b/compiler/test/fail_compilation/ice10651.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10651.d(13): Error: can only throw class objects derived from `Throwable`, not type `int*` -fail_compilation/ice10651.d(19): Deprecation: cannot throw object of qualified type `immutable(Exception)` -fail_compilation/ice10651.d(20): Deprecation: cannot throw object of qualified type `const(Dummy)` +fail_compilation/ice10651.d(19): Error: can only throw class objects derived from `Throwable`, not type `int*` + throw new T(); // ICE + ^ +fail_compilation/ice10651.d(25): Deprecation: cannot throw object of qualified type `immutable(Exception)` + if (c) throw c; + ^ +fail_compilation/ice10651.d(26): Deprecation: cannot throw object of qualified type `const(Dummy)` + throw new const Dummy([]); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10713.d b/compiler/test/fail_compilation/ice10713.d index e59a594da8a5..7235c15975e2 100644 --- a/compiler/test/fail_compilation/ice10713.d +++ b/compiler/test/fail_compilation/ice10713.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10713.d(11): Error: no property `nonExistingField` for type `ice10713.S` -fail_compilation/ice10713.d(9): struct `S` defined here +fail_compilation/ice10713.d(15): Error: no property `nonExistingField` for type `ice10713.S` + void f(typeof(this.nonExistingField) a) {} + ^ +fail_compilation/ice10713.d(13): struct `S` defined here +struct S +^ --- */ diff --git a/compiler/test/fail_compilation/ice10727a.d b/compiler/test/fail_compilation/ice10727a.d index 6d3b223db0e0..9cbf4cf6ac8e 100644 --- a/compiler/test/fail_compilation/ice10727a.d +++ b/compiler/test/fail_compilation/ice10727a.d @@ -4,8 +4,14 @@ TEST_OUTPUT: --- fail_compilation/imports/foo10727a.d(34): Error: undefined identifier `Frop` +class Foo : Frop {} // Frop is not defined +^ fail_compilation/imports/foo10727a.d(26): Error: template instance `foo10727a.CirBuff!(Foo)` error instantiating + CirBuff!T _bar; + ^ fail_compilation/imports/foo10727a.d(31): instantiated from here: `Bar!(Foo)` + Bar!Foo _foobar; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10727b.d b/compiler/test/fail_compilation/ice10727b.d index 4a59d5ce6b5c..60cbc9678b89 100644 --- a/compiler/test/fail_compilation/ice10727b.d +++ b/compiler/test/fail_compilation/ice10727b.d @@ -4,8 +4,14 @@ TEST_OUTPUT: --- fail_compilation/imports/foo10727b.d(25): Error: undefined identifier `Frop` +class Foo : Frop {} // Frop is not defined +^ fail_compilation/imports/foo10727b.d(17): Error: template instance `foo10727b.CirBuff!(Foo)` error instantiating + CirBuff!T _bar; + ^ fail_compilation/imports/foo10727b.d(22): instantiated from here: `Bar!(Foo)` + Bar!Foo _foobar; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10922.d b/compiler/test/fail_compilation/ice10922.d index 552a9824f32e..67d360af23ea 100644 --- a/compiler/test/fail_compilation/ice10922.d +++ b/compiler/test/fail_compilation/ice10922.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10922.d(11): Error: function `__lambda4` is not callable using argument types `()` -fail_compilation/ice10922.d(11): too few arguments, expected 1, got 0 -fail_compilation/ice10922.d(10): `ice10922.__lambda4(in uint n)` declared here +fail_compilation/ice10922.d(15): Error: function `__lambda4` is not callable using argument types `()` + enum self = __traits(parent, {}); + ^ +fail_compilation/ice10922.d(15): too few arguments, expected 1, got 0 +fail_compilation/ice10922.d(14): `ice10922.__lambda4(in uint n)` declared here +auto fib = (in uint n) pure nothrow { + ^ --- */ diff --git a/compiler/test/fail_compilation/ice10938.d b/compiler/test/fail_compilation/ice10938.d index 4d107c9e7b25..8b75a10d330e 100644 --- a/compiler/test/fail_compilation/ice10938.d +++ b/compiler/test/fail_compilation/ice10938.d @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10938.d(14): Error: no property `opts` for `this` of type `ice10938.C` -fail_compilation/ice10938.d(14): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message -fail_compilation/ice10938.d(10): class `C` defined here +fail_compilation/ice10938.d(18): Error: no property `opts` for `this` of type `ice10938.C` + this.opts["opts"] = 1; + ^ +fail_compilation/ice10938.d(18): potentially malformed `opDispatch`. Use an explicit instantiation to get a better error message +fail_compilation/ice10938.d(14): class `C` defined here +class C +^ --- */ diff --git a/compiler/test/fail_compilation/ice10949.d b/compiler/test/fail_compilation/ice10949.d index b39548ddb06c..216c1d834640 100644 --- a/compiler/test/fail_compilation/ice10949.d +++ b/compiler/test/fail_compilation/ice10949.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice10949.d(12): Error: using the result of a comma expression is not allowed -fail_compilation/ice10949.d(12): Error: array index 3 is out of bounds `[5, 5][0 .. 2]` -fail_compilation/ice10949.d(12): Error: array index 17 is out of bounds `[2, 3][0 .. 2]` -fail_compilation/ice10949.d(12): while evaluating: `static assert((((([5, 5][3] + global - global) * global / global % global >> global & global | global) ^ global) == 9 , [2, 3][17]) || [3, 3, 3][9] is 4 && [[1, 2, 3]][4].length)` +fail_compilation/ice10949.d(20): Error: using the result of a comma expression is not allowed +static assert((((((([5,5][3] + global - global)*global/global%global)>>global) &global|global)^global) == 9, [2,3][17]) || ([3,3,3][9] is 4) && ([[1,2,3]][4]).length); + ^ +fail_compilation/ice10949.d(20): Error: array index 3 is out of bounds `[5, 5][0 .. 2]` +static assert((((((([5,5][3] + global - global)*global/global%global)>>global) &global|global)^global) == 9, [2,3][17]) || ([3,3,3][9] is 4) && ([[1,2,3]][4]).length); + ^ +fail_compilation/ice10949.d(20): Error: array index 17 is out of bounds `[2, 3][0 .. 2]` +static assert((((((([5,5][3] + global - global)*global/global%global)>>global) &global|global)^global) == 9, [2,3][17]) || ([3,3,3][9] is 4) && ([[1,2,3]][4]).length); + ^ +fail_compilation/ice10949.d(20): while evaluating: `static assert((((([5, 5][3] + global - global) * global / global % global >> global & global | global) ^ global) == 9 , [2, 3][17]) || [3, 3, 3][9] is 4 && [[1, 2, 3]][4].length)` +static assert((((((([5,5][3] + global - global)*global/global%global)>>global) &global|global)^global) == 9, [2,3][17]) || ([3,3,3][9] is 4) && ([[1,2,3]][4]).length); +^ --- */ diff --git a/compiler/test/fail_compilation/ice11086.d b/compiler/test/fail_compilation/ice11086.d index fee958ddcbff..cc25bf7fd307 100644 --- a/compiler/test/fail_compilation/ice11086.d +++ b/compiler/test/fail_compilation/ice11086.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11086.d(10): Error: template instance `foo!A` template `foo` is not defined +fail_compilation/ice11086.d(12): Error: template instance `foo!A` template `foo` is not defined + foo!(A) l1,l2; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11136.d b/compiler/test/fail_compilation/ice11136.d index 84defb938e78..303d9b653d85 100644 --- a/compiler/test/fail_compilation/ice11136.d +++ b/compiler/test/fail_compilation/ice11136.d @@ -3,6 +3,8 @@ TEST_OUTPUT: --- fail_compilation/imports/bar11136.d(1): Error: package name 'ice11136' conflicts with usage as a module name in file fail_compilation/ice11136.d +module ice11136.bar11136; +^ --- */ diff --git a/compiler/test/fail_compilation/ice11153.d b/compiler/test/fail_compilation/ice11153.d index 6a1b89ba776b..2b7ec7bbd1f4 100644 --- a/compiler/test/fail_compilation/ice11153.d +++ b/compiler/test/fail_compilation/ice11153.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11153.d(11): Error: function declaration without return type. (Note that constructors are always named `this`) -fail_compilation/ice11153.d(11): Error: no identifier for declarator `foo()` +fail_compilation/ice11153.d(15): Error: function declaration without return type. (Note that constructors are always named `this`) + foo(T)() {} + ^ +fail_compilation/ice11153.d(15): Error: no identifier for declarator `foo()` + foo(T)() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11404.d b/compiler/test/fail_compilation/ice11404.d index f445903179ff..92a5bae2bf25 100644 --- a/compiler/test/fail_compilation/ice11404.d +++ b/compiler/test/fail_compilation/ice11404.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11404.d(10): Error: cannot have associative array of `(int, int)` +fail_compilation/ice11404.d(12): Error: cannot have associative array of `(int, int)` + TypeTuple!(int, int)[string] my_map; + ^ --- */ template TypeTuple(TL...) { alias TL TypeTuple; } diff --git a/compiler/test/fail_compilation/ice1144.d b/compiler/test/fail_compilation/ice1144.d index cd6486436ea7..9ae72fe27487 100644 --- a/compiler/test/fail_compilation/ice1144.d +++ b/compiler/test/fail_compilation/ice1144.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice1144.d(14): Error: undefined identifier `a` -fail_compilation/ice1144.d(23): Error: template instance `ice1144.testHelper!("hello", "world")` error instantiating +fail_compilation/ice1144.d(18): Error: undefined identifier `a` + foreach (t; a) + ^ +fail_compilation/ice1144.d(27): Error: template instance `ice1144.testHelper!("hello", "world")` error instantiating + mixin(testHelper!("hello", "world")()); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11472.d b/compiler/test/fail_compilation/ice11472.d index 4e12490e35f0..55fb2d1f6218 100644 --- a/compiler/test/fail_compilation/ice11472.d +++ b/compiler/test/fail_compilation/ice11472.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11472.d(13): Error: template instance `fun2!fun` `fun2` is not a template declaration, it is a function -fail_compilation/ice11472.d(18): Error: template instance `ice11472.fun1!(fun3)` error instantiating +fail_compilation/ice11472.d(17): Error: template instance `fun2!fun` `fun2` is not a template declaration, it is a function + "a".fun2!fun; + ^ +fail_compilation/ice11472.d(22): Error: template instance `ice11472.fun1!(fun3)` error instantiating + fun1; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11513a.d b/compiler/test/fail_compilation/ice11513a.d index 87ce0e13be47..62d0bea0596d 100644 --- a/compiler/test/fail_compilation/ice11513a.d +++ b/compiler/test/fail_compilation/ice11513a.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/ice11513x.d TEST_OUTPUT: --- fail_compilation/imports/ice11513x.d(1): Error: package name 'ice11513a' conflicts with usage as a module name in file fail_compilation/ice11513a.d +module ice11513a.imports; +^ --- */ diff --git a/compiler/test/fail_compilation/ice11513b.d b/compiler/test/fail_compilation/ice11513b.d index 4f933f486f5d..a816b0ad46fa 100644 --- a/compiler/test/fail_compilation/ice11513b.d +++ b/compiler/test/fail_compilation/ice11513b.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/ice11513y.d TEST_OUTPUT: --- fail_compilation/imports/ice11513y.d(1): Error: package name 'ice11513b' conflicts with usage as a module name in file fail_compilation/ice11513b.d +module ice11513b.imports.ice11513y; +^ --- */ diff --git a/compiler/test/fail_compilation/ice11518.d b/compiler/test/fail_compilation/ice11518.d index 4e4f6170a611..1f4b97200655 100644 --- a/compiler/test/fail_compilation/ice11518.d +++ b/compiler/test/fail_compilation/ice11518.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11518.d(17): Error: class `ice11518.B` matches more than one template declaration: -fail_compilation/ice11518.d(12): `B(T : A!T)` +fail_compilation/ice11518.d(23): Error: class `ice11518.B` matches more than one template declaration: + new B!(A!void); + ^ +fail_compilation/ice11518.d(18): `B(T : A!T)` and: -fail_compilation/ice11518.d(13): `B(T : A!T)` +class B(T : A!T) {} +^ +fail_compilation/ice11518.d(19): `B(T : A!T)` +class B(T : A!T) {} +^ --- */ diff --git a/compiler/test/fail_compilation/ice11552.d b/compiler/test/fail_compilation/ice11552.d index 28d8be1007b9..37e8d85eb140 100644 --- a/compiler/test/fail_compilation/ice11552.d +++ b/compiler/test/fail_compilation/ice11552.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: --- -fail_compilation/ice11552.d(13): Error: function `ice11552.test11552` label `label` is undefined -fail_compilation/ice11552.d(16): called from here: `test11552()` -fail_compilation/ice11552.d(16): while evaluating: `static assert(test11552())` +fail_compilation/ice11552.d(19): Error: function `ice11552.test11552` label `label` is undefined + goto label; + ^ +fail_compilation/ice11552.d(22): called from here: `test11552()` +static assert(test11552()); + ^ +fail_compilation/ice11552.d(22): while evaluating: `static assert(test11552())` +static assert(test11552()); +^ --- */ diff --git a/compiler/test/fail_compilation/ice11553.d b/compiler/test/fail_compilation/ice11553.d index 7497aad6e6a3..c970faa124f0 100644 --- a/compiler/test/fail_compilation/ice11553.d +++ b/compiler/test/fail_compilation/ice11553.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11553.d(22): Error: recursive template expansion while looking for `A!().A()` -fail_compilation/ice11553.d(22): Error: expression `A()` of type `void` does not have a boolean value +fail_compilation/ice11553.d(26): Error: recursive template expansion while looking for `A!().A()` +static if (A!B) {} + ^ +fail_compilation/ice11553.d(26): Error: expression `A()` of type `void` does not have a boolean value +static if (A!B) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11626.d b/compiler/test/fail_compilation/ice11626.d index 6d347bcdd0e1..0b81e847e6c3 100644 --- a/compiler/test/fail_compilation/ice11626.d +++ b/compiler/test/fail_compilation/ice11626.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11626.d(8): Error: undefined identifier `Bar` +fail_compilation/ice11626.d(10): Error: undefined identifier `Bar` +void foo(const ref Bar) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11726.d b/compiler/test/fail_compilation/ice11726.d index e9d98c5f095c..58cdaebe2e0f 100644 --- a/compiler/test/fail_compilation/ice11726.d +++ b/compiler/test/fail_compilation/ice11726.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11726.d(16): Error: undefined identifier `x` +fail_compilation/ice11726.d(18): Error: undefined identifier `x` + S().reserve(x.foo()); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11793.d b/compiler/test/fail_compilation/ice11793.d index 2d997caac4d0..290615b7fada 100644 --- a/compiler/test/fail_compilation/ice11793.d +++ b/compiler/test/fail_compilation/ice11793.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11793.d(11): Error: circular reference to `ice11793.Outer.outer` +fail_compilation/ice11793.d(13): Error: circular reference to `ice11793.Outer.outer` + Outer outer = new Outer(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11822.d b/compiler/test/fail_compilation/ice11822.d index 830af212cb7a..24066ce5ef0e 100644 --- a/compiler/test/fail_compilation/ice11822.d +++ b/compiler/test/fail_compilation/ice11822.d @@ -4,10 +4,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11822.d(33): Deprecation: function `ice11822.d` is deprecated -fail_compilation/ice11822.d(16): instantiated from here: `__lambda2!int` -fail_compilation/ice11822.d(22): instantiated from here: `S!(__lambda2)` -fail_compilation/ice11822.d(33): instantiated from here: `g!((n) => d(i))` +fail_compilation/ice11822.d(41): Deprecation: function `ice11822.d` is deprecated + return g!(n => d(i))(); + ^ +fail_compilation/ice11822.d(24): instantiated from here: `__lambda2!int` + this(int) { pred(1); } + ^ +fail_compilation/ice11822.d(30): instantiated from here: `S!(__lambda2)` + return S!pred(3); + ^ +fail_compilation/ice11822.d(41): instantiated from here: `g!((n) => d(i))` + return g!(n => d(i))(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11849b.d b/compiler/test/fail_compilation/ice11849b.d index f879496a9717..575523114ac0 100644 --- a/compiler/test/fail_compilation/ice11849b.d +++ b/compiler/test/fail_compilation/ice11849b.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11849b.d(11): Error: circular reference to enum base type `DWORD1` -fail_compilation/ice11849b.d(11): Error: `DWORD1` is used as a type -fail_compilation/ice11849b.d(16): Error: circular reference to enum base type `typeof(DWORD2)` +fail_compilation/ice11849b.d(17): Error: circular reference to enum base type `DWORD1` +enum : DWORD1 +^ +fail_compilation/ice11849b.d(17): Error: `DWORD1` is used as a type +enum : DWORD1 +^ +fail_compilation/ice11849b.d(22): Error: circular reference to enum base type `typeof(DWORD2)` +enum : typeof(DWORD2) +^ --- */ enum REG_DWORD = 1; diff --git a/compiler/test/fail_compilation/ice11850.d b/compiler/test/fail_compilation/ice11850.d index d33549a27f2b..1a166a0c80e6 100644 --- a/compiler/test/fail_compilation/ice11850.d +++ b/compiler/test/fail_compilation/ice11850.d @@ -2,9 +2,15 @@ EXTRA_FILES: imports/a11850.d TEST_OUTPUT: --- -fail_compilation/ice11850.d(15): Error: incompatible types for `(a) < ([0])`: `uint[]` and `int[]` +fail_compilation/ice11850.d(21): Error: incompatible types for `(a) < ([0])`: `uint[]` and `int[]` + filter!(a => a < [0])([[0u]]); + ^ fail_compilation/imports/a11850.d(9): instantiated from here: `FilterResult!(__lambda1, uint[][])` -fail_compilation/ice11850.d(15): instantiated from here: `filter!(uint[][])` + return FilterResult!(pred, Range)(rs); + ^ +fail_compilation/ice11850.d(21): instantiated from here: `filter!(uint[][])` + filter!(a => a < [0])([[0u]]); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11856_0.d b/compiler/test/fail_compilation/ice11856_0.d index 1e51a06ef733..e140fd23ff4c 100644 --- a/compiler/test/fail_compilation/ice11856_0.d +++ b/compiler/test/fail_compilation/ice11856_0.d @@ -1,12 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11856_0.d(19): Error: none of the overloads of template `ice11856_0.f` are callable using argument types `!()(int)` -fail_compilation/ice11856_0.d(13): Candidates are: `f(T)(T t)` -fail_compilation/ice11856_0.d(16): `f(T)(T t)` +fail_compilation/ice11856_0.d(25): Error: none of the overloads of template `ice11856_0.f` are callable using argument types `!()(int)` +enum x=f(2); + ^ +fail_compilation/ice11856_0.d(19): Candidates are: `f(T)(T t)` +int f(T)(T t) if(!__traits(compiles,.f!T)) { + ^ +fail_compilation/ice11856_0.d(22): `f(T)(T t)` with `T = int` must satisfy the following constraint: ` !__traits(compiles, .f!T)` +int f(T)(T t) if(!__traits(compiles,.f!T)) { + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11856_1.d b/compiler/test/fail_compilation/ice11856_1.d index 476c6559c828..1567d452f7a1 100644 --- a/compiler/test/fail_compilation/ice11856_1.d +++ b/compiler/test/fail_compilation/ice11856_1.d @@ -1,13 +1,19 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice11856_1.d(18): Error: no property `g` for `A()` of type `A` -fail_compilation/ice11856_1.d(18): the following error occured while looking for a UFCS match -fail_compilation/ice11856_1.d(18): Error: template `g` is not callable using argument types `!()(A)` -fail_compilation/ice11856_1.d(16): Candidate is: `g(T)(T x)` +fail_compilation/ice11856_1.d(24): Error: no property `g` for `A()` of type `A` +void main() { A().g(); } + ^ +fail_compilation/ice11856_1.d(24): the following error occured while looking for a UFCS match +fail_compilation/ice11856_1.d(24): Error: template `g` is not callable using argument types `!()(A)` +void main() { A().g(); } + ^ +fail_compilation/ice11856_1.d(22): Candidate is: `g(T)(T x)` with `T = A` must satisfy the following constraint: ` is(typeof(x.f()))` +void g(T)(T x) if (is(typeof(x.f()))) {} + ^ ---- */ struct A {} diff --git a/compiler/test/fail_compilation/ice11919.d b/compiler/test/fail_compilation/ice11919.d index e6b4f7088464..8be3fe4ba6eb 100644 --- a/compiler/test/fail_compilation/ice11919.d +++ b/compiler/test/fail_compilation/ice11919.d @@ -2,10 +2,18 @@ EXTRA_FILES: imports/a11919.d TEST_OUTPUT: --- -fail_compilation/ice11919.d(18): Error: initializer must be an expression, not `foo` +fail_compilation/ice11919.d(26): Error: initializer must be an expression, not `foo` + @foo bool _foo; + ^ fail_compilation/imports/a11919.d(4): Error: template instance `a11919.doBar!(Foo).doBar.zoo!(t)` error instantiating + if (zoo!t.length == 0) {} + ^ fail_compilation/imports/a11919.d(11): instantiated from here: `doBar!(Foo)` -fail_compilation/ice11919.d(26): instantiated from here: `doBar!(Bar)` + doBar(b); + ^ +fail_compilation/ice11919.d(34): instantiated from here: `doBar!(Bar)` + bar.doBar; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11922.d b/compiler/test/fail_compilation/ice11922.d index bca0bbedeb02..cc8081e045d0 100644 --- a/compiler/test/fail_compilation/ice11922.d +++ b/compiler/test/fail_compilation/ice11922.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11922.d(11): Error: undefined identifier `a` -fail_compilation/ice11922.d(17): Error: template instance `ice11922.S.f!int` error instantiating +fail_compilation/ice11922.d(15): Error: undefined identifier `a` + auto f(B)(B) { return a; } + ^ +fail_compilation/ice11922.d(21): Error: template instance `ice11922.S.f!int` error instantiating + s.f(5); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11925.d b/compiler/test/fail_compilation/ice11925.d index 2627f2b276c4..82fd23b70eaf 100644 --- a/compiler/test/fail_compilation/ice11925.d +++ b/compiler/test/fail_compilation/ice11925.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11925.d(23): Error: cannot `goto` into `try` block -fail_compilation/ice11925.d(31): Error: cannot `goto` into `try` block +fail_compilation/ice11925.d(27): Error: cannot `goto` into `try` block + goto L1; + ^ +fail_compilation/ice11925.d(35): Error: cannot `goto` into `try` block + goto L1; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11926.d b/compiler/test/fail_compilation/ice11926.d index 97ac4336502a..6acab97a8435 100644 --- a/compiler/test/fail_compilation/ice11926.d +++ b/compiler/test/fail_compilation/ice11926.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11926.d(11): Error: no identifier for declarator `const(a)` -fail_compilation/ice11926.d(12): Error: no identifier for declarator `const(b)` +fail_compilation/ice11926.d(15): Error: no identifier for declarator `const(a)` + const a = 1, + ^ +fail_compilation/ice11926.d(16): Error: no identifier for declarator `const(b)` + const b = 2 + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11944.d b/compiler/test/fail_compilation/ice11944.d index 9b0326bf9368..e4aac547eb44 100644 --- a/compiler/test/fail_compilation/ice11944.d +++ b/compiler/test/fail_compilation/ice11944.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11944.d(12): Error: template instance `doCommand!(func)` does not match template declaration `doCommand(f, T)(f, T arg)` +fail_compilation/ice11944.d(14): Error: template instance `doCommand!(func)` does not match template declaration `doCommand(f, T)(f, T arg)` +auto var = &doCommand!func; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice11963.d b/compiler/test/fail_compilation/ice11963.d index 39eb120827a3..9ead0240bff4 100644 --- a/compiler/test/fail_compilation/ice11963.d +++ b/compiler/test/fail_compilation/ice11963.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11963.d(10): Error: unexpected `(` in declarator -fail_compilation/ice11963.d(10): Error: identifier expected for template type parameter -fail_compilation/ice11963.d(10): Error: no identifier for declarator `A` -fail_compilation/ice11963.d(10): Error: declaration expected, not `""` +fail_compilation/ice11963.d(18): Error: unexpected `(` in declarator +A("")= + ^ +fail_compilation/ice11963.d(18): Error: identifier expected for template type parameter +A("")= + ^ +fail_compilation/ice11963.d(18): Error: no identifier for declarator `A` +A("")= + ^ +fail_compilation/ice11963.d(18): Error: declaration expected, not `""` +A("")= + ^ --- */ A("")= diff --git a/compiler/test/fail_compilation/ice11965.d b/compiler/test/fail_compilation/ice11965.d index 9e6da3bbf844..c66016b91515 100644 --- a/compiler/test/fail_compilation/ice11965.d +++ b/compiler/test/fail_compilation/ice11965.d @@ -1,11 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11965.d(16): Error: no identifier for declarator `b*` -fail_compilation/ice11965.d(16): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/ice11965.d(15): unmatched `{` -fail_compilation/ice11965.d(16): Error: found `End of File` when expecting `]` -fail_compilation/ice11965.d(16): Error: no identifier for declarator `u[() +fail_compilation/ice11965.d(18): Error: no identifier for declarator `b*` +fail_compilation/ice11965.d(18): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/ice11965.d(17): unmatched `{` +u[{b*A, + ^ +fail_compilation/ice11965.d(18): Error: found `End of File` when expecting `]` +fail_compilation/ice11965.d(18): Error: no identifier for declarator `u[() { b* A; } diff --git a/compiler/test/fail_compilation/ice11967.d b/compiler/test/fail_compilation/ice11967.d index a3bda63f8fba..b46898288ee7 100644 --- a/compiler/test/fail_compilation/ice11967.d +++ b/compiler/test/fail_compilation/ice11967.d @@ -1,12 +1,20 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11967.d(12): Error: use `@(attributes)` instead of `[attributes]` -fail_compilation/ice11967.d(12): Error: expression expected, not `%` -fail_compilation/ice11967.d(12): Error: found `g` when expecting `)` -fail_compilation/ice11967.d(12): Error: found `{` when expecting `]` -fail_compilation/ice11967.d(13): Error: `@identifier` or `@(ArgumentList)` expected, not `@End of File` -fail_compilation/ice11967.d(13): Error: declaration expected following attribute, not end of file +fail_compilation/ice11967.d(20): Error: use `@(attributes)` instead of `[attributes]` +[F(%g{@ +^ +fail_compilation/ice11967.d(20): Error: expression expected, not `%` +[F(%g{@ + ^ +fail_compilation/ice11967.d(20): Error: found `g` when expecting `)` +[F(%g{@ + ^ +fail_compilation/ice11967.d(20): Error: found `{` when expecting `]` +[F(%g{@ + ^ +fail_compilation/ice11967.d(21): Error: `@identifier` or `@(ArgumentList)` expected, not `@End of File` +fail_compilation/ice11967.d(21): Error: declaration expected following attribute, not end of file --- */ [F(%g{@ diff --git a/compiler/test/fail_compilation/ice11968.d b/compiler/test/fail_compilation/ice11968.d index 1d50b66e0086..e9f5171520b0 100644 --- a/compiler/test/fail_compilation/ice11968.d +++ b/compiler/test/fail_compilation/ice11968.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice11968.d(9): Error: the `delete` keyword is obsolete -fail_compilation/ice11968.d(9): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/ice11968.d(11): Error: the `delete` keyword is obsolete +void main() { delete __FILE__ ; } + ^ +fail_compilation/ice11968.d(11): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead ---- */ diff --git a/compiler/test/fail_compilation/ice11969.d b/compiler/test/fail_compilation/ice11969.d index 918ea4ada857..c615cb697c69 100644 --- a/compiler/test/fail_compilation/ice11969.d +++ b/compiler/test/fail_compilation/ice11969.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11969.d(9): Error: undefined identifier `index` -fail_compilation/ice11969.d(10): Error: undefined identifier `cond` -fail_compilation/ice11969.d(11): Error: undefined identifier `msg` +fail_compilation/ice11969.d(15): Error: undefined identifier `index` +void test1() { mixin ([index]); } + ^ +fail_compilation/ice11969.d(16): Error: undefined identifier `cond` +void test2() { mixin (assert(cond)); } + ^ +fail_compilation/ice11969.d(17): Error: undefined identifier `msg` +void test3() { mixin (assert(0, msg)); } + ^ --- */ void test1() { mixin ([index]); } diff --git a/compiler/test/fail_compilation/ice11974.d b/compiler/test/fail_compilation/ice11974.d index 3bf5a7042494..a8eccac80b10 100644 --- a/compiler/test/fail_compilation/ice11974.d +++ b/compiler/test/fail_compilation/ice11974.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11974.d(7): Error: cannot modify constant `0` +fail_compilation/ice11974.d(9): Error: cannot modify constant `0` +void main() { 0 = __LINE__ ^^ [ 0 ] ; } + ^ --- */ void main() { 0 = __LINE__ ^^ [ 0 ] ; } diff --git a/compiler/test/fail_compilation/ice11982.d b/compiler/test/fail_compilation/ice11982.d index f500700f674b..2aefe30db2a2 100644 --- a/compiler/test/fail_compilation/ice11982.d +++ b/compiler/test/fail_compilation/ice11982.d @@ -1,22 +1,34 @@ /* TEST_OUTPUT: --- -fail_compilation/ice11982.d(22): Error: basic type expected, not `scope` -fail_compilation/ice11982.d(22): Error: found `scope` when expecting `;` following expression -fail_compilation/ice11982.d(22): expression: `new _error_` -fail_compilation/ice11982.d(22): Error: basic type expected, not `}` -fail_compilation/ice11982.d(22): Error: missing `{ ... }` for function literal -fail_compilation/ice11982.d(22): Error: C style cast illegal, use `cast(funk)function _error_() +fail_compilation/ice11982.d(34): Error: basic type expected, not `scope` +void main() { new scope ( funk ) function } + ^ +fail_compilation/ice11982.d(34): Error: found `scope` when expecting `;` following expression +void main() { new scope ( funk ) function } + ^ +fail_compilation/ice11982.d(34): expression: `new _error_` +void main() { new scope ( funk ) function } + ^ +fail_compilation/ice11982.d(34): Error: basic type expected, not `}` +fail_compilation/ice11982.d(34): Error: missing `{ ... }` for function literal +fail_compilation/ice11982.d(34): Error: C style cast illegal, use `cast(funk)function _error_() { } ` -fail_compilation/ice11982.d(22): Error: found `}` when expecting `;` following expression -fail_compilation/ice11982.d(22): expression: `cast(funk)function _error_() +void main() { new scope ( funk ) function } + ^ +fail_compilation/ice11982.d(34): Error: found `}` when expecting `;` following expression +fail_compilation/ice11982.d(34): expression: `cast(funk)function _error_() { } ` -fail_compilation/ice11982.d(23): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/ice11982.d(22): unmatched `{` +void main() { new scope ( funk ) function } + ^ +fail_compilation/ice11982.d(35): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/ice11982.d(34): unmatched `{` +void main() { new scope ( funk ) function } + ^ --- */ void main() { new scope ( funk ) function } diff --git a/compiler/test/fail_compilation/ice12040.d b/compiler/test/fail_compilation/ice12040.d index e43079a33163..ef0871ed2429 100644 --- a/compiler/test/fail_compilation/ice12040.d +++ b/compiler/test/fail_compilation/ice12040.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12040.d(8): Error: circular reference to `ice12040.lol` +fail_compilation/ice12040.d(10): Error: circular reference to `ice12040.lol` +bool[lol.length] lol; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12158.d b/compiler/test/fail_compilation/ice12158.d index 50a0b609b7af..d2153bc2198b 100644 --- a/compiler/test/fail_compilation/ice12158.d +++ b/compiler/test/fail_compilation/ice12158.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12158.d(7): Error: module `object` import `nonexisting` not found +fail_compilation/ice12158.d(9): Error: module `object` import `nonexisting` not found +import object : nonexisting; + ^ --- */ import object : nonexisting; diff --git a/compiler/test/fail_compilation/ice12174.d b/compiler/test/fail_compilation/ice12174.d index dbe386e97e99..4523ceac4169 100644 --- a/compiler/test/fail_compilation/ice12174.d +++ b/compiler/test/fail_compilation/ice12174.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12174.d(12): Error: no property `sum` for `[1, 2, 3]` of type `int[]` -fail_compilation/ice12174.d(20): Error: CTFE failed because of previous errors in `this` -fail_compilation/ice12174.d(13): called from here: `filter([1, 2, 3])` +fail_compilation/ice12174.d(18): Error: no property `sum` for `[1, 2, 3]` of type `int[]` + enum foo3 = (int n) => [1,2,3].sum; + ^ +fail_compilation/ice12174.d(26): Error: CTFE failed because of previous errors in `this` + return FilterResult!(pred, Range)(rs); + ^ +fail_compilation/ice12174.d(19): called from here: `filter([1, 2, 3])` + enum bar3 = [1,2,3].filter!(n => n % foo3(n) == 0); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12235.d b/compiler/test/fail_compilation/ice12235.d index 8f2fefd099ef..3708d289b785 100644 --- a/compiler/test/fail_compilation/ice12235.d +++ b/compiler/test/fail_compilation/ice12235.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12235.d(14): Error: forward reference to inferred return type of function `__lambda1` -fail_compilation/ice12235.d(15): Error: forward reference to inferred return type of function `__lambda1` -fail_compilation/ice12235.d(15): while evaluating `pragma(msg, __lambda1.mangleof)` +fail_compilation/ice12235.d(20): Error: forward reference to inferred return type of function `__lambda1` + enum s = __traits(parent, x).mangleof; + ^ +fail_compilation/ice12235.d(21): Error: forward reference to inferred return type of function `__lambda1` + pragma(msg, __traits(parent, x).mangleof); + ^ +fail_compilation/ice12235.d(21): while evaluating `pragma(msg, __lambda1.mangleof)` + pragma(msg, __traits(parent, x).mangleof); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12350.d b/compiler/test/fail_compilation/ice12350.d index 73ed39dd4b95..94ba81ab367f 100644 --- a/compiler/test/fail_compilation/ice12350.d +++ b/compiler/test/fail_compilation/ice12350.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12350.d(15): Error: type `MyUDC` has no value -fail_compilation/ice12350.d(30): Error: template instance `ice12350.testAttrs!(MyStruct)` error instantiating +fail_compilation/ice12350.d(19): Error: type `MyUDC` has no value + @MyUDC int b; + ^ +fail_compilation/ice12350.d(34): Error: template instance `ice12350.testAttrs!(MyStruct)` error instantiating + testAttrs(s); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12362.d b/compiler/test/fail_compilation/ice12362.d index d0853b9b20d4..6f0f2697939e 100644 --- a/compiler/test/fail_compilation/ice12362.d +++ b/compiler/test/fail_compilation/ice12362.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12362.d(12): Error: initializer must be an expression, not `foo` +fail_compilation/ice12362.d(14): Error: initializer must be an expression, not `foo` + enum bar = foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12397.d b/compiler/test/fail_compilation/ice12397.d index 015e02300920..c8f53b089472 100644 --- a/compiler/test/fail_compilation/ice12397.d +++ b/compiler/test/fail_compilation/ice12397.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12397.d(12): Error: undefined identifier `tokenLookup` +fail_compilation/ice12397.d(14): Error: undefined identifier `tokenLookup` + max = tokenLookup.length + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12501.d b/compiler/test/fail_compilation/ice12501.d index c1b1e38a965f..2b950abcc59b 100644 --- a/compiler/test/fail_compilation/ice12501.d +++ b/compiler/test/fail_compilation/ice12501.d @@ -1,13 +1,23 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice12501.d(33): Error: function `foo` is not callable using argument types `(int, int)` -fail_compilation/ice12501.d(33): expected 1 argument(s), not 2 -fail_compilation/ice12501.d(40): `ice12501.foo(int value)` declared here -fail_compilation/ice12501.d(33): Error: function `foo` is not callable using argument types `(int, int)` -fail_compilation/ice12501.d(33): expected 1 argument(s), not 2 -fail_compilation/ice12501.d(40): `ice12501.foo(int value)` declared here -fail_compilation/ice12501.d(47): Error: template instance `ice12501.reduce!(foo, foo).reduce!(Tuple!(int, int), int[])` error instantiating +fail_compilation/ice12501.d(43): Error: function `foo` is not callable using argument types `(int, int)` + result[i] = fun[i](result[i], r[0]); + ^ +fail_compilation/ice12501.d(43): expected 1 argument(s), not 2 +fail_compilation/ice12501.d(50): `ice12501.foo(int value)` declared here +int foo(int value) + ^ +fail_compilation/ice12501.d(43): Error: function `foo` is not callable using argument types `(int, int)` + result[i] = fun[i](result[i], r[0]); + ^ +fail_compilation/ice12501.d(43): expected 1 argument(s), not 2 +fail_compilation/ice12501.d(50): `ice12501.foo(int value)` declared here +int foo(int value) + ^ +fail_compilation/ice12501.d(57): Error: template instance `ice12501.reduce!(foo, foo).reduce!(Tuple!(int, int), int[])` error instantiating + reduce!(foo, foo)(tuple(0, 0), [ 1 ]); + ^ ---- */ diff --git a/compiler/test/fail_compilation/ice12534.d b/compiler/test/fail_compilation/ice12534.d index da9c021f1384..b0c4293b38e1 100644 --- a/compiler/test/fail_compilation/ice12534.d +++ b/compiler/test/fail_compilation/ice12534.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12534.d(14): Error: static assert: `is(exprs[0 .. 0])` is false +fail_compilation/ice12534.d(16): Error: static assert: `is(exprs[0 .. 0])` is false + static assert(is(exprs[0..0])); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12539.d b/compiler/test/fail_compilation/ice12539.d index ad68f23ec25d..1d10b90d7691 100644 --- a/compiler/test/fail_compilation/ice12539.d +++ b/compiler/test/fail_compilation/ice12539.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12539.d(15): Error: sequence index `[0]` is outside bounds `[0 .. 0]` +fail_compilation/ice12539.d(17): Error: sequence index `[0]` is outside bounds `[0 .. 0]` + auto a = map[Foo[0]]; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12574.d b/compiler/test/fail_compilation/ice12574.d index ecb0fd69a05b..9ac7677bba60 100644 --- a/compiler/test/fail_compilation/ice12574.d +++ b/compiler/test/fail_compilation/ice12574.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12574.d(40): Error: sequence index `2` out of bounds `[0 .. 2]` -fail_compilation/ice12574.d(53): Error: template instance `ice12574.reduce!("a", "a").reduce!(Tuple!(int, int, int))` error instantiating +fail_compilation/ice12574.d(44): Error: sequence index `2` out of bounds `[0 .. 2]` + result[i] = binaryFun!(fun[i])(1, 1); // here + ^ +fail_compilation/ice12574.d(57): Error: template instance `ice12574.reduce!("a", "a").reduce!(Tuple!(int, int, int))` error instantiating + reduce!("a", "a")(tuple(1, 1, 1)); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12581.d b/compiler/test/fail_compilation/ice12581.d index d2b0ba3398df..6b2bee3a7e22 100644 --- a/compiler/test/fail_compilation/ice12581.d +++ b/compiler/test/fail_compilation/ice12581.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12581.d(21): Error: undefined identifier `undef` +fail_compilation/ice12581.d(23): Error: undefined identifier `undef` + x[] = (undef = 1); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12673.d b/compiler/test/fail_compilation/ice12673.d index fb49e8e648c1..cf5b75d2ca9c 100644 --- a/compiler/test/fail_compilation/ice12673.d +++ b/compiler/test/fail_compilation/ice12673.d @@ -1,11 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12673.d(13): Error: static assert: `__traits(compiles, () pure nothrow @nogc @safe +fail_compilation/ice12673.d(15): Error: static assert: `__traits(compiles, () pure nothrow @nogc @safe { __error__ } )` is false + static assert(__traits(compiles, { abcd(); })); + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/ice12727.d b/compiler/test/fail_compilation/ice12727.d index 13eb8e09ed86..f6d5524153f8 100644 --- a/compiler/test/fail_compilation/ice12727.d +++ b/compiler/test/fail_compilation/ice12727.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice12727.d(16): Error: template instance `IndexTuple!(1, 0)` recursive template expansion -fail_compilation/ice12727.d(16): Error: alias `ice12727.IndexTuple!(1, 0).IndexTuple` recursive alias declaration -fail_compilation/ice12727.d(23): Error: template instance `ice12727.IndexTuple!(1, 0)` error instantiating -fail_compilation/ice12727.d(27): instantiated from here: `Matrix!(float, 3)` -fail_compilation/ice12727.d(28): instantiated from here: `Vector!(float, 3)` +fail_compilation/ice12727.d(26): Error: template instance `IndexTuple!(1, 0)` recursive template expansion + alias IndexTuple = IndexTuple!(e); + ^ +fail_compilation/ice12727.d(26): Error: alias `ice12727.IndexTuple!(1, 0).IndexTuple` recursive alias declaration + alias IndexTuple = IndexTuple!(e); + ^ +fail_compilation/ice12727.d(33): Error: template instance `ice12727.IndexTuple!(1, 0)` error instantiating + foreach (j; IndexTuple!(1)) {} + ^ +fail_compilation/ice12727.d(37): instantiated from here: `Matrix!(float, 3)` +alias Vector(T, int M) = Matrix!(T, M); + ^ +fail_compilation/ice12727.d(38): instantiated from here: `Vector!(float, 3)` +alias Vector3 = Vector!(float, 3); + ^ ---- */ template IndexTuple(int e, int s = 0, T...) diff --git a/compiler/test/fail_compilation/ice12827.d b/compiler/test/fail_compilation/ice12827.d index 20974e4a184a..3f09d5dca14d 100644 --- a/compiler/test/fail_compilation/ice12827.d +++ b/compiler/test/fail_compilation/ice12827.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12827.d(10): Error: circular initialization of variable `ice12827.Test.i` +fail_compilation/ice12827.d(12): Error: circular initialization of variable `ice12827.Test.i` + immutable int i = i; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12836.d b/compiler/test/fail_compilation/ice12836.d index 39a1c39ec0c5..9fac21c25725 100644 --- a/compiler/test/fail_compilation/ice12836.d +++ b/compiler/test/fail_compilation/ice12836.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12836.d(9): Error: undefined identifier `C` -fail_compilation/ice12836.d(9): Error: undefined identifier `K` +fail_compilation/ice12836.d(13): Error: undefined identifier `C` +immutable C L = 1 << K; + ^ +fail_compilation/ice12836.d(13): Error: undefined identifier `K` +immutable C L = 1 << K; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12838.d b/compiler/test/fail_compilation/ice12838.d index c1edd4f9c7c6..d376ba5e06c3 100644 --- a/compiler/test/fail_compilation/ice12838.d +++ b/compiler/test/fail_compilation/ice12838.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12838.d(27): Error: cannot implicitly convert expression `1` of type `int` to `string` +fail_compilation/ice12838.d(29): Error: cannot implicitly convert expression `1` of type `int` to `string` + a[0] = 1; // ICE! + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12841.d b/compiler/test/fail_compilation/ice12841.d index 343624dbc390..27bac76c5e5c 100644 --- a/compiler/test/fail_compilation/ice12841.d +++ b/compiler/test/fail_compilation/ice12841.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12841.d(23): Error: cannot take address of expression `taskPool().amap(Args...)(Args args)` because it is not an lvalue -fail_compilation/ice12841.d(24): Error: cannot take address of template `amap(Args...)(Args args)`, perhaps instantiate it first +fail_compilation/ice12841.d(27): Error: cannot take address of expression `taskPool().amap(Args...)(Args args)` because it is not an lvalue + auto dg = &(taskPool.amap!"a.result()"); + ^ +fail_compilation/ice12841.d(28): Error: cannot take address of template `amap(Args...)(Args args)`, perhaps instantiate it first + auto fp = &(TaskPool.amap!"a.result()"); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12850.d b/compiler/test/fail_compilation/ice12850.d index 2e6a66c851a7..3bda13210361 100644 --- a/compiler/test/fail_compilation/ice12850.d +++ b/compiler/test/fail_compilation/ice12850.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12850.d(12): Error: cannot implicitly convert expression `0` of type `int` to `string` +fail_compilation/ice12850.d(14): Error: cannot implicitly convert expression `0` of type `int` to `string` + alias staticZip = TypeTuple!(arr[0]); + ^ --- */ alias TypeTuple(TL...) = TL; diff --git a/compiler/test/fail_compilation/ice12902.d b/compiler/test/fail_compilation/ice12902.d index 03763f7c18a5..b507d7863b7a 100644 --- a/compiler/test/fail_compilation/ice12902.d +++ b/compiler/test/fail_compilation/ice12902.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12902.d(20): Error: variable `ice12902.main.__dollar` - type `void` is inferred from initializer `s.opDollar()`, and variables cannot be of type `void` -fail_compilation/ice12902.d(20): Error: expression `s.opDollar()` is `void` and has no value +fail_compilation/ice12902.d(24): Error: variable `ice12902.main.__dollar` - type `void` is inferred from initializer `s.opDollar()`, and variables cannot be of type `void` + s[] = s[$]; + ^ +fail_compilation/ice12902.d(24): Error: expression `s.opDollar()` is `void` and has no value + s[] = s[$]; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice12907.d b/compiler/test/fail_compilation/ice12907.d index 9f758dbaefe8..afd00a91e0a0 100644 --- a/compiler/test/fail_compilation/ice12907.d +++ b/compiler/test/fail_compilation/ice12907.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12907.d(10): Error: template lambda has no type +fail_compilation/ice12907.d(12): Error: template lambda has no type + return x => (*g)(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13027.d b/compiler/test/fail_compilation/ice13027.d index 5eafe616ec0e..a6f229548a46 100644 --- a/compiler/test/fail_compilation/ice13027.d +++ b/compiler/test/fail_compilation/ice13027.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13027.d(9): Error: template instance `b!"c"` template `b` is not defined +fail_compilation/ice13027.d(11): Error: template instance `b!"c"` template `b` is not defined + scope a = b!"c"; + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/ice13081.d b/compiler/test/fail_compilation/ice13081.d index 64474bae1a4e..eace28403673 100644 --- a/compiler/test/fail_compilation/ice13081.d +++ b/compiler/test/fail_compilation/ice13081.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13081.d(17): Error: undefined identifier `node` -fail_compilation/ice13081.d(17): Error: undefined identifier `data` -fail_compilation/ice13081.d(17): Error: undefined identifier `node` -fail_compilation/ice13081.d(28): Error: template instance `ice13081.Cube!(SparseDataStore)` error instantiating +fail_compilation/ice13081.d(25): Error: undefined identifier `node` + this[] = node.data ? data : node.data; + ^ +fail_compilation/ice13081.d(25): Error: undefined identifier `data` + this[] = node.data ? data : node.data; + ^ +fail_compilation/ice13081.d(25): Error: undefined identifier `node` + this[] = node.data ? data : node.data; + ^ +fail_compilation/ice13081.d(36): Error: template instance `ice13081.Cube!(SparseDataStore)` error instantiating + Cube!SparseDataStore c; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13131.d b/compiler/test/fail_compilation/ice13131.d index d4a6b91c0c2f..a9b039840dd7 100644 --- a/compiler/test/fail_compilation/ice13131.d +++ b/compiler/test/fail_compilation/ice13131.d @@ -6,6 +6,8 @@ TEST_OUTPUT: +A +B fail_compilation/imports/a13131elec.d(10): Error: template instance `elecConnOf!gconn` template `elecConnOf` is not defined +alias econn = elecConnOf!gconn; // invalid declaration + ^ -B -A --- diff --git a/compiler/test/fail_compilation/ice13220.d b/compiler/test/fail_compilation/ice13220.d index 65b661be14f2..31e2e6f9289d 100644 --- a/compiler/test/fail_compilation/ice13220.d +++ b/compiler/test/fail_compilation/ice13220.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13220.d(22): Error: template instance `test!0` does not match template declaration `test(T)()` +fail_compilation/ice13220.d(24): Error: template instance `test!0` does not match template declaration `test(T)()` + t[0] = test!0(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13221.d b/compiler/test/fail_compilation/ice13221.d index 3c5505417793..e2e0b103f47b 100644 --- a/compiler/test/fail_compilation/ice13221.d +++ b/compiler/test/fail_compilation/ice13221.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13221.d(20): Error: variable `r` cannot be read at compile time +fail_compilation/ice13221.d(22): Error: variable `r` cannot be read at compile time + enum i = r; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13225.d b/compiler/test/fail_compilation/ice13225.d index abc30eaf4f2b..31cd606e6a0e 100644 --- a/compiler/test/fail_compilation/ice13225.d +++ b/compiler/test/fail_compilation/ice13225.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13225.d(12): Error: mixin `ice13225.S.M!(function (S __param_0) pure nothrow @nogc @safe => 0)` does not match template declaration `M(T)` -fail_compilation/ice13225.d(16): Error: undefined identifier `undefined` +fail_compilation/ice13225.d(16): Error: mixin `ice13225.S.M!(function (S __param_0) pure nothrow @nogc @safe => 0)` does not match template declaration `M(T)` + mixin M!((typeof(this)) => 0); + ^ +fail_compilation/ice13225.d(20): Error: undefined identifier `undefined` + mixin M!(() => undefined); + ^ --- */ mixin template M(T) {} diff --git a/compiler/test/fail_compilation/ice13311.d b/compiler/test/fail_compilation/ice13311.d index 2aa01adcd491..3b3d18e67799 100644 --- a/compiler/test/fail_compilation/ice13311.d +++ b/compiler/test/fail_compilation/ice13311.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/a13311.d TEST_OUTPUT: --- fail_compilation/imports/a13311.d(8): Error: undefined identifier `PieceTree` + this(PieceTree owner) {} + ^ --- */ module ice13311; diff --git a/compiler/test/fail_compilation/ice13356.d b/compiler/test/fail_compilation/ice13356.d index 3bac9b5f1b93..3253ef9bed04 100644 --- a/compiler/test/fail_compilation/ice13356.d +++ b/compiler/test/fail_compilation/ice13356.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13356.d(32): Error: template instance `Algebraic!(Tuple!(List))` recursive template expansion -fail_compilation/ice13356.d(15): Error: template instance `ice13356.isPrintable!(List)` error instantiating -fail_compilation/ice13356.d(33): instantiated from here: `Tuple!(List)` +fail_compilation/ice13356.d(38): Error: template instance `Algebraic!(Tuple!(List))` recursive template expansion + alias Payload = Algebraic!( + ^ +fail_compilation/ice13356.d(21): Error: template instance `ice13356.isPrintable!(List)` error instantiating + static if (isPrintable!(Types[0])) + ^ +fail_compilation/ice13356.d(39): instantiated from here: `Tuple!(List)` + Tuple!(List) + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13382.d b/compiler/test/fail_compilation/ice13382.d index 87c70d9afdcb..b1858af50826 100644 --- a/compiler/test/fail_compilation/ice13382.d +++ b/compiler/test/fail_compilation/ice13382.d @@ -1,14 +1,30 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13382.d(18): Error: incompatible types for `(a) == (0)`: `int[]` and `int` -fail_compilation/ice13382.d(19): Error: incompatible types for `(a) >= (0)`: `int[]` and `int` -fail_compilation/ice13382.d(20): Error: incompatible types for `(0) == (a)`: `int` and `int[]` -fail_compilation/ice13382.d(21): Error: incompatible types for `(0) >= (a)`: `int` and `int[]` -fail_compilation/ice13382.d(22): Error: incompatible types for `(a) is (0)`: `int[]` and `int` -fail_compilation/ice13382.d(23): Error: incompatible types for `(a) !is (0)`: `int[]` and `int` -fail_compilation/ice13382.d(24): Error: incompatible types for `(0) is (a)`: `int` and `int[]` -fail_compilation/ice13382.d(25): Error: incompatible types for `(0) !is (a)`: `int` and `int[]` +fail_compilation/ice13382.d(34): Error: incompatible types for `(a) == (0)`: `int[]` and `int` + if (a == 0) {} + ^ +fail_compilation/ice13382.d(35): Error: incompatible types for `(a) >= (0)`: `int[]` and `int` + if (a >= 0) {} + ^ +fail_compilation/ice13382.d(36): Error: incompatible types for `(0) == (a)`: `int` and `int[]` + if (0 == a) {} + ^ +fail_compilation/ice13382.d(37): Error: incompatible types for `(0) >= (a)`: `int` and `int[]` + if (0 >= a) {} + ^ +fail_compilation/ice13382.d(38): Error: incompatible types for `(a) is (0)`: `int[]` and `int` + if (a is 0) {} + ^ +fail_compilation/ice13382.d(39): Error: incompatible types for `(a) !is (0)`: `int[]` and `int` + if (a !is 0) {} + ^ +fail_compilation/ice13382.d(40): Error: incompatible types for `(0) is (a)`: `int` and `int[]` + if (0 is a) {} + ^ +fail_compilation/ice13382.d(41): Error: incompatible types for `(0) !is (a)`: `int` and `int[]` + if (0 !is a) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13385.d b/compiler/test/fail_compilation/ice13385.d index cf114d05951f..b2845c9d2e6c 100644 --- a/compiler/test/fail_compilation/ice13385.d +++ b/compiler/test/fail_compilation/ice13385.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13385.d(9): Error: visibility attribute `package(a)` does not bind to one of ancestor packages of module `ice13385` +fail_compilation/ice13385.d(11): Error: visibility attribute `package(a)` does not bind to one of ancestor packages of module `ice13385` +package(a) void foo() {} +^ --- */ module ice13385; diff --git a/compiler/test/fail_compilation/ice13459.d b/compiler/test/fail_compilation/ice13459.d index 6998e685a75c..0f94c5ac241a 100644 --- a/compiler/test/fail_compilation/ice13459.d +++ b/compiler/test/fail_compilation/ice13459.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13459.d(12): Error: undefined identifier `B` -fail_compilation/ice13459.d(18): Error: none of the overloads of `opSlice` are callable using argument types `(int, int)` -fail_compilation/ice13459.d(11): Candidate is: `ice13459.A.opSlice() const` +fail_compilation/ice13459.d(18): Error: undefined identifier `B` + auto opSlice() { return B; } + ^ +fail_compilation/ice13459.d(24): Error: none of the overloads of `opSlice` are callable using argument types `(int, int)` + foreach (fi; df[0..0]) {} + ^ +fail_compilation/ice13459.d(17): Candidate is: `ice13459.A.opSlice() const` + auto opSlice() const {} + ^ --- */ struct A diff --git a/compiler/test/fail_compilation/ice13465a.d b/compiler/test/fail_compilation/ice13465a.d index 16c43a672ec0..e2e8e904c453 100644 --- a/compiler/test/fail_compilation/ice13465a.d +++ b/compiler/test/fail_compilation/ice13465a.d @@ -4,7 +4,11 @@ TEST_OUTPUT: --- fail_compilation/imports/a13465.d(10): Error: cannot infer type from template instance `isMaskField!()` -fail_compilation/ice13465a.d(17): Error: template instance `imports.a13465.isMatchingMaskField!()` error instantiating + enum isMatchingMaskField = isMaskField!(); + ^ +fail_compilation/ice13465a.d(21): Error: template instance `imports.a13465.isMatchingMaskField!()` error instantiating + enum b = isMatchingMaskField!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13465b.d b/compiler/test/fail_compilation/ice13465b.d index 60c85055c601..b34a73f6ad14 100644 --- a/compiler/test/fail_compilation/ice13465b.d +++ b/compiler/test/fail_compilation/ice13465b.d @@ -4,7 +4,11 @@ TEST_OUTPUT: --- fail_compilation/imports/b13465.d(10): Error: cannot infer type from template instance `isMaskField!()` -fail_compilation/ice13465b.d(17): Error: template instance `imports.b13465.isMatchingMaskField!()` error instantiating + enum isMatchingMaskField = { enum n = isMaskField!(); return n; }(); + ^ +fail_compilation/ice13465b.d(21): Error: template instance `imports.b13465.isMatchingMaskField!()` error instantiating + enum b = isMatchingMaskField!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13563.d b/compiler/test/fail_compilation/ice13563.d index 4179007e6d12..55a71e8bd6b5 100644 --- a/compiler/test/fail_compilation/ice13563.d +++ b/compiler/test/fail_compilation/ice13563.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13563.d(23): Error: undefined identifier `z` in module `ice13563` +fail_compilation/ice13563.d(25): Error: undefined identifier `z` in module `ice13563` + v["name"] = .z(); // ICE + ^ --- */ diff --git a/compiler/test/fail_compilation/ice1358.d b/compiler/test/fail_compilation/ice1358.d index 2c334f95ca21..657e19828869 100644 --- a/compiler/test/fail_compilation/ice1358.d +++ b/compiler/test/fail_compilation/ice1358.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice1358.d(29): Error: invalid UTF character \U80000000 +fail_compilation/ice1358.d(31): Error: invalid UTF character \U80000000 +auto bla = "\U80000000"; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13644.d b/compiler/test/fail_compilation/ice13644.d index aa44709124a3..368c60e404aa 100644 --- a/compiler/test/fail_compilation/ice13644.d +++ b/compiler/test/fail_compilation/ice13644.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13644.d(22): Error: foreach: key cannot be of non-integral type `string` +fail_compilation/ice13644.d(24): Error: foreach: key cannot be of non-integral type `string` + foreach (string k2, string v2; foo()) + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13788.d b/compiler/test/fail_compilation/ice13788.d index 3e3989bc290a..5830ca358e54 100644 --- a/compiler/test/fail_compilation/ice13788.d +++ b/compiler/test/fail_compilation/ice13788.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13788.d(11): Error: pragma `mangle` - string expected for mangled name -fail_compilation/ice13788.d(12): Error: `string` expected for mangled name, not `(1)` of type `int` -fail_compilation/ice13788.d(13): Error: pragma `mangle` - zero-length string not allowed for mangled name -fail_compilation/ice13788.d(14): Error: pragma `mangle` - mangled name characters can only be of type `char` +fail_compilation/ice13788.d(19): Error: pragma `mangle` - string expected for mangled name +pragma(mangle) void f1(); +^ +fail_compilation/ice13788.d(20): Error: `string` expected for mangled name, not `(1)` of type `int` +pragma(mangle, 1) void f2(); + ^ +fail_compilation/ice13788.d(21): Error: pragma `mangle` - zero-length string not allowed for mangled name +pragma(mangle, "") void f3(); +^ +fail_compilation/ice13788.d(22): Error: pragma `mangle` - mangled name characters can only be of type `char` +pragma(mangle, "a"w) void f4(); +^ --- */ diff --git a/compiler/test/fail_compilation/ice13816.d b/compiler/test/fail_compilation/ice13816.d index aefe273da0c1..db2528fc4dba 100644 --- a/compiler/test/fail_compilation/ice13816.d +++ b/compiler/test/fail_compilation/ice13816.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13816.d(17): Error: template instance `TypeTuple!(ItemProperty!())` recursive template expansion -fail_compilation/ice13816.d(17): Error: alias `ice13816.ItemProperty!().ItemProperty` recursive alias declaration -fail_compilation/ice13816.d(22): Error: template instance `ice13816.ItemProperty!()` error instantiating +fail_compilation/ice13816.d(23): Error: template instance `TypeTuple!(ItemProperty!())` recursive template expansion + alias ItemProperty = TypeTuple!(ItemProperty!()); + ^ +fail_compilation/ice13816.d(23): Error: alias `ice13816.ItemProperty!().ItemProperty` recursive alias declaration + alias ItemProperty = TypeTuple!(ItemProperty!()); + ^ +fail_compilation/ice13816.d(28): Error: template instance `ice13816.ItemProperty!()` error instantiating + alias items = ItemProperty!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13835.d b/compiler/test/fail_compilation/ice13835.d index dcb17579d9c7..2d888b71af66 100644 --- a/compiler/test/fail_compilation/ice13835.d +++ b/compiler/test/fail_compilation/ice13835.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13835.d(15): Error: value of `this` is not known at compile time -fail_compilation/ice13835.d(21): Error: template instance `ice13835.Foo!int` error instantiating +fail_compilation/ice13835.d(19): Error: value of `this` is not known at compile time + static T crash = *(this._data + position); + ^ +fail_compilation/ice13835.d(25): Error: template instance `ice13835.Foo!int` error instantiating + auto heap = new Foo!(int); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13921.d b/compiler/test/fail_compilation/ice13921.d index 96c11ededaf8..1ffe70fdea3e 100644 --- a/compiler/test/fail_compilation/ice13921.d +++ b/compiler/test/fail_compilation/ice13921.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13921.d(13): Error: undefined identifier `undefined_identifier` -fail_compilation/ice13921.d(25): Error: template instance `ice13921.S!string` error instantiating +fail_compilation/ice13921.d(17): Error: undefined identifier `undefined_identifier` + undefined_identifier; + ^ +fail_compilation/ice13921.d(29): Error: template instance `ice13921.S!string` error instantiating + S!string g; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice13987.d b/compiler/test/fail_compilation/ice13987.d index 28a57c088bd7..019e4252aaa2 100644 --- a/compiler/test/fail_compilation/ice13987.d +++ b/compiler/test/fail_compilation/ice13987.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice13987.d(9): Error: cannot use array to initialize `S` +fail_compilation/ice13987.d(11): Error: cannot use array to initialize `S` +S s = [{}]; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14055.d b/compiler/test/fail_compilation/ice14055.d index 13cdf34473f2..a01bc43955c4 100644 --- a/compiler/test/fail_compilation/ice14055.d +++ b/compiler/test/fail_compilation/ice14055.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14055.d(16): Error: uninitialized variable `foo` cannot be returned from CTFE +fail_compilation/ice14055.d(18): Error: uninitialized variable `foo` cannot be returned from CTFE + static enum fooEnum = returnsFoo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14096.d b/compiler/test/fail_compilation/ice14096.d index 05171adcb46d..f11440a9da89 100644 --- a/compiler/test/fail_compilation/ice14096.d +++ b/compiler/test/fail_compilation/ice14096.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14096.d(29): Error: cannot access frame pointer of `ice14096.main.Baz!((i) => i).Baz` -fail_compilation/ice14096.d(23): Error: template instance `ice14096.foo!(Tuple!(Baz!((i) => i))).foo.bar!(t)` error instantiating -fail_compilation/ice14096.d(40): instantiated from here: `foo!(Tuple!(Baz!((i) => i)))` +fail_compilation/ice14096.d(35): Error: cannot access frame pointer of `ice14096.main.Baz!((i) => i).Baz` + typeof(s) p; + ^ +fail_compilation/ice14096.d(29): Error: template instance `ice14096.foo!(Tuple!(Baz!((i) => i))).foo.bar!(t)` error instantiating + bar!t(); + ^ +fail_compilation/ice14096.d(46): instantiated from here: `foo!(Tuple!(Baz!((i) => i)))` + foo(t); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14116.d b/compiler/test/fail_compilation/ice14116.d index c3339c7aca72..8720d959b73e 100644 --- a/compiler/test/fail_compilation/ice14116.d +++ b/compiler/test/fail_compilation/ice14116.d @@ -3,6 +3,8 @@ TEST_OUTPUT: --- fail_compilation/imports/a14116.d(3): Error: module `ice14116.ice14116` from file fail_compilation/ice14116.d must be imported with 'import ice14116.ice14116;' +import ice14116; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14130.d b/compiler/test/fail_compilation/ice14130.d index 4b12f8b65ad2..e82044a21f33 100644 --- a/compiler/test/fail_compilation/ice14130.d +++ b/compiler/test/fail_compilation/ice14130.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14130.d(10): Error: undefined identifier `Undef` -fail_compilation/ice14130.d(14): Error: template `foo` is not callable using argument types `!()(int)` -fail_compilation/ice14130.d(10): Candidate is: `foo(R, F = Undef)(R r, F s = 0)` +fail_compilation/ice14130.d(16): Error: undefined identifier `Undef` +F foo(R, F = Undef)(R r, F s = 0) {} + ^ +fail_compilation/ice14130.d(20): Error: template `foo` is not callable using argument types `!()(int)` + 0.foo; + ^ +fail_compilation/ice14130.d(16): Candidate is: `foo(R, F = Undef)(R r, F s = 0)` +F foo(R, F = Undef)(R r, F s = 0) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14146.d b/compiler/test/fail_compilation/ice14146.d index f058d1cc591c..7d5445ced938 100644 --- a/compiler/test/fail_compilation/ice14146.d +++ b/compiler/test/fail_compilation/ice14146.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14146.d(15): Error: constructor `ice14146.Array.this` default constructor for structs only allowed with `@disable`, no body, and no parameters +fail_compilation/ice14146.d(17): Error: constructor `ice14146.Array.this` default constructor for structs only allowed with `@disable`, no body, and no parameters + this() + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14177.d b/compiler/test/fail_compilation/ice14177.d index c7968158fa7e..86d068f1ac42 100644 --- a/compiler/test/fail_compilation/ice14177.d +++ b/compiler/test/fail_compilation/ice14177.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice14177.d(8): Error: alias `ice14177.Primitive` recursive alias declaration +fail_compilation/ice14177.d(10): Error: alias `ice14177.Primitive` recursive alias declaration +alias Primitive = Atom*; +^ ---- */ diff --git a/compiler/test/fail_compilation/ice14185.d b/compiler/test/fail_compilation/ice14185.d index 9e29cdb5b916..e19a5beb3b81 100644 --- a/compiler/test/fail_compilation/ice14185.d +++ b/compiler/test/fail_compilation/ice14185.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14185.d(12): Error: cannot implicitly convert expression `this` of type `Mutexed` to `Mutexed*` +fail_compilation/ice14185.d(14): Error: cannot implicitly convert expression `this` of type `Mutexed` to `Mutexed*` + return Lock (this); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14272.d b/compiler/test/fail_compilation/ice14272.d index ee102fc18d5a..a89b1d4c9526 100644 --- a/compiler/test/fail_compilation/ice14272.d +++ b/compiler/test/fail_compilation/ice14272.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14272.d(11): Error: circular initialization of variable `ice14272.A14272!1.A14272.tag` -fail_compilation/ice14272.d(14): Error: template instance `ice14272.A14272!1` error instantiating +fail_compilation/ice14272.d(15): Error: circular initialization of variable `ice14272.A14272!1.A14272.tag` + enum int tag = tag; + ^ +fail_compilation/ice14272.d(18): Error: template instance `ice14272.A14272!1` error instantiating +alias a14272 = A14272!1; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14424.d b/compiler/test/fail_compilation/ice14424.d index b0e0cd6407f1..412d27ff364f 100644 --- a/compiler/test/fail_compilation/ice14424.d +++ b/compiler/test/fail_compilation/ice14424.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14424.d(13): Error: `AliasSeq!(__unittest_L3_C1)` has no effect +fail_compilation/ice14424.d(15): Error: `AliasSeq!(__unittest_L3_C1)` has no effect + __traits(getUnitTests, imports.a14424); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14446.d b/compiler/test/fail_compilation/ice14446.d index 7ae934165cbb..470ff76c5678 100644 --- a/compiler/test/fail_compilation/ice14446.d +++ b/compiler/test/fail_compilation/ice14446.d @@ -5,6 +5,8 @@ TEST_OUTPUT: --- fail_compilation/extra-files/a14446.d(5): Error: module `x14446` from file fail_compilation/ice14446.d must be imported with 'import x14446;' + import ice14446; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14621.d b/compiler/test/fail_compilation/ice14621.d index b3d26b8d7fc7..f25d1dd0646b 100644 --- a/compiler/test/fail_compilation/ice14621.d +++ b/compiler/test/fail_compilation/ice14621.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14621.d(22): Error: static assert: `false` is false -fail_compilation/ice14621.d(28): instantiated from here: `erroneousTemplateInstantiation!()` +fail_compilation/ice14621.d(26): Error: static assert: `false` is false + static assert(false); + ^ +fail_compilation/ice14621.d(32): instantiated from here: `erroneousTemplateInstantiation!()` + ret[] = erroneousTemplateInstantiation!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14642.d b/compiler/test/fail_compilation/ice14642.d index 90b9867527bf..cc14c961b366 100644 --- a/compiler/test/fail_compilation/ice14642.d +++ b/compiler/test/fail_compilation/ice14642.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14642.d(47): Error: undefined identifier `errorValue` -fail_compilation/ice14642.d(23): Error: template instance `ice14642.X.NA!()` error instantiating +fail_compilation/ice14642.d(51): Error: undefined identifier `errorValue` +enum errVal = errorValue; + ^ +fail_compilation/ice14642.d(27): Error: template instance `ice14642.X.NA!()` error instantiating + alias na = NA!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice14844.d b/compiler/test/fail_compilation/ice14844.d index d466a3000b33..b5441edd440b 100644 --- a/compiler/test/fail_compilation/ice14844.d +++ b/compiler/test/fail_compilation/ice14844.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/ice14844.d(21): Error: in expression `__traits(allMembers, opDispatch)` template `opDispatch(string name)` has no members -fail_compilation/ice14844.d(21): `opDispatch(string name)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation +fail_compilation/ice14844.d(23): Error: in expression `__traits(allMembers, opDispatch)` template `opDispatch(string name)` has no members + foreach (x; __traits(allMembers, Typedef.opDispatch)) + ^ +fail_compilation/ice14844.d(23): `opDispatch(string name)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation --- */ diff --git a/compiler/test/fail_compilation/ice14907.d b/compiler/test/fail_compilation/ice14907.d index eeca1b3b3b3a..94a5fb4e95f6 100644 --- a/compiler/test/fail_compilation/ice14907.d +++ b/compiler/test/fail_compilation/ice14907.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice14907.d(14): Error: struct `ice14907.S(int v = S)` recursive template expansion -fail_compilation/ice14907.d(19): while looking for match for `S!()` -fail_compilation/ice14907.d(15): Error: template `ice14907.f(int v = f)()` recursive template expansion -fail_compilation/ice14907.d(20): while looking for match for `f!()` -fail_compilation/ice14907.d(15): Error: template `ice14907.f(int v = f)()` recursive template expansion -fail_compilation/ice14907.d(21): Error: template `f` is not callable using argument types `!()()` -fail_compilation/ice14907.d(15): Candidate is: `f(int v = f)()` +fail_compilation/ice14907.d(28): Error: struct `ice14907.S(int v = S)` recursive template expansion +struct S(int v = S) {} +^ +fail_compilation/ice14907.d(33): while looking for match for `S!()` + S!() s; // OK <- ICE + ^ +fail_compilation/ice14907.d(29): Error: template `ice14907.f(int v = f)()` recursive template expansion +void f(int v = f)() {} + ^ +fail_compilation/ice14907.d(34): while looking for match for `f!()` + f!()(); // OK <- ICE + ^ +fail_compilation/ice14907.d(29): Error: template `ice14907.f(int v = f)()` recursive template expansion +void f(int v = f)() {} + ^ +fail_compilation/ice14907.d(35): Error: template `f` is not callable using argument types `!()()` + f(); // OK <- ICE + ^ +fail_compilation/ice14907.d(29): Candidate is: `f(int v = f)()` +void f(int v = f)() {} + ^ ---- */ diff --git a/compiler/test/fail_compilation/ice14923.d b/compiler/test/fail_compilation/ice14923.d index 99d2eeed7140..b02630883fba 100644 --- a/compiler/test/fail_compilation/ice14923.d +++ b/compiler/test/fail_compilation/ice14923.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice14923.d(23): Error: function `parse` is not callable using argument types `(A)` -fail_compilation/ice14923.d(23): cannot pass argument `b` of type `ice14923.A` to parameter `C a` -fail_compilation/ice14923.d(21): `ice14923.parse(C a)` declared here -fail_compilation/ice14923.d(23): instantiated from here: `bar!((b) => parse(b))` +fail_compilation/ice14923.d(29): Error: function `parse` is not callable using argument types `(A)` + bar!(b => parse(b))(); + ^ +fail_compilation/ice14923.d(29): cannot pass argument `b` of type `ice14923.A` to parameter `C a` +fail_compilation/ice14923.d(27): `ice14923.parse(C a)` declared here +void parse(C a) + ^ +fail_compilation/ice14923.d(29): instantiated from here: `bar!((b) => parse(b))` + bar!(b => parse(b))(); + ^ ---- */ diff --git a/compiler/test/fail_compilation/ice15002.d b/compiler/test/fail_compilation/ice15002.d index 50d13dd9bd43..e5f9f1e4f157 100644 --- a/compiler/test/fail_compilation/ice15002.d +++ b/compiler/test/fail_compilation/ice15002.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15002.d(10): Error: array index 5 is out of bounds `x[0 .. 3]` -fail_compilation/ice15002.d(10): Error: array index 5 is out of bounds `x[0 .. 3]` +fail_compilation/ice15002.d(14): Error: array index 5 is out of bounds `x[0 .. 3]` +int* p = &x[5][0]; + ^ +fail_compilation/ice15002.d(14): Error: array index 5 is out of bounds `x[0 .. 3]` +int* p = &x[5][0]; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15092.d b/compiler/test/fail_compilation/ice15092.d index 6824cc1f918d..fed058dddf8f 100644 --- a/compiler/test/fail_compilation/ice15092.d +++ b/compiler/test/fail_compilation/ice15092.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15092.d(13): Error: struct `ice15092.A.S` conflicts with struct `ice15092.A.S` at fail_compilation/ice15092.d(12) -fail_compilation/ice15092.d(16): Error: class `ice15092.A.C` conflicts with class `ice15092.A.C` at fail_compilation/ice15092.d(15) -fail_compilation/ice15092.d(19): Error: interface `ice15092.A.I` conflicts with interface `ice15092.A.I` at fail_compilation/ice15092.d(18) +fail_compilation/ice15092.d(19): Error: struct `ice15092.A.S` conflicts with struct `ice15092.A.S` at fail_compilation/ice15092.d(18) + struct S {} + ^ +fail_compilation/ice15092.d(22): Error: class `ice15092.A.C` conflicts with class `ice15092.A.C` at fail_compilation/ice15092.d(21) + class C {} + ^ +fail_compilation/ice15092.d(25): Error: interface `ice15092.A.I` conflicts with interface `ice15092.A.I` at fail_compilation/ice15092.d(24) + interface I {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15127.d b/compiler/test/fail_compilation/ice15127.d index afc6419725ff..3d73067a07d4 100644 --- a/compiler/test/fail_compilation/ice15127.d +++ b/compiler/test/fail_compilation/ice15127.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15127.d(17): Error: basic type expected, not `struct` -fail_compilation/ice15127.d(17): Error: identifier expected for template value parameter -fail_compilation/ice15127.d(17): Error: found `struct` when expecting `)` -fail_compilation/ice15127.d(17): Error: found `ExampleStruct` when expecting `=` -fail_compilation/ice15127.d(17): Error: semicolon expected following auto declaration, not `)` -fail_compilation/ice15127.d(17): Error: declaration expected, not `)` +fail_compilation/ice15127.d(29): Error: basic type expected, not `struct` + enum ExampleTemplate(struct ExampleStruct(K)) = K; + ^ +fail_compilation/ice15127.d(29): Error: identifier expected for template value parameter + enum ExampleTemplate(struct ExampleStruct(K)) = K; + ^ +fail_compilation/ice15127.d(29): Error: found `struct` when expecting `)` + enum ExampleTemplate(struct ExampleStruct(K)) = K; + ^ +fail_compilation/ice15127.d(29): Error: found `ExampleStruct` when expecting `=` + enum ExampleTemplate(struct ExampleStruct(K)) = K; + ^ +fail_compilation/ice15127.d(29): Error: semicolon expected following auto declaration, not `)` + enum ExampleTemplate(struct ExampleStruct(K)) = K; + ^ +fail_compilation/ice15127.d(29): Error: declaration expected, not `)` + enum ExampleTemplate(struct ExampleStruct(K)) = K; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15172.d b/compiler/test/fail_compilation/ice15172.d index aa070f6db1b2..a8875eb95f13 100644 --- a/compiler/test/fail_compilation/ice15172.d +++ b/compiler/test/fail_compilation/ice15172.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15172.d(14): Error: constructor `ice15172.ThreadError.this` no match for implicit `super()` call in constructor +fail_compilation/ice15172.d(16): Error: constructor `ice15172.ThreadError.this` no match for implicit `super()` call in constructor + this(string) + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15317.d b/compiler/test/fail_compilation/ice15317.d index 2ab3ef9344c7..c6564909b5de 100644 --- a/compiler/test/fail_compilation/ice15317.d +++ b/compiler/test/fail_compilation/ice15317.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15317.d(11): Error: undefined identifier `fun` +fail_compilation/ice15317.d(13): Error: undefined identifier `fun` + alias f = fun; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15332.d b/compiler/test/fail_compilation/ice15332.d index 67895835823b..d1f249d407b8 100644 --- a/compiler/test/fail_compilation/ice15332.d +++ b/compiler/test/fail_compilation/ice15332.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15332.d(16): Error: calling non-static function `fun` requires an instance of type `C` -fail_compilation/ice15332.d(17): Error: accessing non-static variable `var` requires an instance of `C` +fail_compilation/ice15332.d(20): Error: calling non-static function `fun` requires an instance of type `C` + int a1 = function() { return fun; }(); + ^ +fail_compilation/ice15332.d(21): Error: accessing non-static variable `var` requires an instance of `C` + int a2 = function() { return var; }(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15441.d b/compiler/test/fail_compilation/ice15441.d index 97fd1702dcbf..06d2b0a79dda 100644 --- a/compiler/test/fail_compilation/ice15441.d +++ b/compiler/test/fail_compilation/ice15441.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15441.d(22): Error: `s1.front` is `void` and has no value -fail_compilation/ice15441.d(25): Error: cannot infer argument types, expected 1 argument, not 2 +fail_compilation/ice15441.d(26): Error: `s1.front` is `void` and has no value + foreach (p, e; s1) {} + ^ +fail_compilation/ice15441.d(29): Error: cannot infer argument types, expected 1 argument, not 2 + foreach (p, e; s2) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15688.d b/compiler/test/fail_compilation/ice15688.d index e086e316fc15..c5b7e93d05dd 100644 --- a/compiler/test/fail_compilation/ice15688.d +++ b/compiler/test/fail_compilation/ice15688.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15688.d(12): Error: undefined identifier `mappings` -fail_compilation/ice15688.d(12): Error: function expected before `()`, not `0` of type `int` +fail_compilation/ice15688.d(16): Error: undefined identifier `mappings` + (mappings, 0)(); + ^ +fail_compilation/ice15688.d(16): Error: function expected before `()`, not `0` of type `int` + (mappings, 0)(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15788.d b/compiler/test/fail_compilation/ice15788.d index 66942545d11f..fcf35909237d 100644 --- a/compiler/test/fail_compilation/ice15788.d +++ b/compiler/test/fail_compilation/ice15788.d @@ -2,9 +2,15 @@ EXTRA_FILES: imports/range15788.d TEST_OUTPUT: --- -fail_compilation/ice15788.d(20): Error: none of the overloads of `iota` are callable using argument types `!()(S, S)` +fail_compilation/ice15788.d(26): Error: none of the overloads of `iota` are callable using argument types `!()(S, S)` + iota(s, s); + ^ fail_compilation/imports/range15788.d(3): Candidates are: `iota(B, E, S)(B, E, S)` -fail_compilation/ice15788.d(13): `ice15788.iota()` +auto iota(B, E, S)(B, E, S) + ^ +fail_compilation/ice15788.d(19): `ice15788.iota()` +void iota() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice15816.d b/compiler/test/fail_compilation/ice15816.d index 9576b564bb1a..72dac1060330 100644 --- a/compiler/test/fail_compilation/ice15816.d +++ b/compiler/test/fail_compilation/ice15816.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/a15816.d TEST_OUTPUT: --- fail_compilation/imports/a15816.d(3): Error: anonymous classes not allowed +class +^ --- */ diff --git a/compiler/test/fail_compilation/ice15855.d b/compiler/test/fail_compilation/ice15855.d index 5d1cea1de72b..145b0672a259 100644 --- a/compiler/test/fail_compilation/ice15855.d +++ b/compiler/test/fail_compilation/ice15855.d @@ -2,17 +2,19 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15855.d(28): Error: found `End of File` when expecting `(` -fail_compilation/ice15855.d(28): Error: found `End of File` instead of statement -fail_compilation/ice15855.d(28): Error: expression expected, not `End of File` -fail_compilation/ice15855.d(28): Error: found `End of File` when expecting `;` following `for` condition -fail_compilation/ice15855.d(28): Error: expression expected, not `End of File` -fail_compilation/ice15855.d(28): Error: found `End of File` when expecting `)` -fail_compilation/ice15855.d(28): Error: found `End of File` instead of statement -fail_compilation/ice15855.d(28): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/ice15855.d(27): unmatched `{` -fail_compilation/ice15855.d(28): Error: found `End of File` when expecting `]` -fail_compilation/ice15855.d(28): Error: no identifier for declarator `a[() +fail_compilation/ice15855.d(30): Error: found `End of File` when expecting `(` +fail_compilation/ice15855.d(30): Error: found `End of File` instead of statement +fail_compilation/ice15855.d(30): Error: expression expected, not `End of File` +fail_compilation/ice15855.d(30): Error: found `End of File` when expecting `;` following `for` condition +fail_compilation/ice15855.d(30): Error: expression expected, not `End of File` +fail_compilation/ice15855.d(30): Error: found `End of File` when expecting `)` +fail_compilation/ice15855.d(30): Error: found `End of File` instead of statement +fail_compilation/ice15855.d(30): Error: matching `}` expected following compound statement, not `End of File` +fail_compilation/ice15855.d(29): unmatched `{` +a[{for + ^ +fail_compilation/ice15855.d(30): Error: found `End of File` when expecting `]` +fail_compilation/ice15855.d(30): Error: no identifier for declarator `a[() { for (__error__ __error; __error) diff --git a/compiler/test/fail_compilation/ice15922.d b/compiler/test/fail_compilation/ice15922.d index 624124b187ac..28baf0f863fc 100644 --- a/compiler/test/fail_compilation/ice15922.d +++ b/compiler/test/fail_compilation/ice15922.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/ice15922.d(23): Error: function `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false.correctedInsert` has no `return` statement, but is expected to return a value of type `int` -fail_compilation/ice15922.d(21): Error: template instance `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false` error instantiating -fail_compilation/ice15922.d(26): instantiated from here: `ValidSparseDataStore!int` -fail_compilation/ice15922.d(14): Error: calling non-static function `insert` requires an instance of type `ValidSparseDataStore` -fail_compilation/ice15922.d(26): Error: template instance `ice15922.StorageAttributes!(ValidSparseDataStore!int)` error instantiating +fail_compilation/ice15922.d(33): Error: function `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false.correctedInsert` has no `return` statement, but is expected to return a value of type `int` + DataT correctedInsert(bool CorrectParents)() {} + ^ +fail_compilation/ice15922.d(31): Error: template instance `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false` error instantiating + correctedInsert!(false); + ^ +fail_compilation/ice15922.d(36): instantiated from here: `ValidSparseDataStore!int` +alias BasicCubeT = StorageAttributes!(ValidSparseDataStore!int); + ^ +fail_compilation/ice15922.d(24): Error: calling non-static function `insert` requires an instance of type `ValidSparseDataStore` + enum hasInsertMethod = Store.insert; + ^ +fail_compilation/ice15922.d(36): Error: template instance `ice15922.StorageAttributes!(ValidSparseDataStore!int)` error instantiating +alias BasicCubeT = StorageAttributes!(ValidSparseDataStore!int); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice16035.d b/compiler/test/fail_compilation/ice16035.d index 8361c42cf2eb..4308f31d2dee 100644 --- a/compiler/test/fail_compilation/ice16035.d +++ b/compiler/test/fail_compilation/ice16035.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice16035.d(18): Error: forward reference to inferred return type of function call `this.a[0].toString()` -fail_compilation/ice16035.d(13): Error: template instance `ice16035.Value.get!string` error instantiating +fail_compilation/ice16035.d(22): Error: forward reference to inferred return type of function call `this.a[0].toString()` + a[0].toString(); + ^ +fail_compilation/ice16035.d(17): Error: template instance `ice16035.Value.get!string` error instantiating + get!string; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice16657.d b/compiler/test/fail_compilation/ice16657.d index 19231c28e346..3e5d3b0309c7 100644 --- a/compiler/test/fail_compilation/ice16657.d +++ b/compiler/test/fail_compilation/ice16657.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice16657.d(9): Error: function `ice16657.RefCounted.refCountedPayload` has no `return` statement, but is expected to return a value of type `inout(RefCounted)` +fail_compilation/ice16657.d(11): Error: function `ice16657.RefCounted.refCountedPayload` has no `return` statement, but is expected to return a value of type `inout(RefCounted)` + inout(RefCounted) refCountedPayload() inout { } + ^ --- */ struct RefCounted diff --git a/compiler/test/fail_compilation/ice17074.d b/compiler/test/fail_compilation/ice17074.d index 84c4d8533e2e..03028c95201e 100644 --- a/compiler/test/fail_compilation/ice17074.d +++ b/compiler/test/fail_compilation/ice17074.d @@ -5,9 +5,15 @@ extern(C++, std.__overloadset) void ice_std_keyword(); /* TEST_OUTPUT: --- -fail_compilation/ice17074.d(13): Error: identifier expected for C++ namespace -fail_compilation/ice17074.d(13): Error: found `*` when expecting `)` -fail_compilation/ice17074.d(13): Error: declaration expected, not `)` +fail_compilation/ice17074.d(19): Error: identifier expected for C++ namespace +extern(C++, std.*) void ice_std_token(); + ^ +fail_compilation/ice17074.d(19): Error: found `*` when expecting `)` +extern(C++, std.*) void ice_std_token(); + ^ +fail_compilation/ice17074.d(19): Error: declaration expected, not `)` +extern(C++, std.*) void ice_std_token(); + ^ --- */ extern(C++, std.*) void ice_std_token(); diff --git a/compiler/test/fail_compilation/ice17690.d b/compiler/test/fail_compilation/ice17690.d index 853b7952a797..8677fc24ca19 100644 --- a/compiler/test/fail_compilation/ice17690.d +++ b/compiler/test/fail_compilation/ice17690.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice17690.d(9): Error: undefined identifier `x` +fail_compilation/ice17690.d(11): Error: undefined identifier `x` + assert(x==3); + ^ --- */ void main(){ diff --git a/compiler/test/fail_compilation/ice17831.d b/compiler/test/fail_compilation/ice17831.d index 41abbf77a82e..7c1be8047321 100644 --- a/compiler/test/fail_compilation/ice17831.d +++ b/compiler/test/fail_compilation/ice17831.d @@ -1,16 +1,36 @@ /* TEST_OUTPUT: --- -fail_compilation/ice17831.d(23): Error: `case` variables have to be `const` or `immutable` -fail_compilation/ice17831.d(23): Error: `case` variable `i` declared at fail_compilation/ice17831.d(21) cannot be declared in `switch` body -fail_compilation/ice17831.d(37): Error: `case` variables have to be `const` or `immutable` -fail_compilation/ice17831.d(37): Error: `case` variable `i` declared at fail_compilation/ice17831.d(35) cannot be declared in `switch` body -fail_compilation/ice17831.d(52): Error: `case` variables have to be `const` or `immutable` -fail_compilation/ice17831.d(52): Error: `case` variable `i` declared at fail_compilation/ice17831.d(49) cannot be declared in `switch` body -fail_compilation/ice17831.d(65): Error: `case` variables have to be `const` or `immutable` -fail_compilation/ice17831.d(65): Error: `case` variable `i` declared at fail_compilation/ice17831.d(64) cannot be declared in `switch` body -fail_compilation/ice17831.d(77): Error: `case` variables have to be `const` or `immutable` -fail_compilation/ice17831.d(77): Error: `case` variable `i` declared at fail_compilation/ice17831.d(76) cannot be declared in `switch` body +fail_compilation/ice17831.d(43): Error: `case` variables have to be `const` or `immutable` + case i: + ^ +fail_compilation/ice17831.d(43): Error: `case` variable `i` declared at fail_compilation/ice17831.d(41) cannot be declared in `switch` body + case i: + ^ +fail_compilation/ice17831.d(57): Error: `case` variables have to be `const` or `immutable` + case i: + ^ +fail_compilation/ice17831.d(57): Error: `case` variable `i` declared at fail_compilation/ice17831.d(55) cannot be declared in `switch` body + case i: + ^ +fail_compilation/ice17831.d(72): Error: `case` variables have to be `const` or `immutable` + case i: + ^ +fail_compilation/ice17831.d(72): Error: `case` variable `i` declared at fail_compilation/ice17831.d(69) cannot be declared in `switch` body + case i: + ^ +fail_compilation/ice17831.d(85): Error: `case` variables have to be `const` or `immutable` + case i: + ^ +fail_compilation/ice17831.d(85): Error: `case` variable `i` declared at fail_compilation/ice17831.d(84) cannot be declared in `switch` body + case i: + ^ +fail_compilation/ice17831.d(97): Error: `case` variables have to be `const` or `immutable` + case i: + ^ +fail_compilation/ice17831.d(97): Error: `case` variable `i` declared at fail_compilation/ice17831.d(96) cannot be declared in `switch` body + case i: + ^ --- */ diff --git a/compiler/test/fail_compilation/ice18469.d b/compiler/test/fail_compilation/ice18469.d index 796dd3dcc9de..1280083932a7 100644 --- a/compiler/test/fail_compilation/ice18469.d +++ b/compiler/test/fail_compilation/ice18469.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice18469.d(10): Error: no property `opCall` for `this.~this()` of type `void` +fail_compilation/ice18469.d(12): Error: no property `opCall` for `this.~this()` of type `void` + this(){alias T = typeof(Bar.__dtor.opCall);} + ^ --- */ class Bar diff --git a/compiler/test/fail_compilation/ice18753.d b/compiler/test/fail_compilation/ice18753.d index f41ab3e754f9..9536ee63ee15 100644 --- a/compiler/test/fail_compilation/ice18753.d +++ b/compiler/test/fail_compilation/ice18753.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice18753.d(21): Error: variable `ice18753.isInputRange!(Group).isInputRange` - type `void` is inferred from initializer `ReturnType(func...)`, and variables cannot be of type `void` -fail_compilation/ice18753.d(23): Error: template instance `ice18753.isInputRange!(Group)` error instantiating -fail_compilation/ice18753.d(18): instantiated from here: `isForwardRange!(Group)` -fail_compilation/ice18753.d(18): while evaluating: `static assert(isForwardRange!(Group))` +fail_compilation/ice18753.d(29): Error: variable `ice18753.isInputRange!(Group).isInputRange` - type `void` is inferred from initializer `ReturnType(func...)`, and variables cannot be of type `void` +enum isInputRange(R) = ReturnType; + ^ +fail_compilation/ice18753.d(31): Error: template instance `ice18753.isInputRange!(Group)` error instantiating +enum isForwardRange(R) = isInputRange!R is ReturnType!(() => r); + ^ +fail_compilation/ice18753.d(26): instantiated from here: `isForwardRange!(Group)` + static assert(isForwardRange!Group); + ^ +fail_compilation/ice18753.d(26): while evaluating: `static assert(isForwardRange!(Group))` + static assert(isForwardRange!Group); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice19755.d b/compiler/test/fail_compilation/ice19755.d index 6d60fc43c1b2..89a74996cac0 100644 --- a/compiler/test/fail_compilation/ice19755.d +++ b/compiler/test/fail_compilation/ice19755.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/ice19755.d(11): Error: no property `x` for `self` of type `ice19755.Thunk!int*` -fail_compilation/ice19755.d(16): Error: template instance `ice19755.Thunk!int` error instantiating +fail_compilation/ice19755.d(15): Error: no property `x` for `self` of type `ice19755.Thunk!int*` + self.x = 0; + ^ +fail_compilation/ice19755.d(20): Error: template instance `ice19755.Thunk!int` error instantiating +alias T = Thunk!int; + ^ --- */ struct Thunk(Dummy) { diff --git a/compiler/test/fail_compilation/ice19762.d b/compiler/test/fail_compilation/ice19762.d index a484327426b9..2ee568a49bae 100644 --- a/compiler/test/fail_compilation/ice19762.d +++ b/compiler/test/fail_compilation/ice19762.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice19762.d(13): Error: struct `ice19762.X` had semantic errors when compiling +fail_compilation/ice19762.d(15): Error: struct `ice19762.X` had semantic errors when compiling +struct X +^ --- */ diff --git a/compiler/test/fail_compilation/ice19887.d b/compiler/test/fail_compilation/ice19887.d index a323d0858bc2..14c789493391 100644 --- a/compiler/test/fail_compilation/ice19887.d +++ b/compiler/test/fail_compilation/ice19887.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice19887.d(9): Error: initializer must be an expression, not `(void)` +fail_compilation/ice19887.d(11): Error: initializer must be an expression, not `(void)` +void func(AliasSeq!(int) params = AliasSeq!(void)) {} + ^ --- */ module ice19887; diff --git a/compiler/test/fail_compilation/ice19950.d b/compiler/test/fail_compilation/ice19950.d index dc930d5aa8e3..39b3e3359f99 100644 --- a/compiler/test/fail_compilation/ice19950.d +++ b/compiler/test/fail_compilation/ice19950.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice19950.d(8): Error: undefined identifier `NotHere` -fail_compilation/ice19950.d(9): Error: template instance `ice19950.baz!()` does not match template declaration `baz()(Foo)` +fail_compilation/ice19950.d(12): Error: undefined identifier `NotHere` +alias Foo = NotHere; + ^ +fail_compilation/ice19950.d(13): Error: template instance `ice19950.baz!()` does not match template declaration `baz()(Foo)` +alias Bar = baz!(); + ^ --- */ alias Foo = NotHere; diff --git a/compiler/test/fail_compilation/ice20042.d b/compiler/test/fail_compilation/ice20042.d index 7a674b3c5464..1ac04f8e1738 100644 --- a/compiler/test/fail_compilation/ice20042.d +++ b/compiler/test/fail_compilation/ice20042.d @@ -2,8 +2,12 @@ DISABLED: freebsd32 openbsd32 linux32 osx32 win32 TEST_OUTPUT: --- -fail_compilation/ice20042.d(18): Error: slice operation `cast(__vector(float[4]))[nanF, nanF, nanF, nanF] = [1.0F, 2.0F, 3.0F, 4.0F][0..4]` cannot be evaluated at compile time -fail_compilation/ice20042.d(25): called from here: `Vec4(cast(__vector(float[4]))[nanF, nanF, nanF, nanF]).this([1.0F, 2.0F, 3.0F, 4.0F])` +fail_compilation/ice20042.d(22): Error: slice operation `cast(__vector(float[4]))[nanF, nanF, nanF, nanF] = [1.0F, 2.0F, 3.0F, 4.0F][0..4]` cannot be evaluated at compile time + raw[] = value[]; + ^ +fail_compilation/ice20042.d(29): called from here: `Vec4(cast(__vector(float[4]))[nanF, nanF, nanF, nanF]).this([1.0F, 2.0F, 3.0F, 4.0F])` + static immutable Vec4 v = Vec4( 1.0f, 2.0f, 3.0f, 4.0f ); + ^ --- */ void write(T...)(T t){} diff --git a/compiler/test/fail_compilation/ice20056.d b/compiler/test/fail_compilation/ice20056.d index 519ada11eb74..ad69a29c3f60 100644 --- a/compiler/test/fail_compilation/ice20056.d +++ b/compiler/test/fail_compilation/ice20056.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice20056.d(19): Error: calling non-static function `iter` requires an instance of type `RangeWrapper` +fail_compilation/ice20056.d(21): Error: calling non-static function `iter` requires an instance of type `RangeWrapper` + Def!(RangeWrapper.iter).func; + ^ --- */ struct Def(alias fn) diff --git a/compiler/test/fail_compilation/ice20057.d b/compiler/test/fail_compilation/ice20057.d index 617e07cba0b3..3b08dd3a2f2c 100644 --- a/compiler/test/fail_compilation/ice20057.d +++ b/compiler/test/fail_compilation/ice20057.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/i20057.d TEST_OUTPUT: --- -fail_compilation/ice20057.d(10): Error: alias `ice20057.BlackHole` conflicts with struct `ice20057.BlackHole(alias T)` at fail_compilation/ice20057.d(9) +fail_compilation/ice20057.d(12): Error: alias `ice20057.BlackHole` conflicts with struct `ice20057.BlackHole(alias T)` at fail_compilation/ice20057.d(11) +import imports.i20057: BlackHole; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice20264.d b/compiler/test/fail_compilation/ice20264.d index a8a1e7119bee..36ff39f47ab7 100644 --- a/compiler/test/fail_compilation/ice20264.d +++ b/compiler/test/fail_compilation/ice20264.d @@ -2,7 +2,9 @@ DISABLED: freebsd32 openbsd32 linux32 osx32 win32 TEST_OUTPUT: --- -fail_compilation/ice20264.d(12): Error: cannot modify expression `cast(__vector(float[4]))a` because it is not an lvalue +fail_compilation/ice20264.d(14): Error: cannot modify expression `cast(__vector(float[4]))a` because it is not an lvalue + cast(float4)(a) = 1.0f; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice20545.d b/compiler/test/fail_compilation/ice20545.d index 26bd320bfbd7..288760904f1a 100644 --- a/compiler/test/fail_compilation/ice20545.d +++ b/compiler/test/fail_compilation/ice20545.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice20545.d(8): Error: initializer expression expected following colon, not `]` +fail_compilation/ice20545.d(10): Error: initializer expression expected following colon, not `]` +static initial = [{ }: ]; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice20709.d b/compiler/test/fail_compilation/ice20709.d index cc36de949679..9922e8f144ae 100644 --- a/compiler/test/fail_compilation/ice20709.d +++ b/compiler/test/fail_compilation/ice20709.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/imp20709.d TEST_OUTPUT: --- -fail_compilation/ice20709.d(10): Error: module `imp20709` import `Point` not found +fail_compilation/ice20709.d(12): Error: module `imp20709` import `Point` not found +import imports.imp20709 : Point; + ^ --- */ module ice20709; diff --git a/compiler/test/fail_compilation/ice21060.d b/compiler/test/fail_compilation/ice21060.d index d33889cee3d7..9d7c978af93d 100644 --- a/compiler/test/fail_compilation/ice21060.d +++ b/compiler/test/fail_compilation/ice21060.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/ice21060a/package.d imports/ice21060b/package.d imports/ice TEST_OUTPUT: --- fail_compilation/imports/ice21060b/package.d(3): Error: struct `imports.ice21060d.P21060` already exists at fail_compilation/imports/ice21060d/package.d(3). Perhaps in another function with the same name? +struct P21060 +^ --- */ struct S21060 diff --git a/compiler/test/fail_compilation/ice21095.d b/compiler/test/fail_compilation/ice21095.d index 0d87d63bb013..2900fa03756a 100644 --- a/compiler/test/fail_compilation/ice21095.d +++ b/compiler/test/fail_compilation/ice21095.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice21095.d(14): Error: constructor `ice21095.Mutex.__ctor!().this` `in` and `out` contracts can only appear without a body when they are virtual interface functions or abstract -fail_compilation/ice21095.d(12): Error: template instance `ice21095.Mutex.__ctor!()` error instantiating +fail_compilation/ice21095.d(18): Error: constructor `ice21095.Mutex.__ctor!().this` `in` and `out` contracts can only appear without a body when they are virtual interface functions or abstract + this()(Object, bool) in { } + ^ +fail_compilation/ice21095.d(16): Error: template instance `ice21095.Mutex.__ctor!()` error instantiating + this(obj, true); + ^ --- */ class Mutex diff --git a/compiler/test/fail_compilation/ice22377.d b/compiler/test/fail_compilation/ice22377.d index 686e700cae9b..e53b22b11b11 100644 --- a/compiler/test/fail_compilation/ice22377.d +++ b/compiler/test/fail_compilation/ice22377.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice22377.d(8): Error: function `ice22377.foo` cannot have parameter of type `string` because its linkage is `extern(C++)` +fail_compilation/ice22377.d(10): Error: function `ice22377.foo` cannot have parameter of type `string` because its linkage is `extern(C++)` +extern(C++) void foo(string a) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice22516.d b/compiler/test/fail_compilation/ice22516.d index 1c71f38d23ae..d584906d662d 100644 --- a/compiler/test/fail_compilation/ice22516.d +++ b/compiler/test/fail_compilation/ice22516.d @@ -3,7 +3,9 @@ https://issues.dlang.org/show_bug.cgi?id=22516 TEST_OUTPUT: --- -fail_compilation/ice22516.d(18): Error: undefined identifier `X` +fail_compilation/ice22516.d(20): Error: undefined identifier `X` + X x; + ^ --- +/ diff --git a/compiler/test/fail_compilation/ice23097.d b/compiler/test/fail_compilation/ice23097.d index 5cde816c668e..1ad4dfa8a4de 100644 --- a/compiler/test/fail_compilation/ice23097.d +++ b/compiler/test/fail_compilation/ice23097.d @@ -1,11 +1,19 @@ /* https://issues.dlang.org/show_bug.cgi?id=23097 TEST_OUTPUT: --- -fail_compilation/ice23097.d(13): Error: undefined identifier `ICE` -fail_compilation/ice23097.d(28): Error: template instance `ice23097.ice23097!(S23097)` error instantiating -fail_compilation/ice23097.d(28): Error: function `ice23097` is not callable using argument types `(S23097)` -fail_compilation/ice23097.d(28): generating a copy constructor for `struct S23097` failed, therefore instances of it are uncopyable -fail_compilation/ice23097.d(11): `ice23097.ice23097!(S23097).ice23097(S23097 __param_0)` declared here +fail_compilation/ice23097.d(21): Error: undefined identifier `ICE` + ICE; + ^ +fail_compilation/ice23097.d(36): Error: template instance `ice23097.ice23097!(S23097)` error instantiating + s.ice23097; + ^ +fail_compilation/ice23097.d(36): Error: function `ice23097` is not callable using argument types `(S23097)` + s.ice23097; + ^ +fail_compilation/ice23097.d(36): generating a copy constructor for `struct S23097` failed, therefore instances of it are uncopyable +fail_compilation/ice23097.d(19): `ice23097.ice23097!(S23097).ice23097(S23097 __param_0)` declared here +auto ice23097(I)(I) + ^ --- */ auto ice23097(I)(I) diff --git a/compiler/test/fail_compilation/ice23564.d b/compiler/test/fail_compilation/ice23564.d index 75b5d4ef9c6c..a00fa259434f 100644 --- a/compiler/test/fail_compilation/ice23564.d +++ b/compiler/test/fail_compilation/ice23564.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/ice23564.d(10): Error: cannot construct nested class `FreeList` because no implicit `this` reference to outer class `RBTree` is available +fail_compilation/ice23564.d(12): Error: cannot construct nested class `FreeList` because no implicit `this` reference to outer class `RBTree` is available + new FreeList; + ^ --- */ class BlockHeader diff --git a/compiler/test/fail_compilation/ice23569.d b/compiler/test/fail_compilation/ice23569.d index 6fdb71a39763..53e4c33a9703 100644 --- a/compiler/test/fail_compilation/ice23569.d +++ b/compiler/test/fail_compilation/ice23569.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice23569.d(24): Error: cannot compare classes for equality because `object.Object` was not declared +fail_compilation/ice23569.d(26): Error: cannot compare classes for equality because `object.Object` was not declared + auto ice23569 = new F(0) == new F(0); + ^ --- */ module object; diff --git a/compiler/test/fail_compilation/ice23781.d b/compiler/test/fail_compilation/ice23781.d index 7adc11607db3..3efc41079fcd 100644 --- a/compiler/test/fail_compilation/ice23781.d +++ b/compiler/test/fail_compilation/ice23781.d @@ -1,7 +1,9 @@ /** TEST_OUTPUT: --- -fail_compilation/ice23781.d(10): Error: variable `b` cannot be read at compile time +fail_compilation/ice23781.d(12): Error: variable `b` cannot be read at compile time +enum E2 = &E1.func1(); + ^ --- **/ struct Bar { int i; } diff --git a/compiler/test/fail_compilation/ice24188.d b/compiler/test/fail_compilation/ice24188.d index 50c06641455d..5e240880b3e8 100644 --- a/compiler/test/fail_compilation/ice24188.d +++ b/compiler/test/fail_compilation/ice24188.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: fail_compilation/ice24188_a/ice24188_c.d TEST_OUTPUT: --- -fail_compilation/ice24188.d(9): Error: module `ice24188_c` from file fail_compilation/ice24188_a/ice24188_c.d must be imported with 'import ice24188_c;' +fail_compilation/ice24188.d(11): Error: module `ice24188_c` from file fail_compilation/ice24188_a/ice24188_c.d must be imported with 'import ice24188_c;' + import fail_compilation.ice24188_a.ice24188_c : D; + ^ --- */ auto b() { diff --git a/compiler/test/fail_compilation/ice2843.d b/compiler/test/fail_compilation/ice2843.d index cf53e5d5f5bf..81c5bc53beee 100644 --- a/compiler/test/fail_compilation/ice2843.d +++ b/compiler/test/fail_compilation/ice2843.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice2843.d(22): Error: incompatible types for `(1) is (typeid(int))`: `int` and `object.TypeInfo` +fail_compilation/ice2843.d(24): Error: incompatible types for `(1) is (typeid(int))`: `int` and `object.TypeInfo` +bool b = 1 is typeid(int); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice4094.d b/compiler/test/fail_compilation/ice4094.d index 61108c4d7e05..97d2d7f2f42d 100644 --- a/compiler/test/fail_compilation/ice4094.d +++ b/compiler/test/fail_compilation/ice4094.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice4094.d(11): Error: circular reference to variable `ice4094.Zug!0.Zug.bahn` -fail_compilation/ice4094.d(19): Error: template instance `ice4094.Zug!0` error instantiating +fail_compilation/ice4094.d(15): Error: circular reference to variable `ice4094.Zug!0.Zug.bahn` + const bahn = Bug4094!(0).hof.bahn; + ^ +fail_compilation/ice4094.d(23): Error: template instance `ice4094.Zug!0` error instantiating +const a = Zug!(0).bahn; + ^ --- */ // REQUIRED_ARGS: -d diff --git a/compiler/test/fail_compilation/ice4983.d b/compiler/test/fail_compilation/ice4983.d index 00fa95cf5322..87f00474efda 100644 --- a/compiler/test/fail_compilation/ice4983.d +++ b/compiler/test/fail_compilation/ice4983.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice4983.d(14): Error: circular reference to `ice4983.Foo.dg` +fail_compilation/ice4983.d(16): Error: circular reference to `ice4983.Foo.dg` + void delegate() dg = &Foo.init.bar; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice5996.d b/compiler/test/fail_compilation/ice5996.d index eb2b53e86523..702215ecd39a 100644 --- a/compiler/test/fail_compilation/ice5996.d +++ b/compiler/test/fail_compilation/ice5996.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice5996.d(8): Error: undefined identifier `anyOldGarbage` +fail_compilation/ice5996.d(10): Error: undefined identifier `anyOldGarbage` + if (anyOldGarbage) {} + ^ --- */ auto bug5996() { diff --git a/compiler/test/fail_compilation/ice6538.d b/compiler/test/fail_compilation/ice6538.d index de9fe295dcac..383a7fc1afff 100644 --- a/compiler/test/fail_compilation/ice6538.d +++ b/compiler/test/fail_compilation/ice6538.d @@ -6,9 +6,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice6538.d(23): Error: template instance `Sym!(super)` expression `super` is not a valid template value argument -fail_compilation/ice6538.d(28): Error: template `foo` is not callable using argument types `!()()` -fail_compilation/ice6538.d(23): Candidate is: `foo()()` +fail_compilation/ice6538.d(29): Error: template instance `Sym!(super)` expression `super` is not a valid template value argument + void foo()() if (Sym!(super)) {} + ^ +fail_compilation/ice6538.d(34): Error: template `foo` is not callable using argument types `!()()` + d.foo(); + ^ +fail_compilation/ice6538.d(29): Candidate is: `foo()()` + void foo()() if (Sym!(super)) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice7645.d b/compiler/test/fail_compilation/ice7645.d index 3fd332c61b39..958b932e7f4a 100644 --- a/compiler/test/fail_compilation/ice7645.d +++ b/compiler/test/fail_compilation/ice7645.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice7645.d(28): Error: accessing non-static variable `t` requires an instance of `C2` -fail_compilation/ice7645.d(31): Error: calling non-static function `fn` requires an instance of type `S2` +fail_compilation/ice7645.d(32): Error: accessing non-static variable `t` requires an instance of `C2` + auto v = c.C2!().t; + ^ +fail_compilation/ice7645.d(35): Error: calling non-static function `fn` requires an instance of type `S2` + s.S2!int.fn(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice7782.d b/compiler/test/fail_compilation/ice7782.d index 551933b382d2..e2c788373ab6 100644 --- a/compiler/test/fail_compilation/ice7782.d +++ b/compiler/test/fail_compilation/ice7782.d @@ -2,8 +2,10 @@ EXTRA_FILES: imports/ice7782algorithm.d imports/ice7782range.d TEST_OUTPUT: ---- -fail_compilation/ice7782.d(14): Error: unable to read module `ice7782math` -fail_compilation/ice7782.d(14): Expected 'imports/ice7782range/imports/ice7782math.d' or 'imports/ice7782range/imports/ice7782math/package.d' in one of the following import paths: +fail_compilation/ice7782.d(16): Error: unable to read module `ice7782math` +import imports.ice7782range. imports.ice7782math; + ^ +fail_compilation/ice7782.d(16): Expected 'imports/ice7782range/imports/ice7782math.d' or 'imports/ice7782range/imports/ice7782math/package.d' in one of the following import paths: import path[0] = fail_compilation import path[1] = $p:druntime/import$ import path[2] = $p:phobos$ diff --git a/compiler/test/fail_compilation/ice8100.d b/compiler/test/fail_compilation/ice8100.d index b8b3155b688a..97cdb1982ac5 100644 --- a/compiler/test/fail_compilation/ice8100.d +++ b/compiler/test/fail_compilation/ice8100.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/ice8100.d(11): Error: no property `Q` for type `ice8100.Bar!bool` -fail_compilation/ice8100.d(12): class `Bar` defined here -fail_compilation/ice8100.d(12): Error: template instance `ice8100.Foo!(Bar!bool)` error instantiating -fail_compilation/ice8100.d(13): instantiated from here: `Bar!bool` +fail_compilation/ice8100.d(19): Error: no property `Q` for type `ice8100.Bar!bool` +class Foo(T1) { T1.Q r; } + ^ +fail_compilation/ice8100.d(20): class `Bar` defined here +class Bar(T2) : Foo!(Bar!T2) {} +^ +fail_compilation/ice8100.d(20): Error: template instance `ice8100.Foo!(Bar!bool)` error instantiating +class Bar(T2) : Foo!(Bar!T2) {} + ^ +fail_compilation/ice8100.d(21): instantiated from here: `Bar!bool` +Bar!bool b; +^ --- */ diff --git a/compiler/test/fail_compilation/ice8309.d b/compiler/test/fail_compilation/ice8309.d index 2446914477a1..8625f42c81aa 100644 --- a/compiler/test/fail_compilation/ice8309.d +++ b/compiler/test/fail_compilation/ice8309.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice8309.d(10): Error: incompatible types for `(__lambda1) : (__lambda2)`: `double function() pure nothrow @nogc @safe` and `int function() pure nothrow @nogc @safe` +fail_compilation/ice8309.d(12): Error: incompatible types for `(__lambda1) : (__lambda2)`: `double function() pure nothrow @nogc @safe` and `int function() pure nothrow @nogc @safe` + auto x = [()=>1.0, ()=>1]; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice8499.d b/compiler/test/fail_compilation/ice8499.d index 318883dc6243..374fcbccd35b 100644 --- a/compiler/test/fail_compilation/ice8499.d +++ b/compiler/test/fail_compilation/ice8499.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice8499.d(18): Error: undefined identifier `i` +fail_compilation/ice8499.d(20): Error: undefined identifier `i` + (Variant()).get!(typeof(() => i)); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice8604.d b/compiler/test/fail_compilation/ice8604.d index 3c179982fd95..6ad25ee94420 100644 --- a/compiler/test/fail_compilation/ice8604.d +++ b/compiler/test/fail_compilation/ice8604.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice8604.d(9): Error: undefined identifier `i` +fail_compilation/ice8604.d(11): Error: undefined identifier `i` + static if(i) { } + ^ --- */ struct StructFoo diff --git a/compiler/test/fail_compilation/ice8630.d b/compiler/test/fail_compilation/ice8630.d index a96ef34b6c0f..9592a235cc43 100644 --- a/compiler/test/fail_compilation/ice8630.d +++ b/compiler/test/fail_compilation/ice8630.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice8630.d(9): Error: undefined identifier `v` -fail_compilation/ice8630.d(10): Error: template instance `ice8630.foo!(int[])` error instantiating +fail_compilation/ice8630.d(13): Error: undefined identifier `v` +typeof(v) foo(R)(R v) { return map!(p=>p)(v); } + ^ +fail_compilation/ice8630.d(14): Error: template instance `ice8630.foo!(int[])` error instantiating +void main() { foo([1]); } + ^ --- */ auto map(alias func, R)(R r) { return r; } diff --git a/compiler/test/fail_compilation/ice8711.d b/compiler/test/fail_compilation/ice8711.d index d6674c4a743c..07d65ab20016 100644 --- a/compiler/test/fail_compilation/ice8711.d +++ b/compiler/test/fail_compilation/ice8711.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice8711.d(8): Error: cannot use array to initialize `int function(int)` +fail_compilation/ice8711.d(10): Error: cannot use array to initialize `int function(int)` +int function(int) foos = [x => 0]; + ^ --- */ diff --git a/compiler/test/fail_compilation/ice8742.d b/compiler/test/fail_compilation/ice8742.d index d8140710cf34..497c6fd0301f 100644 --- a/compiler/test/fail_compilation/ice8742.d +++ b/compiler/test/fail_compilation/ice8742.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice8742.d(15): Error: class `ice8742.main.__anonclass1` is nested within `main`, but super class `D` is nested within `C` +fail_compilation/ice8742.d(17): Error: class `ice8742.main.__anonclass1` is nested within `main`, but super class `D` is nested within `C` + auto d = c.new class C.D { }; + ^ --- */ class C diff --git a/compiler/test/fail_compilation/ice9013.d b/compiler/test/fail_compilation/ice9013.d index 47a451b55048..8d0b8aa5040d 100644 --- a/compiler/test/fail_compilation/ice9013.d +++ b/compiler/test/fail_compilation/ice9013.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9013.d(9): Error: undefined identifier `missing` +fail_compilation/ice9013.d(11): Error: undefined identifier `missing` + foreach (i; 0 .. missing) + ^ --- */ void main() diff --git a/compiler/test/fail_compilation/ice9254a.d b/compiler/test/fail_compilation/ice9254a.d index 8ba1cbf0737c..d9b2b657d51e 100644 --- a/compiler/test/fail_compilation/ice9254a.d +++ b/compiler/test/fail_compilation/ice9254a.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9254a.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254a.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254a.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254a.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254a.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254a.d(15): Error: invalid `foreach` aggregate `false` of type `bool` +fail_compilation/ice9254a.d(27): Error: using the result of a comma expression is not allowed + foreach (divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254a.d(27): Error: using the result of a comma expression is not allowed + foreach (divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254a.d(27): Error: using the result of a comma expression is not allowed + foreach (divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254a.d(27): Error: using the result of a comma expression is not allowed + foreach (divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254a.d(27): Error: using the result of a comma expression is not allowed + foreach (divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254a.d(27): Error: invalid `foreach` aggregate `false` of type `bool` + foreach (divisor; !(2, 3, 4, 8, 7, 9)) + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9254b.d b/compiler/test/fail_compilation/ice9254b.d index 04f28fd3997e..b5b3aa444662 100644 --- a/compiler/test/fail_compilation/ice9254b.d +++ b/compiler/test/fail_compilation/ice9254b.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9254b.d(17): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254b.d(17): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254b.d(17): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254b.d(17): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254b.d(17): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254b.d(17): Error: invalid `foreach` aggregate `false` of type `bool` +fail_compilation/ice9254b.d(29): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254b.d(29): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254b.d(29): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254b.d(29): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254b.d(29): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254b.d(29): Error: invalid `foreach` aggregate `false` of type `bool` + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9254c.d b/compiler/test/fail_compilation/ice9254c.d index acecc8d178c6..fa17af562d6b 100644 --- a/compiler/test/fail_compilation/ice9254c.d +++ b/compiler/test/fail_compilation/ice9254c.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254c.d(15): Error: using the result of a comma expression is not allowed -fail_compilation/ice9254c.d(15): Error: invalid `foreach` aggregate `false` of type `bool` +fail_compilation/ice9254c.d(27): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254c.d(27): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254c.d(27): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254c.d(27): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254c.d(27): Error: using the result of a comma expression is not allowed + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ +fail_compilation/ice9254c.d(27): Error: invalid `foreach` aggregate `false` of type `bool` + foreach(divisor; !(2, 3, 4, 8, 7, 9)) + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9273a.d b/compiler/test/fail_compilation/ice9273a.d index c2f44a344ade..9abd379b074a 100644 --- a/compiler/test/fail_compilation/ice9273a.d +++ b/compiler/test/fail_compilation/ice9273a.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9273a.d(19): Error: constructor `ice9273a.C.__ctor!().this` no match for implicit `super()` call in constructor -fail_compilation/ice9273a.d(23): Error: template instance `ice9273a.C.__ctor!()` error instantiating +fail_compilation/ice9273a.d(23): Error: constructor `ice9273a.C.__ctor!().this` no match for implicit `super()` call in constructor + this()() {} + ^ +fail_compilation/ice9273a.d(27): Error: template instance `ice9273a.C.__ctor!()` error instantiating + auto c = new C(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9273b.d b/compiler/test/fail_compilation/ice9273b.d index 2d057246cbd8..021811cdd6b4 100644 --- a/compiler/test/fail_compilation/ice9273b.d +++ b/compiler/test/fail_compilation/ice9273b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9273b.d(14): Error: constructor `ice9273b.B.this` no match for implicit `super()` call in constructor +fail_compilation/ice9273b.d(16): Error: constructor `ice9273b.B.this` no match for implicit `super()` call in constructor + this() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9284.d b/compiler/test/fail_compilation/ice9284.d index 1e87f0a141d9..62ec2ea33d82 100644 --- a/compiler/test/fail_compilation/ice9284.d +++ b/compiler/test/fail_compilation/ice9284.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9284.d(14): Error: template `__ctor` is not callable using argument types `!()(int)` -fail_compilation/ice9284.d(12): Candidate is: `this()(string)` -fail_compilation/ice9284.d(20): Error: template instance `ice9284.C.__ctor!()` error instantiating +fail_compilation/ice9284.d(20): Error: template `__ctor` is not callable using argument types `!()(int)` + this(10); + ^ +fail_compilation/ice9284.d(18): Candidate is: `this()(string)` + this()(string) + ^ +fail_compilation/ice9284.d(26): Error: template instance `ice9284.C.__ctor!()` error instantiating + new C("hello"); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9291.d b/compiler/test/fail_compilation/ice9291.d index a662eaf21bb0..0cb6a67a6e35 100644 --- a/compiler/test/fail_compilation/ice9291.d +++ b/compiler/test/fail_compilation/ice9291.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9291.d(10): Error: undefined identifier `F` +fail_compilation/ice9291.d(12): Error: undefined identifier `F` + throw new F(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9338.d b/compiler/test/fail_compilation/ice9338.d index 5f77817d7e34..59c732e59fd0 100644 --- a/compiler/test/fail_compilation/ice9338.d +++ b/compiler/test/fail_compilation/ice9338.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9338.d(13): Error: value of `this` is not known at compile time -fail_compilation/ice9338.d(14): Error: value of `this` is not known at compile time +fail_compilation/ice9338.d(17): Error: value of `this` is not known at compile time + enum members1 = makeArray(); + ^ +fail_compilation/ice9338.d(18): Error: value of `this` is not known at compile time + enum members2 = this.makeArray(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9406.d b/compiler/test/fail_compilation/ice9406.d index c1807a0f542c..55f58900206b 100644 --- a/compiler/test/fail_compilation/ice9406.d +++ b/compiler/test/fail_compilation/ice9406.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9406.d(22): Error: `s1.mixin Mixin!() t1; +fail_compilation/ice9406.d(24): Error: `s1.mixin Mixin!() t1; ` has no effect + s1.t1!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9439.d b/compiler/test/fail_compilation/ice9439.d index 9f08e404be53..72168b95b3a7 100644 --- a/compiler/test/fail_compilation/ice9439.d +++ b/compiler/test/fail_compilation/ice9439.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9439.d(12): Error: calling non-static function `foo` requires an instance of type `Derived` -fail_compilation/ice9439.d(12): while evaluating: `static assert(foo())` -fail_compilation/ice9439.d(19): Error: template instance `ice9439.Base.boo!(foo)` error instantiating +fail_compilation/ice9439.d(18): Error: calling non-static function `foo` requires an instance of type `Derived` + static assert(F()); + ^ +fail_compilation/ice9439.d(18): while evaluating: `static assert(foo())` + static assert(F()); + ^ +fail_compilation/ice9439.d(25): Error: template instance `ice9439.Base.boo!(foo)` error instantiating + boo!(foo)(); + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9494.d b/compiler/test/fail_compilation/ice9494.d index 732b88a99262..ba564552e0b2 100644 --- a/compiler/test/fail_compilation/ice9494.d +++ b/compiler/test/fail_compilation/ice9494.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9494.d(10): Error: circular reference to variable `ice9494.test` -fail_compilation/ice9494.d(14): Error: circular reference to variable `ice9494.Foo.test` -fail_compilation/ice9494.d(19): Error: circular reference to variable `ice9494.Bar.test` +fail_compilation/ice9494.d(16): Error: circular reference to variable `ice9494.test` +int[test] test; // stack overflow + ^ +fail_compilation/ice9494.d(20): Error: circular reference to variable `ice9494.Foo.test` + int[this.test] test; // stack overflow + ^ +fail_compilation/ice9494.d(25): Error: circular reference to variable `ice9494.Bar.test` + int[this.test] test; // stack overflow + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9540.d b/compiler/test/fail_compilation/ice9540.d index 662038c19cf9..18d5206993f8 100644 --- a/compiler/test/fail_compilation/ice9540.d +++ b/compiler/test/fail_compilation/ice9540.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice9540.d(36): Error: function `dg` is not callable using argument types `()` -fail_compilation/ice9540.d(36): too few arguments, expected 1, got 0 -fail_compilation/ice9540.d(33): `ice9540.A.test.AddFront!(this, f).AddFront.dg(int __param_0)` declared here -fail_compilation/ice9540.d(27): Error: template instance `ice9540.A.test.AddFront!(this, f)` error instantiating +fail_compilation/ice9540.d(42): Error: function `dg` is not callable using argument types `()` + dg.ptr = ctx; + ^ +fail_compilation/ice9540.d(42): too few arguments, expected 1, got 0 +fail_compilation/ice9540.d(39): `ice9540.A.test.AddFront!(this, f).AddFront.dg(int __param_0)` declared here + auto dg (Args dgArgs) { + ^ +fail_compilation/ice9540.d(33): Error: template instance `ice9540.A.test.AddFront!(this, f)` error instantiating + test1 (&AddFront!(this, f)); + ^ ---- */ diff --git a/compiler/test/fail_compilation/ice9545.d b/compiler/test/fail_compilation/ice9545.d index 7360bc534f2a..ef4da86a0be2 100644 --- a/compiler/test/fail_compilation/ice9545.d +++ b/compiler/test/fail_compilation/ice9545.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: ---- -fail_compilation/ice9545.d(13): Error: type `int` has no value +fail_compilation/ice9545.d(15): Error: type `int` has no value + auto x1 = S.init.T!int; // ICE + ^ ---- */ diff --git a/compiler/test/fail_compilation/ice9759.d b/compiler/test/fail_compilation/ice9759.d index 6608b58fc0b6..8a7ee3a85301 100644 --- a/compiler/test/fail_compilation/ice9759.d +++ b/compiler/test/fail_compilation/ice9759.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/ice9759.d(25): Error: mutable method `ice9759.Json.opAssign` is not callable using a `const` object -fail_compilation/ice9759.d(17): Consider adding `const` or `inout` here +fail_compilation/ice9759.d(29): Error: mutable method `ice9759.Json.opAssign` is not callable using a `const` object + r = r.init; + ^ +fail_compilation/ice9759.d(21): Consider adding `const` or `inout` here + void opAssign(Json v) + ^ --- */ diff --git a/compiler/test/fail_compilation/ice9865.d b/compiler/test/fail_compilation/ice9865.d index 3d8e997946f7..c25b7f5070f5 100644 --- a/compiler/test/fail_compilation/ice9865.d +++ b/compiler/test/fail_compilation/ice9865.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/ice9865b.d TEST_OUTPUT: --- -fail_compilation/ice9865.d(9): Error: alias `ice9865.Baz` recursive alias declaration +fail_compilation/ice9865.d(11): Error: alias `ice9865.Baz` recursive alias declaration +public import imports.ice9865b : Baz; + ^ --- */ diff --git a/compiler/test/fail_compilation/iconv_interface_array.d b/compiler/test/fail_compilation/iconv_interface_array.d index 53c145083586..38b38c06c097 100644 --- a/compiler/test/fail_compilation/iconv_interface_array.d +++ b/compiler/test/fail_compilation/iconv_interface_array.d @@ -1,15 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/iconv_interface_array.d(48): Error: function `testA` is not callable using argument types `(C[4])` -fail_compilation/iconv_interface_array.d(48): cannot pass argument `arr` of type `C[4]` to parameter `I1[4] arr` -fail_compilation/iconv_interface_array.d(27): `iconv_interface_array.testA(I1[4] arr)` declared here -fail_compilation/iconv_interface_array.d(49): Error: function `testB` is not callable using argument types `(C[4])` -fail_compilation/iconv_interface_array.d(49): cannot pass argument `arr` of type `C[4]` to parameter `I2[4] arr` -fail_compilation/iconv_interface_array.d(33): `iconv_interface_array.testB(I2[4] arr)` declared here -fail_compilation/iconv_interface_array.d(50): Error: function `testC` is not callable using argument types `(C[4])` -fail_compilation/iconv_interface_array.d(50): cannot pass argument `arr` of type `C[4]` to parameter `I3[4] arr` -fail_compilation/iconv_interface_array.d(39): `iconv_interface_array.testC(I3[4] arr)` declared here +fail_compilation/iconv_interface_array.d(60): Error: function `testA` is not callable using argument types `(C[4])` + testA(arr); + ^ +fail_compilation/iconv_interface_array.d(60): cannot pass argument `arr` of type `C[4]` to parameter `I1[4] arr` +fail_compilation/iconv_interface_array.d(39): `iconv_interface_array.testA(I1[4] arr)` declared here +void testA(I1[4] arr) + ^ +fail_compilation/iconv_interface_array.d(61): Error: function `testB` is not callable using argument types `(C[4])` + testB(arr); + ^ +fail_compilation/iconv_interface_array.d(61): cannot pass argument `arr` of type `C[4]` to parameter `I2[4] arr` +fail_compilation/iconv_interface_array.d(45): `iconv_interface_array.testB(I2[4] arr)` declared here +void testB(I2[4] arr) + ^ +fail_compilation/iconv_interface_array.d(62): Error: function `testC` is not callable using argument types `(C[4])` + testC(arr); + ^ +fail_compilation/iconv_interface_array.d(62): cannot pass argument `arr` of type `C[4]` to parameter `I3[4] arr` +fail_compilation/iconv_interface_array.d(51): `iconv_interface_array.testC(I3[4] arr)` declared here +void testC(I3[4] arr) + ^ --- */ diff --git a/compiler/test/fail_compilation/immutable_ctor.d b/compiler/test/fail_compilation/immutable_ctor.d index 408e4027fd6a..0de1fdaa5093 100644 --- a/compiler/test/fail_compilation/immutable_ctor.d +++ b/compiler/test/fail_compilation/immutable_ctor.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/immutable_ctor.d(18): Error: `immutable` copy constructor `immutable_ctor.S1.this` cannot construct a mutable object +fail_compilation/immutable_ctor.d(20): Error: `immutable` copy constructor `immutable_ctor.S1.this` cannot construct a mutable object + S1 ms1 = s1; + ^ --- */ diff --git a/compiler/test/fail_compilation/imphint.d b/compiler/test/fail_compilation/imphint.d index 7ca81f47aa5d..dc6b273a17ec 100644 --- a/compiler/test/fail_compilation/imphint.d +++ b/compiler/test/fail_compilation/imphint.d @@ -1,53 +1,147 @@ /* TEST_OUTPUT: --- -fail_compilation/imphint.d(60): Error: `printf` is not defined, perhaps `import core.stdc.stdio;` is needed? -fail_compilation/imphint.d(61): Error: `writeln` is not defined, perhaps `import std.stdio;` is needed? -fail_compilation/imphint.d(62): Error: `sin` is not defined, perhaps `import std.math;` is needed? -fail_compilation/imphint.d(63): Error: `cos` is not defined, perhaps `import std.math;` is needed? -fail_compilation/imphint.d(64): Error: `sqrt` is not defined, perhaps `import std.math;` is needed? -fail_compilation/imphint.d(65): Error: `fabs` is not defined, perhaps `import std.math;` is needed? -fail_compilation/imphint.d(68): Error: `AliasSeq` is not defined, perhaps `import std.meta;` is needed? -fail_compilation/imphint.d(69): Error: `appender` is not defined, perhaps `import std.array;` is needed? -fail_compilation/imphint.d(70): Error: `array` is not defined, perhaps `import std.array;` is needed? -fail_compilation/imphint.d(71): Error: `calloc` is not defined, perhaps `import core.stdc.stdlib;` is needed? -fail_compilation/imphint.d(72): Error: `chdir` is not defined, perhaps `import std.file;` is needed? -fail_compilation/imphint.d(73): Error: `dirEntries` is not defined, perhaps `import std.file;` is needed? -fail_compilation/imphint.d(74): Error: `drop` is not defined, perhaps `import std.range;` is needed? -fail_compilation/imphint.d(75): Error: `each` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(76): Error: `empty` is not defined, perhaps `import std.range;` is needed? -fail_compilation/imphint.d(77): Error: `enumerate` is not defined, perhaps `import std.range;` is needed? -fail_compilation/imphint.d(78): Error: `endsWith` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(79): Error: `enforce` is not defined, perhaps `import std.exception;` is needed? -fail_compilation/imphint.d(80): Error: `equal` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(81): Error: `exists` is not defined, perhaps `import std.file;` is needed? -fail_compilation/imphint.d(82): Error: `filter` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(83): Error: `format` is not defined, perhaps `import std.format;` is needed? -fail_compilation/imphint.d(84): Error: `free` is not defined, perhaps `import core.stdc.stdlib;` is needed? -fail_compilation/imphint.d(85): Error: `front` is not defined, perhaps `import std.range;` is needed? -fail_compilation/imphint.d(86): Error: `iota` is not defined, perhaps `import std.range;` is needed? -fail_compilation/imphint.d(87): Error: `isDir` is not defined, perhaps `import std.file;` is needed? -fail_compilation/imphint.d(88): Error: `isFile` is not defined, perhaps `import std.file;` is needed? -fail_compilation/imphint.d(89): Error: `join` is not defined, perhaps `import std.array;` is needed? -fail_compilation/imphint.d(90): Error: `joiner` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(91): Error: `malloc` is not defined, perhaps `import core.stdc.stdlib;` is needed? -fail_compilation/imphint.d(92): Error: `map` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(93): Error: `max` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(94): Error: `min` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(95): Error: `mkdir` is not defined, perhaps `import std.file;` is needed? -fail_compilation/imphint.d(96): Error: `popFront` is not defined, perhaps `import std.range;` is needed? -fail_compilation/imphint.d(97): Error: `realloc` is not defined, perhaps `import core.stdc.stdlib;` is needed? -fail_compilation/imphint.d(98): Error: `replace` is not defined, perhaps `import std.array;` is needed? -fail_compilation/imphint.d(99): Error: `rmdir` is not defined, perhaps `import std.file;` is needed? -fail_compilation/imphint.d(100): Error: `sort` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(101): Error: `split` is not defined, perhaps `import std.array;` is needed? -fail_compilation/imphint.d(102): Error: `startsWith` is not defined, perhaps `import std.algorithm;` is needed? -fail_compilation/imphint.d(103): Error: `take` is not defined, perhaps `import std.range;` is needed? -fail_compilation/imphint.d(104): Error: `text` is not defined, perhaps `import std.conv;` is needed? -fail_compilation/imphint.d(105): Error: `to` is not defined, perhaps `import std.conv;` is needed? -fail_compilation/imphint.d(107): Error: `InterpolationHeader` is not defined, perhaps `import core.interpolation;` ? -fail_compilation/imphint.d(108): Error: template `heresy` is not callable using argument types `!()(InterpolationHeader, InterpolationFooter)` -fail_compilation/imphint.d(107): Candidate is: `heresy(Args...)(InterpolationHeader header, Args args, InterpolationFooter footer)` +fail_compilation/imphint.d(154): Error: `printf` is not defined, perhaps `import core.stdc.stdio;` is needed? + printf("hello world\n"); + ^ +fail_compilation/imphint.d(155): Error: `writeln` is not defined, perhaps `import std.stdio;` is needed? + writeln("hello world\n"); + ^ +fail_compilation/imphint.d(156): Error: `sin` is not defined, perhaps `import std.math;` is needed? + sin(3.6); + ^ +fail_compilation/imphint.d(157): Error: `cos` is not defined, perhaps `import std.math;` is needed? + cos(1.2); + ^ +fail_compilation/imphint.d(158): Error: `sqrt` is not defined, perhaps `import std.math;` is needed? + sqrt(2.0); + ^ +fail_compilation/imphint.d(159): Error: `fabs` is not defined, perhaps `import std.math;` is needed? + fabs(-3); + ^ +fail_compilation/imphint.d(162): Error: `AliasSeq` is not defined, perhaps `import std.meta;` is needed? + AliasSeq(); + ^ +fail_compilation/imphint.d(163): Error: `appender` is not defined, perhaps `import std.array;` is needed? + appender(); + ^ +fail_compilation/imphint.d(164): Error: `array` is not defined, perhaps `import std.array;` is needed? + array(); + ^ +fail_compilation/imphint.d(165): Error: `calloc` is not defined, perhaps `import core.stdc.stdlib;` is needed? + calloc(); + ^ +fail_compilation/imphint.d(166): Error: `chdir` is not defined, perhaps `import std.file;` is needed? + chdir(); + ^ +fail_compilation/imphint.d(167): Error: `dirEntries` is not defined, perhaps `import std.file;` is needed? + dirEntries(); + ^ +fail_compilation/imphint.d(168): Error: `drop` is not defined, perhaps `import std.range;` is needed? + drop(); + ^ +fail_compilation/imphint.d(169): Error: `each` is not defined, perhaps `import std.algorithm;` is needed? + each(); + ^ +fail_compilation/imphint.d(170): Error: `empty` is not defined, perhaps `import std.range;` is needed? + empty(); + ^ +fail_compilation/imphint.d(171): Error: `enumerate` is not defined, perhaps `import std.range;` is needed? + enumerate(); + ^ +fail_compilation/imphint.d(172): Error: `endsWith` is not defined, perhaps `import std.algorithm;` is needed? + endsWith(); + ^ +fail_compilation/imphint.d(173): Error: `enforce` is not defined, perhaps `import std.exception;` is needed? + enforce(); + ^ +fail_compilation/imphint.d(174): Error: `equal` is not defined, perhaps `import std.algorithm;` is needed? + equal(); + ^ +fail_compilation/imphint.d(175): Error: `exists` is not defined, perhaps `import std.file;` is needed? + exists(); + ^ +fail_compilation/imphint.d(176): Error: `filter` is not defined, perhaps `import std.algorithm;` is needed? + filter(); + ^ +fail_compilation/imphint.d(177): Error: `format` is not defined, perhaps `import std.format;` is needed? + format(); + ^ +fail_compilation/imphint.d(178): Error: `free` is not defined, perhaps `import core.stdc.stdlib;` is needed? + free(); + ^ +fail_compilation/imphint.d(179): Error: `front` is not defined, perhaps `import std.range;` is needed? + front(); + ^ +fail_compilation/imphint.d(180): Error: `iota` is not defined, perhaps `import std.range;` is needed? + iota(); + ^ +fail_compilation/imphint.d(181): Error: `isDir` is not defined, perhaps `import std.file;` is needed? + isDir(); + ^ +fail_compilation/imphint.d(182): Error: `isFile` is not defined, perhaps `import std.file;` is needed? + isFile(); + ^ +fail_compilation/imphint.d(183): Error: `join` is not defined, perhaps `import std.array;` is needed? + join(); + ^ +fail_compilation/imphint.d(184): Error: `joiner` is not defined, perhaps `import std.algorithm;` is needed? + joiner(); + ^ +fail_compilation/imphint.d(185): Error: `malloc` is not defined, perhaps `import core.stdc.stdlib;` is needed? + malloc(); + ^ +fail_compilation/imphint.d(186): Error: `map` is not defined, perhaps `import std.algorithm;` is needed? + map(); + ^ +fail_compilation/imphint.d(187): Error: `max` is not defined, perhaps `import std.algorithm;` is needed? + max(); + ^ +fail_compilation/imphint.d(188): Error: `min` is not defined, perhaps `import std.algorithm;` is needed? + min(); + ^ +fail_compilation/imphint.d(189): Error: `mkdir` is not defined, perhaps `import std.file;` is needed? + mkdir(); + ^ +fail_compilation/imphint.d(190): Error: `popFront` is not defined, perhaps `import std.range;` is needed? + popFront(); + ^ +fail_compilation/imphint.d(191): Error: `realloc` is not defined, perhaps `import core.stdc.stdlib;` is needed? + realloc(); + ^ +fail_compilation/imphint.d(192): Error: `replace` is not defined, perhaps `import std.array;` is needed? + replace(); + ^ +fail_compilation/imphint.d(193): Error: `rmdir` is not defined, perhaps `import std.file;` is needed? + rmdir(); + ^ +fail_compilation/imphint.d(194): Error: `sort` is not defined, perhaps `import std.algorithm;` is needed? + sort(); + ^ +fail_compilation/imphint.d(195): Error: `split` is not defined, perhaps `import std.array;` is needed? + split(); + ^ +fail_compilation/imphint.d(196): Error: `startsWith` is not defined, perhaps `import std.algorithm;` is needed? + startsWith(); + ^ +fail_compilation/imphint.d(197): Error: `take` is not defined, perhaps `import std.range;` is needed? + take(); + ^ +fail_compilation/imphint.d(198): Error: `text` is not defined, perhaps `import std.conv;` is needed? + text(); + ^ +fail_compilation/imphint.d(199): Error: `to` is not defined, perhaps `import std.conv;` is needed? + to(); + ^ +fail_compilation/imphint.d(201): Error: `InterpolationHeader` is not defined, perhaps `import core.interpolation;` ? + void heresy(Args...)(InterpolationHeader header, Args args, InterpolationFooter footer) {} + ^ +fail_compilation/imphint.d(202): Error: template `heresy` is not callable using argument types `!()(InterpolationHeader, InterpolationFooter)` + heresy(i""); + ^ +fail_compilation/imphint.d(201): Candidate is: `heresy(Args...)(InterpolationHeader header, Args args, InterpolationFooter footer)` + void heresy(Args...)(InterpolationHeader header, Args args, InterpolationFooter footer) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/interpolatedexpressionsequence_postfix.d b/compiler/test/fail_compilation/interpolatedexpressionsequence_postfix.d index c915c446b499..5282fd29698f 100644 --- a/compiler/test/fail_compilation/interpolatedexpressionsequence_postfix.d +++ b/compiler/test/fail_compilation/interpolatedexpressionsequence_postfix.d @@ -1,8 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/interpolatedexpressionsequence_postfix.d(10): Error: String postfixes on interpolated expression sequences are not allowed. -fail_compilation/interpolatedexpressionsequence_postfix.d(11): Error: String postfixes on interpolated expression sequences are not allowed. -fail_compilation/interpolatedexpressionsequence_postfix.d(12): Error: String postfixes on interpolated expression sequences are not allowed. +fail_compilation/interpolatedexpressionsequence_postfix.d(16): Error: String postfixes on interpolated expression sequences are not allowed. + auto c = i"foo"c; + ^ +fail_compilation/interpolatedexpressionsequence_postfix.d(17): Error: String postfixes on interpolated expression sequences are not allowed. + auto w = i"foo"w; + ^ +fail_compilation/interpolatedexpressionsequence_postfix.d(18): Error: String postfixes on interpolated expression sequences are not allowed. + auto d = i"foo"d; + ^ --- */ void main() { diff --git a/compiler/test/fail_compilation/isreturnonstack.d b/compiler/test/fail_compilation/isreturnonstack.d index 1dde6991baab..f31ba344441a 100644 --- a/compiler/test/fail_compilation/isreturnonstack.d +++ b/compiler/test/fail_compilation/isreturnonstack.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/isreturnonstack.d(11): Error: argument to `__traits(isReturnOnStack, int)` is not a function -fail_compilation/isreturnonstack.d(12): Error: expected 1 arguments for `isReturnOnStack` but had 2 +fail_compilation/isreturnonstack.d(15): Error: argument to `__traits(isReturnOnStack, int)` is not a function +enum b = __traits(isReturnOnStack, int); + ^ +fail_compilation/isreturnonstack.d(16): Error: expected 1 arguments for `isReturnOnStack` but had 2 +enum c = __traits(isReturnOnStack, test, int); + ^ --- */ diff --git a/compiler/test/fail_compilation/issue11070.d b/compiler/test/fail_compilation/issue11070.d index 07d69ee87ab5..b06fcb044ab4 100644 --- a/compiler/test/fail_compilation/issue11070.d +++ b/compiler/test/fail_compilation/issue11070.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/issue11070.d(16): Error: undefined identifier `x` +fail_compilation/issue11070.d(18): Error: undefined identifier `x` + x = 1; + ^ --- */ diff --git a/compiler/test/fail_compilation/issue15103.d b/compiler/test/fail_compilation/issue15103.d index c4a67eb8f715..08ae272da94c 100644 --- a/compiler/test/fail_compilation/issue15103.d +++ b/compiler/test/fail_compilation/issue15103.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: ---- -fail_compilation/issue15103.d(22): Error: found `(` when expecting `;` or `=`, did you mean `Foo foo = 42`? -fail_compilation/issue15103.d(23): Error: found `(` when expecting `;` or `=`, did you mean `Boo boo = 43`? -fail_compilation/issue15103.d(24): Error: found `(` when expecting `;` or `=`, did you mean `string y = "a string"`? +fail_compilation/issue15103.d(28): Error: found `(` when expecting `;` or `=`, did you mean `Foo foo = 42`? + Foo foo(42); + ^ +fail_compilation/issue15103.d(29): Error: found `(` when expecting `;` or `=`, did you mean `Boo boo = 43`? + Boo boo(43); + ^ +fail_compilation/issue15103.d(30): Error: found `(` when expecting `;` or `=`, did you mean `string y = "a string"`? + string y("a string"); + ^ --- */ diff --git a/compiler/test/fail_compilation/issue16020.d b/compiler/test/fail_compilation/issue16020.d index 79eda2ea08c1..db848181f785 100644 --- a/compiler/test/fail_compilation/issue16020.d +++ b/compiler/test/fail_compilation/issue16020.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: --- -fail_compilation/issue16020.d(13): Error: user-defined attributes not allowed for `alias` declarations -fail_compilation/issue16020.d(14): Error: semicolon expected to close `alias` declaration, not `(` -fail_compilation/issue16020.d(14): Error: declaration expected, not `(` -fail_compilation/issue16020.d(15): Deprecation: storage class `final` has no effect in type aliases +fail_compilation/issue16020.d(19): Error: user-defined attributes not allowed for `alias` declarations +alias Fun = @UDA void(); + ^ +fail_compilation/issue16020.d(20): Error: semicolon expected to close `alias` declaration, not `(` +alias FunTemplate = void(T)(T t); + ^ +fail_compilation/issue16020.d(20): Error: declaration expected, not `(` +alias FunTemplate = void(T)(T t); + ^ +fail_compilation/issue16020.d(21): Deprecation: storage class `final` has no effect in type aliases --- */ module issue16020; diff --git a/compiler/test/fail_compilation/issue20422.d b/compiler/test/fail_compilation/issue20422.d index 9dcab004d2c5..251047edaabd 100644 --- a/compiler/test/fail_compilation/issue20422.d +++ b/compiler/test/fail_compilation/issue20422.d @@ -4,10 +4,18 @@ REQUIRED_ARGS: -m32 TEST_OUTPUT: --- -fail_compilation/issue20422.d(15): Error: missing length argument for array -fail_compilation/issue20422.d(16): Error: negative array dimension `-1` -fail_compilation/issue20422.d(17): Error: negative array dimension `-2147483648` -fail_compilation/issue20422.d(18): Error: too many arguments for array +fail_compilation/issue20422.d(23): Error: missing length argument for array + new int[]; + ^ +fail_compilation/issue20422.d(24): Error: negative array dimension `-1` + new int[-1]; + ^ +fail_compilation/issue20422.d(25): Error: negative array dimension `-2147483648` + new int[](int.min); + ^ +fail_compilation/issue20422.d(26): Error: too many arguments for array + new int[](1, 2); + ^ --- */ diff --git a/compiler/test/fail_compilation/issue20627.d b/compiler/test/fail_compilation/issue20627.d index ff08c6a2d704..07081e4ee700 100644 --- a/compiler/test/fail_compilation/issue20627.d +++ b/compiler/test/fail_compilation/issue20627.d @@ -2,18 +2,42 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/issue20627.d(38): Deprecation: `shared static` constructor can only be of D linkage -fail_compilation/issue20627.d(39): Deprecation: `shared static` destructor can only be of D linkage -fail_compilation/issue20627.d(40): Deprecation: `static` constructor can only be of D linkage -fail_compilation/issue20627.d(41): Deprecation: `static` destructor can only be of D linkage -fail_compilation/issue20627.d(55): Deprecation: `shared static` constructor can only be of D linkage -fail_compilation/issue20627.d(56): Deprecation: `shared static` destructor can only be of D linkage -fail_compilation/issue20627.d(57): Deprecation: `static` constructor can only be of D linkage -fail_compilation/issue20627.d(58): Deprecation: `static` destructor can only be of D linkage -fail_compilation/issue20627.d(63): Deprecation: `shared static` constructor can only be of D linkage -fail_compilation/issue20627.d(64): Deprecation: `shared static` destructor can only be of D linkage -fail_compilation/issue20627.d(65): Deprecation: `static` constructor can only be of D linkage -fail_compilation/issue20627.d(66): Deprecation: `static` destructor can only be of D linkage +fail_compilation/issue20627.d(62): Deprecation: `shared static` constructor can only be of D linkage + shared static this () {} + ^ +fail_compilation/issue20627.d(63): Deprecation: `shared static` destructor can only be of D linkage + shared static ~this () {} + ^ +fail_compilation/issue20627.d(64): Deprecation: `static` constructor can only be of D linkage + static this () {} + ^ +fail_compilation/issue20627.d(65): Deprecation: `static` destructor can only be of D linkage + static ~this () {} + ^ +fail_compilation/issue20627.d(79): Deprecation: `shared static` constructor can only be of D linkage + shared static this () {} + ^ +fail_compilation/issue20627.d(80): Deprecation: `shared static` destructor can only be of D linkage + shared static ~this () {} + ^ +fail_compilation/issue20627.d(81): Deprecation: `static` constructor can only be of D linkage + static this () {} + ^ +fail_compilation/issue20627.d(82): Deprecation: `static` destructor can only be of D linkage + static ~this () {} + ^ +fail_compilation/issue20627.d(87): Deprecation: `shared static` constructor can only be of D linkage + shared static this () {} + ^ +fail_compilation/issue20627.d(88): Deprecation: `shared static` destructor can only be of D linkage + shared static ~this () {} + ^ +fail_compilation/issue20627.d(89): Deprecation: `static` constructor can only be of D linkage + static this () {} + ^ +fail_compilation/issue20627.d(90): Deprecation: `static` destructor can only be of D linkage + static ~this () {} + ^ --- */ diff --git a/compiler/test/fail_compilation/issue20704.d b/compiler/test/fail_compilation/issue20704.d index ba91b0635724..e950be1f75db 100644 --- a/compiler/test/fail_compilation/issue20704.d +++ b/compiler/test/fail_compilation/issue20704.d @@ -1,13 +1,29 @@ /* TEST_OUTPUT: --- -fail_compilation/issue20704.d(17): Error: cannot create default argument for `ref` / `out` parameter from constant `0` -fail_compilation/issue20704.d(28): Error: template instance `issue20704.f2!int` error instantiating -fail_compilation/issue20704.d(19): Error: cannot create default argument for `ref` / `out` parameter from constant `0` -fail_compilation/issue20704.d(30): Error: template instance `issue20704.f4!int` error instantiating -fail_compilation/issue20704.d(17): Error: cannot create default argument for `ref` / `out` parameter from expression `S(0)` because it is not an lvalue -fail_compilation/issue20704.d(36): Error: template instance `issue20704.f2!(S)` error instantiating -fail_compilation/issue20704.d(17): Error: cannot create default argument for `ref` / `out` parameter from expression `null` because it is not an lvalue -fail_compilation/issue20704.d(38): Error: template instance `issue20704.f2!(C)` error instantiating +fail_compilation/issue20704.d(33): Error: cannot create default argument for `ref` / `out` parameter from constant `0` +void f2(T)(const ref T arg = T.init) {} + ^ +fail_compilation/issue20704.d(44): Error: template instance `issue20704.f2!int` error instantiating + f2!int(i); + ^ +fail_compilation/issue20704.d(35): Error: cannot create default argument for `ref` / `out` parameter from constant `0` +void f4(T)(const ref T arg = 0) {} + ^ +fail_compilation/issue20704.d(46): Error: template instance `issue20704.f4!int` error instantiating + f4!int(i); + ^ +fail_compilation/issue20704.d(33): Error: cannot create default argument for `ref` / `out` parameter from expression `S(0)` because it is not an lvalue +void f2(T)(const ref T arg = T.init) {} + ^ +fail_compilation/issue20704.d(52): Error: template instance `issue20704.f2!(S)` error instantiating + f2!S(); + ^ +fail_compilation/issue20704.d(33): Error: cannot create default argument for `ref` / `out` parameter from expression `null` because it is not an lvalue +void f2(T)(const ref T arg = T.init) {} + ^ +fail_compilation/issue20704.d(54): Error: template instance `issue20704.f2!(C)` error instantiating + f2!C(); + ^ --- */ diff --git a/compiler/test/fail_compilation/issue21203.d b/compiler/test/fail_compilation/issue21203.d index 7679d673c9e9..d48cb958eaf3 100644 --- a/compiler/test/fail_compilation/issue21203.d +++ b/compiler/test/fail_compilation/issue21203.d @@ -3,8 +3,10 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/issue21203.d(12): Error: pragma `mangle` cannot apply to a template declaration -fail_compilation/issue21203.d(12): use `template Class(Args...){ pragma(mangle, "other_name") class Class {} }` +fail_compilation/issue21203.d(14): Error: pragma `mangle` cannot apply to a template declaration +pragma(mangle,"gdkfjgh") +^ +fail_compilation/issue21203.d(14): use `template Class(Args...){ pragma(mangle, "other_name") class Class {} }` --- */ diff --git a/compiler/test/fail_compilation/issue21295.d b/compiler/test/fail_compilation/issue21295.d index 24d282cd8ab3..83ba5f53dad2 100644 --- a/compiler/test/fail_compilation/issue21295.d +++ b/compiler/test/fail_compilation/issue21295.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/issue21295.d(8): Error: undefined identifier `Visitor` +fail_compilation/issue21295.d(10): Error: undefined identifier `Visitor` +Visitor should_fail; + ^ --- */ import imports.issue21295ast_node; diff --git a/compiler/test/fail_compilation/issue21378.d b/compiler/test/fail_compilation/issue21378.d index 172110a0ab0c..51c15f549148 100644 --- a/compiler/test/fail_compilation/issue21378.d +++ b/compiler/test/fail_compilation/issue21378.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/issue21378.d(13): Error: function `issue21378.fn` circular dependency. Functions cannot be interpreted while being compiled -fail_compilation/issue21378.d(12): called from here: `fn()` -fail_compilation/issue21378.d(12): Error: pragma(`inline`, `true` or `false`) expected, not `fn()` +fail_compilation/issue21378.d(19): Error: function `issue21378.fn` circular dependency. Functions cannot be interpreted while being compiled +int fn() + ^ +fail_compilation/issue21378.d(18): called from here: `fn()` +pragma(inline, fn()) + ^ +fail_compilation/issue21378.d(18): Error: pragma(`inline`, `true` or `false`) expected, not `fn()` +pragma(inline, fn()) +^ --- */ diff --git a/compiler/test/fail_compilation/issue21685_main.d b/compiler/test/fail_compilation/issue21685_main.d index 5b95d9be7641..781ba0e8bc43 100644 --- a/compiler/test/fail_compilation/issue21685_main.d +++ b/compiler/test/fail_compilation/issue21685_main.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 -Ifail_compilation/imports TEST_OUTPUT: --- -fail_compilation/issue21685_main.d(12): Error: constructor `issue21685.E.this` is not accessible from module `issue21685_main` -fail_compilation/issue21685_main.d(19): Error: constructor `issue21685.E.this` is not accessible from module `issue21685_main` +fail_compilation/issue21685_main.d(16): Error: constructor `issue21685.E.this` is not accessible from module `issue21685_main` + new E; + ^ +fail_compilation/issue21685_main.d(23): Error: constructor `issue21685.E.this` is not accessible from module `issue21685_main` + super(); + ^ --- */ import issue21685; diff --git a/compiler/test/fail_compilation/issue22682.d b/compiler/test/fail_compilation/issue22682.d index 80e8311b3a77..d31336ae1779 100644 --- a/compiler/test/fail_compilation/issue22682.d +++ b/compiler/test/fail_compilation/issue22682.d @@ -1,10 +1,20 @@ /* TEST_OUTPUT: --- -fail_compilation/issue22682.d(14): Error: `pragma(mangle)` must be attached to a declaration -fail_compilation/issue22682.d(15): Error: `pragma(mangle)` takes a single argument that must be a string literal -fail_compilation/issue22682.d(16): Error: `string` expected for pragma mangle argument, not `(0)` of type `int` -fail_compilation/issue22682.d(16): Error: `pragma(mangle)` takes a single argument that must be a string literal -fail_compilation/issue22682.d(17): Error: `pragma(mangle)` must be attached to a declaration +fail_compilation/issue22682.d(24): Error: `pragma(mangle)` must be attached to a declaration + pragma(mangle) {} + ^ +fail_compilation/issue22682.d(25): Error: `pragma(mangle)` takes a single argument that must be a string literal + pragma(mangle) static int i0; + ^ +fail_compilation/issue22682.d(26): Error: `string` expected for pragma mangle argument, not `(0)` of type `int` + pragma(mangle, 0) static int i1; + ^ +fail_compilation/issue22682.d(26): Error: `pragma(mangle)` takes a single argument that must be a string literal + pragma(mangle, 0) static int i1; + ^ +fail_compilation/issue22682.d(27): Error: `pragma(mangle)` must be attached to a declaration + pragma(mangle); + ^ --- */ module issue22682; diff --git a/compiler/test/fail_compilation/issue23947.d b/compiler/test/fail_compilation/issue23947.d index d73cd8572fa8..bbb6f599be18 100644 --- a/compiler/test/fail_compilation/issue23947.d +++ b/compiler/test/fail_compilation/issue23947.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/issue23947.d(10): Error: function `imports.issue23947a.Class.handle` of type `void(X x)` is not accessible from module `issue23947` +fail_compilation/issue23947.d(12): Error: function `imports.issue23947a.Class.handle` of type `void(X x)` is not accessible from module `issue23947` +void main() { Class.init.handle(X.init); } + ^ --- */ import imports.issue23947a; diff --git a/compiler/test/fail_compilation/issue24534.d b/compiler/test/fail_compilation/issue24534.d index 1689b6c5d1b2..6f69d7d3bb96 100644 --- a/compiler/test/fail_compilation/issue24534.d +++ b/compiler/test/fail_compilation/issue24534.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/issue24534.d(12): Error: `goto` skips declaration of variable `issue24534.f1.y1` -fail_compilation/issue24534.d(13): declared here -fail_compilation/issue24534.d(20): Error: `goto` skips declaration of variable `issue24534.f2.y2` -fail_compilation/issue24534.d(22): declared here +fail_compilation/issue24534.d(20): Error: `goto` skips declaration of variable `issue24534.f1.y1` + goto Label1; + ^ +fail_compilation/issue24534.d(21): declared here + int y1; + ^ +fail_compilation/issue24534.d(28): Error: `goto` skips declaration of variable `issue24534.f2.y2` + goto Label2; + ^ +fail_compilation/issue24534.d(30): declared here + int y2; + ^ --- */ void f1(){ //always failed with error about skipping a declaration diff --git a/compiler/test/fail_compilation/issue3396.d b/compiler/test/fail_compilation/issue3396.d index 7c6efd2166ca..d99a047b5d97 100644 --- a/compiler/test/fail_compilation/issue3396.d +++ b/compiler/test/fail_compilation/issue3396.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/issue3396.d(17): Error: call to unimplemented abstract function `void M()` -fail_compilation/issue3396.d(17): declared here: fail_compilation/issue3396.d(12) +fail_compilation/issue3396.d(19): Error: call to unimplemented abstract function `void M()` + override void M(){ super.M(); } + ^ +fail_compilation/issue3396.d(19): declared here: fail_compilation/issue3396.d(14) --- */ module issue3396; diff --git a/compiler/test/fail_compilation/issue3827.d b/compiler/test/fail_compilation/issue3827.d index 12ae60bcb789..0ba1b012753d 100644 --- a/compiler/test/fail_compilation/issue3827.d +++ b/compiler/test/fail_compilation/issue3827.d @@ -2,10 +2,14 @@ /* TEST_OUTPUT: --- -fail_compilation/issue3827.d(14): Error: implicit string concatenation is error-prone and disallowed in D -fail_compilation/issue3827.d(14): Use the explicit syntax instead (concatenating literals is `@nogc`): "Hello" ~ "World" -fail_compilation/issue3827.d(15): Error: implicit string concatenation is error-prone and disallowed in D -fail_compilation/issue3827.d(15): Use the explicit syntax instead (concatenating literals is `@nogc`): "A" ~ "B" +fail_compilation/issue3827.d(18): Error: implicit string concatenation is error-prone and disallowed in D + string[] arr = [ "Hello" "World" ]; + ^ +fail_compilation/issue3827.d(18): Use the explicit syntax instead (concatenating literals is `@nogc`): "Hello" ~ "World" +fail_compilation/issue3827.d(19): Error: implicit string concatenation is error-prone and disallowed in D + auto foo = "A" "B"; + ^ +fail_compilation/issue3827.d(19): Use the explicit syntax instead (concatenating literals is `@nogc`): "A" ~ "B" --- */ diff --git a/compiler/test/fail_compilation/lexer1.d b/compiler/test/fail_compilation/lexer1.d index 7fe2a5374812..7ad65b2c71e5 100644 --- a/compiler/test/fail_compilation/lexer1.d +++ b/compiler/test/fail_compilation/lexer1.d @@ -1,28 +1,72 @@ /* TEST_OUTPUT: --- -fail_compilation/lexer1.d(30): Error: declaration expected, not `x"01 02 03"w` -fail_compilation/lexer1.d(31): Error: declaration expected, not `2147483649U` -fail_compilation/lexer1.d(32): Error: declaration expected, not `0.1` -fail_compilation/lexer1.d(33): Error: declaration expected, not `0.1f` -fail_compilation/lexer1.d(34): Error: declaration expected, not `0.1L` -fail_compilation/lexer1.d(35): Error: declaration expected, not `0.1i` -fail_compilation/lexer1.d(36): Error: declaration expected, not `0.1fi` -fail_compilation/lexer1.d(37): Error: declaration expected, not `0.1Li` -fail_compilation/lexer1.d(38): Error: declaration expected, not `' '` -fail_compilation/lexer1.d(39): Error: declaration expected, not `'\ud7ff'` -fail_compilation/lexer1.d(40): Error: declaration expected, not `'\U00010000'` -fail_compilation/lexer1.d(41): Error: declaration expected, not `"ab\\c\"\u1234a\U00011100a\0ab"d` -fail_compilation/lexer1.d(43): Error: declaration expected, not `module` -fail_compilation/lexer1.d(45): Error: escape hex sequence has 1 hex digits instead of 2 -fail_compilation/lexer1.d(46): Error: undefined escape hex sequence \xG -fail_compilation/lexer1.d(47): Error: unnamed character entity &unnamedentity; -fail_compilation/lexer1.d(48): Error: unterminated named entity &1; -fail_compilation/lexer1.d(49): Error: unterminated named entity &*; -fail_compilation/lexer1.d(50): Error: unterminated named entity &s1"; -fail_compilation/lexer1.d(51): Error: unterminated named entity &2; -fail_compilation/lexer1.d(52): Error: escape octal sequence \400 is larger than \377 -fail_compilation/lexer1.d(53): Error: html entity requires 2 code units, use a string instead of a character +fail_compilation/lexer1.d(74): Error: declaration expected, not `x"01 02 03"w` +x"01 02 03"w; +^ +fail_compilation/lexer1.d(75): Error: declaration expected, not `2147483649U` +0x80000001; +^ +fail_compilation/lexer1.d(76): Error: declaration expected, not `0.1` +0.1; +^ +fail_compilation/lexer1.d(77): Error: declaration expected, not `0.1f` +0.1f; +^ +fail_compilation/lexer1.d(78): Error: declaration expected, not `0.1L` +0.1L; +^ +fail_compilation/lexer1.d(79): Error: declaration expected, not `0.1i` +0.1i; +^ +fail_compilation/lexer1.d(80): Error: declaration expected, not `0.1fi` +0.1fi; +^ +fail_compilation/lexer1.d(81): Error: declaration expected, not `0.1Li` +0.1Li; +^ +fail_compilation/lexer1.d(82): Error: declaration expected, not `' '` +' '; +^ +fail_compilation/lexer1.d(83): Error: declaration expected, not `'\ud7ff'` +'\uD7FF'; +^ +fail_compilation/lexer1.d(84): Error: declaration expected, not `'\U00010000'` +'\U00010000'; +^ +fail_compilation/lexer1.d(85): Error: declaration expected, not `"ab\\c\"\u1234a\U00011100a\0ab"d` +"ab\\c\"\u1234a\U00011100a\000ab"d; +^ +fail_compilation/lexer1.d(87): Error: declaration expected, not `module` +module x; +^ +fail_compilation/lexer1.d(89): Error: escape hex sequence has 1 hex digits instead of 2 +static s1 = "\x1G"; + ^ +fail_compilation/lexer1.d(90): Error: undefined escape hex sequence \xG +static s2 = "\xGG"; + ^ +fail_compilation/lexer1.d(91): Error: unnamed character entity &unnamedentity; +static s3 = "\&unnamedentity;"; + ^ +fail_compilation/lexer1.d(92): Error: unterminated named entity &1; +static s4 = "\&1"; + ^ +fail_compilation/lexer1.d(93): Error: unterminated named entity &*; +static s5 = "\&*"; + ^ +fail_compilation/lexer1.d(94): Error: unterminated named entity &s1"; +static s6 = "\&s1"; + ^ +fail_compilation/lexer1.d(95): Error: unterminated named entity &2; +static s7 = "\&2;"; + ^ +fail_compilation/lexer1.d(96): Error: escape octal sequence \400 is larger than \377 +static s7 = "\400;"; + ^ +fail_compilation/lexer1.d(97): Error: html entity requires 2 code units, use a string instead of a character +dchar s8 = '\∾̳'; + ^ --- */ diff --git a/compiler/test/fail_compilation/lexer2.d b/compiler/test/fail_compilation/lexer2.d index f8fae85c9b37..8c097409e0ac 100644 --- a/compiler/test/fail_compilation/lexer2.d +++ b/compiler/test/fail_compilation/lexer2.d @@ -1,11 +1,19 @@ /* TEST_OUTPUT: --- -fail_compilation/lexer2.d(16): Error: odd number (3) of hex characters in hex string -fail_compilation/lexer2.d(17): Error: non-hex character 'G' in hex string -fail_compilation/lexer2.d(18): Error: heredoc rest of line should be blank -fail_compilation/lexer2.d(20): Error: unterminated delimited string constant starting at fail_compilation/lexer2.d(20) -fail_compilation/lexer2.d(22): Error: semicolon expected following auto declaration, not `End of File` +fail_compilation/lexer2.d(24): Error: odd number (3) of hex characters in hex string +static s1 = x"123"; + ^ +fail_compilation/lexer2.d(25): Error: non-hex character 'G' in hex string +static s2 = x"123G"; + ^ +fail_compilation/lexer2.d(26): Error: heredoc rest of line should be blank +static s4 = q"here notblank + ^ +fail_compilation/lexer2.d(28): Error: unterminated delimited string constant starting at fail_compilation/lexer2.d(28) +static s5 = q"here + ^ +fail_compilation/lexer2.d(30): Error: semicolon expected following auto declaration, not `End of File` --- */ diff --git a/compiler/test/fail_compilation/lexer23465.d b/compiler/test/fail_compilation/lexer23465.d index 4ea41a58af14..1f30d650952b 100644 --- a/compiler/test/fail_compilation/lexer23465.d +++ b/compiler/test/fail_compilation/lexer23465.d @@ -1,13 +1,23 @@ /* TEST_OUTPUT: --- -fail_compilation/lexer23465.d(19): Error: character 0x1f37a is not allowed as a continue character in an identifier -fail_compilation/lexer23465.d(19): Error: character 0x1f37a is not a valid token -fail_compilation/lexer23465.d(20): Error: character '\' is not a valid token -fail_compilation/lexer23465.d(21): Error: unterminated /+ +/ comment -fail_compilation/lexer23465.d(22): Error: found `End of File` instead of array initializer -fail_compilation/lexer23465.d(22): Error: semicolon needed to end declaration of `arr`, instead of `End of File` -fail_compilation/lexer23465.d(17): `arr` declared here +fail_compilation/lexer23465.d(29): Error: character 0x1f37a is not allowed as a continue character in an identifier + x🍺, + ^ +fail_compilation/lexer23465.d(29): Error: character 0x1f37a is not a valid token + x🍺, + ^ +fail_compilation/lexer23465.d(30): Error: character '\' is not a valid token + 3\, + ^ +fail_compilation/lexer23465.d(31): Error: unterminated /+ +/ comment + 5, /+ + ^ +fail_compilation/lexer23465.d(32): Error: found `End of File` instead of array initializer +fail_compilation/lexer23465.d(32): Error: semicolon needed to end declaration of `arr`, instead of `End of File` +fail_compilation/lexer23465.d(27): `arr` declared here +int[] arr = [ + ^ --- */ diff --git a/compiler/test/fail_compilation/lexer3.d b/compiler/test/fail_compilation/lexer3.d index dc6ad6407673..5c28bd8b4828 100644 --- a/compiler/test/fail_compilation/lexer3.d +++ b/compiler/test/fail_compilation/lexer3.d @@ -1,8 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/lexer3.d(9): Error: unterminated token string constant starting at fail_compilation/lexer3.d(9) -fail_compilation/lexer3.d(10): Error: semicolon expected following auto declaration, not `End of File` +fail_compilation/lexer3.d(11): Error: unterminated token string constant starting at fail_compilation/lexer3.d(11) +static s1 = q{ asef; + ^ +fail_compilation/lexer3.d(12): Error: semicolon expected following auto declaration, not `End of File` --- */ diff --git a/compiler/test/fail_compilation/lexer4.d b/compiler/test/fail_compilation/lexer4.d index c4bdb4fd64c0..8c38079c1e69 100644 --- a/compiler/test/fail_compilation/lexer4.d +++ b/compiler/test/fail_compilation/lexer4.d @@ -1,19 +1,43 @@ /* TEST_OUTPUT: --- -fail_compilation/lexer4.d(22): Error: unterminated character constant -fail_compilation/lexer4.d(24): Error: unterminated character constant -fail_compilation/lexer4.d(25): Error: unterminated character constant -fail_compilation/lexer4.d(26): Error: binary digit expected, not `2` -fail_compilation/lexer4.d(27): Error: octal digit expected, not `8` -fail_compilation/lexer4.d(27): Error: octal literals larger than 7 are no longer supported -fail_compilation/lexer4.d(28): Error: decimal digit expected, not `a` -fail_compilation/lexer4.d(29): Error: repeated integer suffix `U` -fail_compilation/lexer4.d(30): Error: exponent required for hex float -fail_compilation/lexer4.d(31): Error: lower case integer suffix 'l' is not allowed. Please use 'L' instead -fail_compilation/lexer4.d(32): Error: use 'i' suffix instead of 'I' -fail_compilation/lexer4.d(34): Error: line number `1234567891234567879` out of range -fail_compilation/lexer4.d(36): Error: positive integer argument expected following `#line` +fail_compilation/lexer4.d(46): Error: unterminated character constant +fail_compilation/lexer4.d(48): Error: unterminated character constant +static c2 = ''; + ^ +fail_compilation/lexer4.d(49): Error: unterminated character constant +static c3 = 'a; + ^ +fail_compilation/lexer4.d(50): Error: binary digit expected, not `2` +int i = 0b12; + ^ +fail_compilation/lexer4.d(51): Error: octal digit expected, not `8` +int j = 0128; + ^ +fail_compilation/lexer4.d(51): Error: octal literals larger than 7 are no longer supported +int j = 0128; + ^ +fail_compilation/lexer4.d(52): Error: decimal digit expected, not `a` +int k = 12a; + ^ +fail_compilation/lexer4.d(53): Error: repeated integer suffix `U` +int l = 12UU; + ^ +fail_compilation/lexer4.d(54): Error: exponent required for hex float +int f = 0x1234.0; + ^ +fail_compilation/lexer4.d(55): Error: lower case integer suffix 'l' is not allowed. Please use 'L' instead +int m = 12l; + ^ +fail_compilation/lexer4.d(56): Error: use 'i' suffix instead of 'I' +static n = 12.1I; + ^ +fail_compilation/lexer4.d(58): Error: line number `1234567891234567879` out of range +#line 1234567891234567879 + ^ +fail_compilation/lexer4.d(60): Error: positive integer argument expected following `#line` +#line whatever + ^ fail_compilation/lexer4.d(19): Error: found `"file"` when expecting new line following `#line` directive --- */ diff --git a/compiler/test/fail_compilation/lexer5.d b/compiler/test/fail_compilation/lexer5.d index 72673c4525e3..a273263bcb7e 100644 --- a/compiler/test/fail_compilation/lexer5.d +++ b/compiler/test/fail_compilation/lexer5.d @@ -1,10 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/lexer5.d(11): Error: number `1e-100f` is not representable as a `float` -fail_compilation/lexer5.d(11): https://dlang.org/spec/lex.html#floatliteral -fail_compilation/lexer5.d(12): Error: number `1e-10024` is not representable as a `double` -fail_compilation/lexer5.d(12): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral +fail_compilation/lexer5.d(15): Error: number `1e-100f` is not representable as a `float` +static float f = 1e-100f; + ^ +fail_compilation/lexer5.d(15): https://dlang.org/spec/lex.html#floatliteral +fail_compilation/lexer5.d(16): Error: number `1e-10024` is not representable as a `double` +static float f2 = 1e-10024; + ^ +fail_compilation/lexer5.d(16): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral --- */ diff --git a/compiler/test/fail_compilation/lookup.d b/compiler/test/fail_compilation/lookup.d index fe752f2f4d74..bbf476c80f8c 100644 --- a/compiler/test/fail_compilation/lookup.d +++ b/compiler/test/fail_compilation/lookup.d @@ -2,10 +2,18 @@ EXTRA_FILES: imports/imp1.d imports/imp2.d TEST_OUTPUT: --- -fail_compilation/lookup.d(24): Error: no property `X` for type `lookup.B`, did you mean `imports.imp2.X`? -fail_compilation/lookup.d(24): while evaluating: `static assert((B).X == 0)` -fail_compilation/lookup.d(25): Error: no property `Y` for type `lookup.B`, did you mean `imports.imp2.Y`? -fail_compilation/lookup.d(25): while evaluating: `static assert((B).Y == 2)` +fail_compilation/lookup.d(32): Error: no property `X` for type `lookup.B`, did you mean `imports.imp2.X`? + static assert(B.X == 0); + ^ +fail_compilation/lookup.d(32): while evaluating: `static assert((B).X == 0)` + static assert(B.X == 0); + ^ +fail_compilation/lookup.d(33): Error: no property `Y` for type `lookup.B`, did you mean `imports.imp2.Y`? + static assert(B.Y == 2); + ^ +fail_compilation/lookup.d(33): while evaluating: `static assert((B).Y == 2)` + static assert(B.Y == 2); + ^ --- */ diff --git a/compiler/test/fail_compilation/main.d b/compiler/test/fail_compilation/main.d index 42a8a43062f2..2b8e82fdd021 100644 --- a/compiler/test/fail_compilation/main.d +++ b/compiler/test/fail_compilation/main.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/main.d(9): Error: only one entry point `main`$?:windows=, `WinMain` or `DllMain`$ is allowed -fail_compilation/main.d(8): previously found `void main()` here +fail_compilation/main.d(13): Error: only one entry point `main`$?:windows=, `WinMain` or `DllMain`$ is allowed +void main(string[] args) {} + ^ +fail_compilation/main.d(12): previously found `void main()` here +void main() {} + ^ --- */ void main() {} diff --git a/compiler/test/fail_compilation/mangle1.d b/compiler/test/fail_compilation/mangle1.d index a97a55b121a5..6fdfc746f441 100644 --- a/compiler/test/fail_compilation/mangle1.d +++ b/compiler/test/fail_compilation/mangle1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/mangle1.d(8): Error: pragma `mangle` can only apply to a single declaration +fail_compilation/mangle1.d(10): Error: pragma `mangle` can only apply to a single declaration +pragma(mangle, "_stuff_") __gshared { int x, y; } +^ --- */ diff --git a/compiler/test/fail_compilation/mangle2.d b/compiler/test/fail_compilation/mangle2.d index 69e148f7a16a..5d84b7d49315 100644 --- a/compiler/test/fail_compilation/mangle2.d +++ b/compiler/test/fail_compilation/mangle2.d @@ -1,18 +1,42 @@ /* TEST_OUTPUT: --- -fail_compilation/mangle2.d(20): Error: pragma `mangle` char 0x20 not allowed in mangled name -fail_compilation/mangle2.d(21): Error: pragma `mangle` char 0x20 not allowed in mangled name -fail_compilation/mangle2.d(24): Error: pragma `mangle` char 0x0a not allowed in mangled name -fail_compilation/mangle2.d(25): Error: pragma `mangle` char 0x0a not allowed in mangled name -fail_compilation/mangle2.d(28): Error: pragma `mangle` char 0x07 not allowed in mangled name -fail_compilation/mangle2.d(29): Error: pragma `mangle` char 0x07 not allowed in mangled name -fail_compilation/mangle2.d(32): Error: pragma `mangle` char 0x01 not allowed in mangled name -fail_compilation/mangle2.d(33): Error: pragma `mangle` char 0x01 not allowed in mangled name -fail_compilation/mangle2.d(36): Error: pragma `mangle` char 0x00 not allowed in mangled name -fail_compilation/mangle2.d(37): Error: pragma `mangle` char 0x00 not allowed in mangled name -fail_compilation/mangle2.d(40): Error: pragma `mangle` Outside Unicode code space -fail_compilation/mangle2.d(41): Error: pragma `mangle` Outside Unicode code space +fail_compilation/mangle2.d(44): Error: pragma `mangle` char 0x20 not allowed in mangled name +__gshared pragma(mangle, "test 9") ubyte test9_1; + ^ +fail_compilation/mangle2.d(45): Error: pragma `mangle` char 0x20 not allowed in mangled name +__gshared extern pragma(mangle, "test 9") ubyte test9_1_e; + ^ +fail_compilation/mangle2.d(48): Error: pragma `mangle` char 0x0a not allowed in mangled name +__gshared pragma(mangle, "test\n9") ubyte test9_2; + ^ +fail_compilation/mangle2.d(49): Error: pragma `mangle` char 0x0a not allowed in mangled name +__gshared extern pragma(mangle, "test\n9") ubyte test9_2_e; + ^ +fail_compilation/mangle2.d(52): Error: pragma `mangle` char 0x07 not allowed in mangled name +__gshared pragma(mangle, "test\a9") ubyte test9_3; + ^ +fail_compilation/mangle2.d(53): Error: pragma `mangle` char 0x07 not allowed in mangled name +__gshared extern pragma(mangle, "test\a9") ubyte test9_3_e; + ^ +fail_compilation/mangle2.d(56): Error: pragma `mangle` char 0x01 not allowed in mangled name +__gshared pragma(mangle, "test\x019") ubyte test9_4; + ^ +fail_compilation/mangle2.d(57): Error: pragma `mangle` char 0x01 not allowed in mangled name +__gshared extern pragma(mangle, "test\x019") ubyte test9_4_e; + ^ +fail_compilation/mangle2.d(60): Error: pragma `mangle` char 0x00 not allowed in mangled name +__gshared pragma(mangle, "test\09") ubyte test9_5; + ^ +fail_compilation/mangle2.d(61): Error: pragma `mangle` char 0x00 not allowed in mangled name +__gshared extern pragma(mangle, "test\09") ubyte test9_5_e; + ^ +fail_compilation/mangle2.d(64): Error: pragma `mangle` Outside Unicode code space +__gshared pragma(mangle, "test\xff9") ubyte test9_6; + ^ +fail_compilation/mangle2.d(65): Error: pragma `mangle` Outside Unicode code space +__gshared extern pragma(mangle, "test\xff9") ubyte test9_6_e; + ^ --- */ diff --git a/compiler/test/fail_compilation/match_func_ptr.d b/compiler/test/fail_compilation/match_func_ptr.d index 7f59183f2ceb..2099c099f9ae 100644 --- a/compiler/test/fail_compilation/match_func_ptr.d +++ b/compiler/test/fail_compilation/match_func_ptr.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/match_func_ptr.d(13): Error: cannot match delegate literal to function pointer type `void function()` -fail_compilation/match_func_ptr.d(14): Error: cannot match function literal to delegate type `void delegate()` -fail_compilation/match_func_ptr.d(15): Error: cannot infer parameter types from `int function()` -fail_compilation/match_func_ptr.d(16): Error: cannot infer parameter types from `int delegate(int, int)` +fail_compilation/match_func_ptr.d(21): Error: cannot match delegate literal to function pointer type `void function()` + void function() f = delegate {}; + ^ +fail_compilation/match_func_ptr.d(22): Error: cannot match function literal to delegate type `void delegate()` + void delegate() d = function {}; + ^ +fail_compilation/match_func_ptr.d(23): Error: cannot infer parameter types from `int function()` + int function() f2 = i => 2; + ^ +fail_compilation/match_func_ptr.d(24): Error: cannot infer parameter types from `int delegate(int, int)` + int delegate(int, int) d2 = i => 2; + ^ --- */ diff --git a/compiler/test/fail_compilation/misc_parser_err_cov1.d b/compiler/test/fail_compilation/misc_parser_err_cov1.d index 4a8875d6d69c..84f5c8115aaf 100644 --- a/compiler/test/fail_compilation/misc_parser_err_cov1.d +++ b/compiler/test/fail_compilation/misc_parser_err_cov1.d @@ -2,45 +2,79 @@ REQUIRED_ARGS: -verrors=0 TEST_OUTPUT: --- -fail_compilation/misc_parser_err_cov1.d(29): Error: basic type expected, not `)` -fail_compilation/misc_parser_err_cov1.d(30): Error: basic type expected, not `)` -fail_compilation/misc_parser_err_cov1.d(31): Error: `__traits(identifier, args...)` expected -fail_compilation/misc_parser_err_cov1.d(31): Error: semicolon expected following auto declaration, not `o` -fail_compilation/misc_parser_err_cov1.d(31): Error: expression expected, not `)` -fail_compilation/misc_parser_err_cov1.d(32): Error: expected `(` following `is`, not `;` -fail_compilation/misc_parser_err_cov1.d(33): Error: semicolon expected following auto declaration, not `auto` -fail_compilation/misc_parser_err_cov1.d(33): Error: found `+` when expecting `(` following `mixin` -fail_compilation/misc_parser_err_cov1.d(35): Error: `key:value` expected for associative array literal -fail_compilation/misc_parser_err_cov1.d(36): Error: basic type expected, not `;` -fail_compilation/misc_parser_err_cov1.d(36): Error: `{ members }` expected for anonymous class -fail_compilation/misc_parser_err_cov1.d(38): Error: template argument expected following `!` -fail_compilation/misc_parser_err_cov1.d(38): Error: missing closing `)` after `if (parseShift!()` -fail_compilation/misc_parser_err_cov1.d(38): Error: found `)` when expecting `(` -fail_compilation/misc_parser_err_cov1.d(39): Error: missing closing `)` after `if (` -fail_compilation/misc_parser_err_cov1.d(39): Error: identifier expected following `immutable(int).`, not `+` -fail_compilation/misc_parser_err_cov1.d(39): Error: expression expected, not `;` -fail_compilation/misc_parser_err_cov1.d(40): Error: semicolon expected following auto declaration, not `auto` -fail_compilation/misc_parser_err_cov1.d(40): Error: identifier or `new` expected following `.`, not `+` -fail_compilation/misc_parser_err_cov1.d(41): Error: identifier or new keyword expected following `(...)`. -fail_compilation/misc_parser_err_cov1.d(41): Error: expression expected, not `;` -fail_compilation/misc_parser_err_cov1.d(42): Error: found `}` when expecting `;` following expression -fail_compilation/misc_parser_err_cov1.d(41): expression: `(__error) + (__error)` -fail_compilation/misc_parser_err_cov1.d(43): Error: matching `}` expected following compound statement, not `End of File` -fail_compilation/misc_parser_err_cov1.d(33): unmatched `{` +fail_compilation/misc_parser_err_cov1.d(71): Error: basic type expected, not `)` +void foo(in); + ^ +fail_compilation/misc_parser_err_cov1.d(72): Error: basic type expected, not `)` +void bar(int, const @tation); + ^ +fail_compilation/misc_parser_err_cov1.d(78): Error: `__traits(identifier, args...)` expected + auto tt = __traits( a == b)` -fail_compilation/onemember_overloads.d(20): - Containing: `skipOver(Haystack, Needles...)(ref Haystack haystack, Needles needles)` -fail_compilation/onemember_overloads.d(21): - Containing: `skipOver(R)(ref R r1)` -fail_compilation/onemember_overloads.d(22): - Containing: `skipOver(R, Es...)(ref R r, Es es)` -fail_compilation/onemember_overloads.d(30): Error: template `t2` is not callable using argument types `!()()` -fail_compilation/onemember_overloads.d(33): Candidate is: `t2(T)` -fail_compilation/onemember_overloads.d(35): - Containing: `t2(string)` -fail_compilation/onemember_overloads.d(36): - Containing: `t2(int[])` -fail_compilation/onemember_overloads.d(37): - Containing: `t2(R)(R)` +fail_compilation/onemember_overloads.d(51): Error: none of the overloads of `skipOver` are callable using argument types `()` + skipOver(); + ^ +fail_compilation/onemember_overloads.d(47): Candidates are: `onemember_overloads.skipOver(string)` +void skipOver(string); + ^ +fail_compilation/onemember_overloads.d(40): `skipOver(alias pred = (a, b) => a == b)` +template skipOver(alias pred = (a, b) => a == b) +^ +fail_compilation/onemember_overloads.d(42): - Containing: `skipOver(Haystack, Needles...)(ref Haystack haystack, Needles needles)` + bool skipOver(Haystack, Needles...)(ref Haystack haystack, Needles needles) => true; + ^ +fail_compilation/onemember_overloads.d(43): - Containing: `skipOver(R)(ref R r1)` + bool skipOver(R)(ref R r1) => true; + ^ +fail_compilation/onemember_overloads.d(44): - Containing: `skipOver(R, Es...)(ref R r, Es es)` + bool skipOver(R, Es...)(ref R r, Es es) => true; + ^ +fail_compilation/onemember_overloads.d(52): Error: template `t2` is not callable using argument types `!()()` + t2(); + ^ +fail_compilation/onemember_overloads.d(55): Candidate is: `t2(T)` +template t2(T) +^ +fail_compilation/onemember_overloads.d(57): - Containing: `t2(string)` + bool t2(string); + ^ +fail_compilation/onemember_overloads.d(58): - Containing: `t2(int[])` + bool t2(int[]); + ^ +fail_compilation/onemember_overloads.d(59): - Containing: `t2(R)(R)` + bool t2(R)(R); + ^ --- */ diff --git a/compiler/test/fail_compilation/operator_undefined.d b/compiler/test/fail_compilation/operator_undefined.d index 3065bdb8e79a..0bda8e110309 100644 --- a/compiler/test/fail_compilation/operator_undefined.d +++ b/compiler/test/fail_compilation/operator_undefined.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/operator_undefined.d(19): Error: operator `-` is not defined for `toJson(2)` of type `Json` +fail_compilation/operator_undefined.d(21): Error: operator `-` is not defined for `toJson(2)` of type `Json` + auto x = -2.toJson; + ^ --- */ diff --git a/compiler/test/fail_compilation/parse12924.d b/compiler/test/fail_compilation/parse12924.d index c98167b4409a..147639b2f29f 100644 --- a/compiler/test/fail_compilation/parse12924.d +++ b/compiler/test/fail_compilation/parse12924.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/parse12924.d(14): Error: declaration expected following attribute, not `;` -fail_compilation/parse12924.d(15): Error: declaration expected following attribute, not `;` -fail_compilation/parse12924.d(16): Error: declaration expected following attribute, not `;` -fail_compilation/parse12924.d(17): Error: declaration expected following attribute, not `;` -fail_compilation/parse12924.d(18): Error: declaration expected following attribute, not `;` -fail_compilation/parse12924.d(19): Error: declaration expected following attribute, not `;` -fail_compilation/parse12924.d(20): Error: declaration expected following attribute, not `;` +fail_compilation/parse12924.d(28): Error: declaration expected following attribute, not `;` +static; void f1() {} + ^ +fail_compilation/parse12924.d(29): Error: declaration expected following attribute, not `;` +deprecated; void f2() {} + ^ +fail_compilation/parse12924.d(30): Error: declaration expected following attribute, not `;` +deprecated(""); void f3() {} + ^ +fail_compilation/parse12924.d(31): Error: declaration expected following attribute, not `;` +extern(C); void f4() {} + ^ +fail_compilation/parse12924.d(32): Error: declaration expected following attribute, not `;` +public; void f5() {} + ^ +fail_compilation/parse12924.d(33): Error: declaration expected following attribute, not `;` +align(1); void f6() {} + ^ +fail_compilation/parse12924.d(34): Error: declaration expected following attribute, not `;` +@(1); void f7() {} + ^ --- */ diff --git a/compiler/test/fail_compilation/parse12967b.d b/compiler/test/fail_compilation/parse12967b.d index 064f297ec798..b1815ac21513 100644 --- a/compiler/test/fail_compilation/parse12967b.d +++ b/compiler/test/fail_compilation/parse12967b.d @@ -1,22 +1,54 @@ /* TEST_OUTPUT: --- -fail_compilation/parse12967b.d(24): Error: function `parse12967b.C.pre_c` without `this` cannot be `const` -fail_compilation/parse12967b.d(25): Error: function `parse12967b.C.pre_i` without `this` cannot be `immutable` -fail_compilation/parse12967b.d(26): Error: function `parse12967b.C.pre_w` without `this` cannot be `inout` -fail_compilation/parse12967b.d(27): Error: function `parse12967b.C.pre_s` without `this` cannot be `shared` -fail_compilation/parse12967b.d(29): Error: function `parse12967b.C.post_c` without `this` cannot be `const` -fail_compilation/parse12967b.d(30): Error: function `parse12967b.C.post_i` without `this` cannot be `immutable` -fail_compilation/parse12967b.d(31): Error: function `parse12967b.C.post_w` without `this` cannot be `inout` -fail_compilation/parse12967b.d(32): Error: function `parse12967b.C.post_s` without `this` cannot be `shared` -fail_compilation/parse12967b.d(37): Error: function `parse12967b.D.pre_c` without `this` cannot be `const` -fail_compilation/parse12967b.d(38): Error: function `parse12967b.D.pre_i` without `this` cannot be `immutable` -fail_compilation/parse12967b.d(39): Error: function `parse12967b.D.pre_w` without `this` cannot be `inout` -fail_compilation/parse12967b.d(40): Error: function `parse12967b.D.pre_s` without `this` cannot be `shared` -fail_compilation/parse12967b.d(41): Error: function `parse12967b.D.post_c` without `this` cannot be `const` -fail_compilation/parse12967b.d(42): Error: function `parse12967b.D.post_i` without `this` cannot be `immutable` -fail_compilation/parse12967b.d(43): Error: function `parse12967b.D.post_w` without `this` cannot be `inout` -fail_compilation/parse12967b.d(44): Error: function `parse12967b.D.post_s` without `this` cannot be `shared` +fail_compilation/parse12967b.d(56): Error: function `parse12967b.C.pre_c` without `this` cannot be `const` + const static pre_c() {} + ^ +fail_compilation/parse12967b.d(57): Error: function `parse12967b.C.pre_i` without `this` cannot be `immutable` + immutable static pre_i() {} + ^ +fail_compilation/parse12967b.d(58): Error: function `parse12967b.C.pre_w` without `this` cannot be `inout` + inout static pre_w() {} + ^ +fail_compilation/parse12967b.d(59): Error: function `parse12967b.C.pre_s` without `this` cannot be `shared` + shared static pre_s() {} + ^ +fail_compilation/parse12967b.d(61): Error: function `parse12967b.C.post_c` without `this` cannot be `const` + static post_c() const {} + ^ +fail_compilation/parse12967b.d(62): Error: function `parse12967b.C.post_i` without `this` cannot be `immutable` + static post_i() immutable {} + ^ +fail_compilation/parse12967b.d(63): Error: function `parse12967b.C.post_w` without `this` cannot be `inout` + static post_w() inout {} + ^ +fail_compilation/parse12967b.d(64): Error: function `parse12967b.C.post_s` without `this` cannot be `shared` + static post_s() shared {} + ^ +fail_compilation/parse12967b.d(69): Error: function `parse12967b.D.pre_c` without `this` cannot be `const` + const static void pre_c() {} + ^ +fail_compilation/parse12967b.d(70): Error: function `parse12967b.D.pre_i` without `this` cannot be `immutable` + immutable static void pre_i() {} + ^ +fail_compilation/parse12967b.d(71): Error: function `parse12967b.D.pre_w` without `this` cannot be `inout` + inout static void pre_w() {} + ^ +fail_compilation/parse12967b.d(72): Error: function `parse12967b.D.pre_s` without `this` cannot be `shared` + shared static void pre_s() {} + ^ +fail_compilation/parse12967b.d(73): Error: function `parse12967b.D.post_c` without `this` cannot be `const` + static void post_c() const {} + ^ +fail_compilation/parse12967b.d(74): Error: function `parse12967b.D.post_i` without `this` cannot be `immutable` + static void post_i() immutable {} + ^ +fail_compilation/parse12967b.d(75): Error: function `parse12967b.D.post_w` without `this` cannot be `inout` + static void post_w() inout {} + ^ +fail_compilation/parse12967b.d(76): Error: function `parse12967b.D.post_s` without `this` cannot be `shared` + static void post_s() shared {} + ^ --- */ class C diff --git a/compiler/test/fail_compilation/parse13361.d b/compiler/test/fail_compilation/parse13361.d index f05ee8e5138d..7fb3ab0b625b 100644 --- a/compiler/test/fail_compilation/parse13361.d +++ b/compiler/test/fail_compilation/parse13361.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/parse13361.d(11): Error: empty attribute list is not allowed -fail_compilation/parse13361.d(14): Error: empty attribute list is not allowed -fail_compilation/parse13361.d(14): Error: use `@(attributes)` instead of `[attributes]` +fail_compilation/parse13361.d(17): Error: empty attribute list is not allowed + @() + ^ +fail_compilation/parse13361.d(20): Error: empty attribute list is not allowed + [] // deprecated style + ^ +fail_compilation/parse13361.d(20): Error: use `@(attributes)` instead of `[attributes]` + [] // deprecated style + ^ --- */ struct A diff --git a/compiler/test/fail_compilation/parse14745.d b/compiler/test/fail_compilation/parse14745.d index fa462e042b94..7fecc7940491 100644 --- a/compiler/test/fail_compilation/parse14745.d +++ b/compiler/test/fail_compilation/parse14745.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/parse14745.d(11): Error: function literal cannot be `immutable` -fail_compilation/parse14745.d(12): Error: function literal cannot be `const` +fail_compilation/parse14745.d(15): Error: function literal cannot be `immutable` + auto fp1 = function () pure immutable { return 0; }; + ^ +fail_compilation/parse14745.d(16): Error: function literal cannot be `const` + auto fp2 = function () pure const { return 0; }; + ^ --- */ diff --git a/compiler/test/fail_compilation/pragmainline.d b/compiler/test/fail_compilation/pragmainline.d index 23f3bfef82e0..88a37a81b5a1 100644 --- a/compiler/test/fail_compilation/pragmainline.d +++ b/compiler/test/fail_compilation/pragmainline.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/pragmainline.d(8): Error: one boolean expression expected for `pragma(inline)`, not 3 +fail_compilation/pragmainline.d(10): Error: one boolean expression expected for `pragma(inline)`, not 3 +pragma(inline, 1,2,3) void bar(); +^ --- */ diff --git a/compiler/test/fail_compilation/previewin.d b/compiler/test/fail_compilation/previewin.d index 486dcd5244d2..7679c00be4d1 100644 --- a/compiler/test/fail_compilation/previewin.d +++ b/compiler/test/fail_compilation/previewin.d @@ -5,18 +5,38 @@ TEST_OUTPUT: fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` fail_compilation/previewin.d(4): cannot pass argument `__lambda1` of type `void function(real x) pure nothrow @nogc @safe` to parameter `void function(in real) f` fail_compilation/previewin.d(11): `previewin.takeFunction(void function(in real) f)` declared here +fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` + ^ fail_compilation/previewin.d(5): Error: function `takeFunction` is not callable using argument types `(void function(scope const(real) x) pure nothrow @nogc @safe)` +fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` + ^ fail_compilation/previewin.d(5): cannot pass argument `__lambda2` of type `void function(scope const(real) x) pure nothrow @nogc @safe` to parameter `void function(in real) f` fail_compilation/previewin.d(11): `previewin.takeFunction(void function(in real) f)` declared here +fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` + ^ fail_compilation/previewin.d(6): Error: function `takeFunction` is not callable using argument types `(void function(ref scope const(real) x) pure nothrow @nogc @safe)` +fail_compilation/previewin.d(4): cannot pass argument `__lambda1` of type `void function(real x) pure nothrow @nogc @safe` to parameter `void function(in real) f` + ^ fail_compilation/previewin.d(6): cannot pass argument `__lambda3` of type `void function(ref scope const(real) x) pure nothrow @nogc @safe` to parameter `void function(in real) f` fail_compilation/previewin.d(11): `previewin.takeFunction(void function(in real) f)` declared here +fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` + ^ fail_compilation/previewin.d(15): Error: scope variable `arg` assigned to global variable `myGlobal` +fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` + ^ fail_compilation/previewin.d(16): Error: scope variable `arg` assigned to global variable `myGlobal` fail_compilation/previewin.d(17): Error: scope parameter `arg` may not be returned +fail_compilation/previewin.d(6): Error: function `takeFunction` is not callable using argument types `(void function(ref scope const(real) x) pure nothrow @nogc @safe)` + ^ fail_compilation/previewin.d(18): Error: scope variable `arg` assigned to `ref` variable `escape` with longer lifetime +fail_compilation/previewin.d(4): cannot pass argument `__lambda1` of type `void function(real x) pure nothrow @nogc @safe` to parameter `void function(in real) f` + ^ fail_compilation/previewin.d(22): Error: returning `arg` escapes a reference to parameter `arg` +fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` + ^ fail_compilation/previewin.d(22): perhaps annotate the parameter with `return` +fail_compilation/previewin.d(4): Error: function `takeFunction` is not callable using argument types `(void function(real x) pure nothrow @nogc @safe)` + ^ ---- */ diff --git a/compiler/test/fail_compilation/previewin2.d b/compiler/test/fail_compilation/previewin2.d index e9fe6a1fa88c..48a3bcf5c9a5 100644 --- a/compiler/test/fail_compilation/previewin2.d +++ b/compiler/test/fail_compilation/previewin2.d @@ -5,6 +5,8 @@ TEST_OUTPUT: fail_compilation/previewin2.d(1): Error: cannot use `in` parameters with `extern(C)` functions fail_compilation/previewin2.d(1): parameter `a` declared as `in` here fail_compilation/previewin2.d(2): Error: cannot use `in` parameters with `extern(Windows)` functions +REQUIRED_ARGS: -preview=in -preview=dip1000 + ^ fail_compilation/previewin2.d(2): parameter `a` declared as `in` here fail_compilation/previewin2.d(4): Error: cannot use `in` parameters with `extern(C)` functions fail_compilation/previewin2.d(4): parameter `__anonymous_param` declared as `in` here diff --git a/compiler/test/fail_compilation/protattr1.d b/compiler/test/fail_compilation/protattr1.d index f5976ff2aba1..0e6b7a36f7c6 100644 --- a/compiler/test/fail_compilation/protattr1.d +++ b/compiler/test/fail_compilation/protattr1.d @@ -3,6 +3,8 @@ EXTRA_FILES: protection/subpkg/test1.d TEST_OUTPUT: --- fail_compilation/protection/subpkg/test1.d(3): Error: visibility attribute `package(undefined)` does not bind to one of ancestor packages of module `protection.subpkg.test1` +package(undefined) void foo1(); +^ --- */ import protection.subpkg.test1; diff --git a/compiler/test/fail_compilation/protattr2.d b/compiler/test/fail_compilation/protattr2.d index 7b6704f231d1..ce3f4d5dac09 100644 --- a/compiler/test/fail_compilation/protattr2.d +++ b/compiler/test/fail_compilation/protattr2.d @@ -3,6 +3,8 @@ EXTRA_FILES: protection/subpkg/test2.d TEST_OUTPUT: --- fail_compilation/protection/subpkg/test2.d(3): Error: visibility attribute `package(protection.subpkg2)` does not bind to one of ancestor packages of module `protection.subpkg.test2` +package(protection.subpkg2) void foo2(); +^ --- */ import protection.subpkg.test2; diff --git a/compiler/test/fail_compilation/protattr3.d b/compiler/test/fail_compilation/protattr3.d index acfc9f9c163a..dfbb7906b0a4 100644 --- a/compiler/test/fail_compilation/protattr3.d +++ b/compiler/test/fail_compilation/protattr3.d @@ -3,6 +3,8 @@ EXTRA_FILES: protection/subpkg/test3.d TEST_OUTPUT: --- fail_compilation/protection/subpkg/test3.d(3): Error: `protection package` expected as dot-separated identifiers, got `123` +package(123) void foo3(); + ^ --- */ import protection.subpkg.test3; diff --git a/compiler/test/fail_compilation/reg6769.d b/compiler/test/fail_compilation/reg6769.d index 86e37e725fda..5cc8e8e6825a 100644 --- a/compiler/test/fail_compilation/reg6769.d +++ b/compiler/test/fail_compilation/reg6769.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/reg6769.d(14): Error: reinterpreting cast from `int[]` to `int[7]*` is not supported in CTFE -fail_compilation/reg6769.d(27): called from here: `reg6769a([0, 1, 2, 3, 4, 5, 6])` -fail_compilation/reg6769.d(27): while evaluating: `static assert(reg6769a([0, 1, 2, 3, 4, 5, 6]) == 1)` -fail_compilation/reg6769.d(20): Error: reinterpreting cast from `int[7]` to `int[]*` is not supported in CTFE -fail_compilation/reg6769.d(28): called from here: `reg6769b([0, 1, 2, 3, 4, 5, 6])` -fail_compilation/reg6769.d(28): while evaluating: `static assert(reg6769b([0, 1, 2, 3, 4, 5, 6]) == 1)` +fail_compilation/reg6769.d(26): Error: reinterpreting cast from `int[]` to `int[7]*` is not supported in CTFE + int[7]* b = cast(int[7]*)&a; + ^ +fail_compilation/reg6769.d(39): called from here: `reg6769a([0, 1, 2, 3, 4, 5, 6])` + static assert(reg6769a([0,1,2,3,4,5,6]) == 1); + ^ +fail_compilation/reg6769.d(39): while evaluating: `static assert(reg6769a([0, 1, 2, 3, 4, 5, 6]) == 1)` + static assert(reg6769a([0,1,2,3,4,5,6]) == 1); + ^ +fail_compilation/reg6769.d(32): Error: reinterpreting cast from `int[7]` to `int[]*` is not supported in CTFE + int[]* b = cast(int[]*)&a; + ^ +fail_compilation/reg6769.d(40): called from here: `reg6769b([0, 1, 2, 3, 4, 5, 6])` + static assert(reg6769b([0,1,2,3,4,5,6]) == 1); + ^ +fail_compilation/reg6769.d(40): while evaluating: `static assert(reg6769b([0, 1, 2, 3, 4, 5, 6]) == 1)` + static assert(reg6769b([0,1,2,3,4,5,6]) == 1); + ^ --- */ int reg6769a(int[] a) diff --git a/compiler/test/fail_compilation/reserved_version.d b/compiler/test/fail_compilation/reserved_version.d index 2432d1b30ea0..f8023b5761eb 100644 --- a/compiler/test/fail_compilation/reserved_version.d +++ b/compiler/test/fail_compilation/reserved_version.d @@ -2,134 +2,378 @@ /* TEST_OUTPUT: --- -fail_compilation/reserved_version.d(105): Error: version identifier `MSP430` is reserved and cannot be set -fail_compilation/reserved_version.d(106): Error: version identifier `D_P16` is reserved and cannot be set -fail_compilation/reserved_version.d(107): Error: version identifier `DigitalMars` is reserved and cannot be set -fail_compilation/reserved_version.d(108): Error: version identifier `GNU` is reserved and cannot be set -fail_compilation/reserved_version.d(109): Error: version identifier `LDC` is reserved and cannot be set -fail_compilation/reserved_version.d(110): Error: version identifier `SDC` is reserved and cannot be set -fail_compilation/reserved_version.d(111): Error: version identifier `Windows` is reserved and cannot be set -fail_compilation/reserved_version.d(112): Error: version identifier `Win32` is reserved and cannot be set -fail_compilation/reserved_version.d(113): Error: version identifier `Win64` is reserved and cannot be set -fail_compilation/reserved_version.d(114): Error: version identifier `linux` is reserved and cannot be set -fail_compilation/reserved_version.d(115): Error: version identifier `OSX` is reserved and cannot be set -fail_compilation/reserved_version.d(116): Error: version identifier `iOS` is reserved and cannot be set -fail_compilation/reserved_version.d(117): Error: version identifier `TVOS` is reserved and cannot be set -fail_compilation/reserved_version.d(118): Error: version identifier `WatchOS` is reserved and cannot be set -fail_compilation/reserved_version.d(119): Error: version identifier `FreeBSD` is reserved and cannot be set -fail_compilation/reserved_version.d(120): Error: version identifier `OpenBSD` is reserved and cannot be set -fail_compilation/reserved_version.d(121): Error: version identifier `NetBSD` is reserved and cannot be set -fail_compilation/reserved_version.d(122): Error: version identifier `DragonFlyBSD` is reserved and cannot be set -fail_compilation/reserved_version.d(123): Error: version identifier `BSD` is reserved and cannot be set -fail_compilation/reserved_version.d(124): Error: version identifier `Solaris` is reserved and cannot be set -fail_compilation/reserved_version.d(125): Error: version identifier `Posix` is reserved and cannot be set -fail_compilation/reserved_version.d(126): Error: version identifier `AIX` is reserved and cannot be set -fail_compilation/reserved_version.d(127): Error: version identifier `Haiku` is reserved and cannot be set -fail_compilation/reserved_version.d(128): Error: version identifier `SkyOS` is reserved and cannot be set -fail_compilation/reserved_version.d(129): Error: version identifier `SysV3` is reserved and cannot be set -fail_compilation/reserved_version.d(130): Error: version identifier `SysV4` is reserved and cannot be set -fail_compilation/reserved_version.d(131): Error: version identifier `Hurd` is reserved and cannot be set -fail_compilation/reserved_version.d(132): Error: version identifier `Android` is reserved and cannot be set -fail_compilation/reserved_version.d(133): Error: version identifier `PlayStation` is reserved and cannot be set -fail_compilation/reserved_version.d(134): Error: version identifier `PlayStation4` is reserved and cannot be set -fail_compilation/reserved_version.d(135): Error: version identifier `Cygwin` is reserved and cannot be set -fail_compilation/reserved_version.d(136): Error: version identifier `MinGW` is reserved and cannot be set -fail_compilation/reserved_version.d(137): Error: version identifier `FreeStanding` is reserved and cannot be set -fail_compilation/reserved_version.d(138): Error: version identifier `X86` is reserved and cannot be set -fail_compilation/reserved_version.d(139): Error: version identifier `X86_64` is reserved and cannot be set -fail_compilation/reserved_version.d(140): Error: version identifier `ARM` is reserved and cannot be set -fail_compilation/reserved_version.d(141): Error: version identifier `ARM_Thumb` is reserved and cannot be set -fail_compilation/reserved_version.d(142): Error: version identifier `ARM_SoftFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(143): Error: version identifier `ARM_SoftFP` is reserved and cannot be set -fail_compilation/reserved_version.d(144): Error: version identifier `ARM_HardFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(145): Error: version identifier `AArch64` is reserved and cannot be set -fail_compilation/reserved_version.d(146): Error: version identifier `Epiphany` is reserved and cannot be set -fail_compilation/reserved_version.d(147): Error: version identifier `PPC` is reserved and cannot be set -fail_compilation/reserved_version.d(148): Error: version identifier `PPC_SoftFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(149): Error: version identifier `PPC_HardFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(150): Error: version identifier `PPC64` is reserved and cannot be set -fail_compilation/reserved_version.d(151): Error: version identifier `IA64` is reserved and cannot be set -fail_compilation/reserved_version.d(152): Error: version identifier `MIPS32` is reserved and cannot be set -fail_compilation/reserved_version.d(153): Error: version identifier `MIPS64` is reserved and cannot be set -fail_compilation/reserved_version.d(154): Error: version identifier `MIPS_O32` is reserved and cannot be set -fail_compilation/reserved_version.d(155): Error: version identifier `MIPS_N32` is reserved and cannot be set -fail_compilation/reserved_version.d(156): Error: version identifier `MIPS_O64` is reserved and cannot be set -fail_compilation/reserved_version.d(157): Error: version identifier `MIPS_N64` is reserved and cannot be set -fail_compilation/reserved_version.d(158): Error: version identifier `MIPS_EABI` is reserved and cannot be set -fail_compilation/reserved_version.d(159): Error: version identifier `MIPS_SoftFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(160): Error: version identifier `MIPS_HardFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(161): Error: version identifier `NVPTX` is reserved and cannot be set -fail_compilation/reserved_version.d(162): Error: version identifier `NVPTX64` is reserved and cannot be set -fail_compilation/reserved_version.d(163): Error: version identifier `RISCV32` is reserved and cannot be set -fail_compilation/reserved_version.d(164): Error: version identifier `RISCV64` is reserved and cannot be set -fail_compilation/reserved_version.d(165): Error: version identifier `SPARC` is reserved and cannot be set -fail_compilation/reserved_version.d(166): Error: version identifier `SPARC_V8Plus` is reserved and cannot be set -fail_compilation/reserved_version.d(167): Error: version identifier `SPARC_SoftFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(168): Error: version identifier `SPARC_HardFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(169): Error: version identifier `SPARC64` is reserved and cannot be set -fail_compilation/reserved_version.d(170): Error: version identifier `S390` is reserved and cannot be set -fail_compilation/reserved_version.d(171): Error: version identifier `S390X` is reserved and cannot be set -fail_compilation/reserved_version.d(172): Error: version identifier `SystemZ` is reserved and cannot be set -fail_compilation/reserved_version.d(173): Error: version identifier `HPPA` is reserved and cannot be set -fail_compilation/reserved_version.d(174): Error: version identifier `HPPA64` is reserved and cannot be set -fail_compilation/reserved_version.d(175): Error: version identifier `SH` is reserved and cannot be set -fail_compilation/reserved_version.d(176): Error: version identifier `Alpha` is reserved and cannot be set -fail_compilation/reserved_version.d(177): Error: version identifier `Alpha_SoftFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(178): Error: version identifier `Alpha_HardFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(179): Error: version identifier `LoongArch32` is reserved and cannot be set -fail_compilation/reserved_version.d(180): Error: version identifier `LoongArch64` is reserved and cannot be set -fail_compilation/reserved_version.d(181): Error: version identifier `LoongArch_HardFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(182): Error: version identifier `LoongArch_SoftFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(183): Error: version identifier `Xtensa` is reserved and cannot be set -fail_compilation/reserved_version.d(184): Error: version identifier `LittleEndian` is reserved and cannot be set -fail_compilation/reserved_version.d(185): Error: version identifier `BigEndian` is reserved and cannot be set -fail_compilation/reserved_version.d(186): Error: version identifier `ELFv1` is reserved and cannot be set -fail_compilation/reserved_version.d(187): Error: version identifier `ELFv2` is reserved and cannot be set -fail_compilation/reserved_version.d(188): Error: version identifier `CRuntime_Bionic` is reserved and cannot be set -fail_compilation/reserved_version.d(189): Error: version identifier `CRuntime_DigitalMars` is reserved and cannot be set -fail_compilation/reserved_version.d(190): Error: version identifier `CRuntime_Glibc` is reserved and cannot be set -fail_compilation/reserved_version.d(191): Error: version identifier `CRuntime_Microsoft` is reserved and cannot be set -fail_compilation/reserved_version.d(192): Error: version identifier `CRuntime_Musl` is reserved and cannot be set -fail_compilation/reserved_version.d(193): Error: version identifier `CRuntime_Newlib` is reserved and cannot be set -fail_compilation/reserved_version.d(194): Error: version identifier `CRuntime_UClibc` is reserved and cannot be set -fail_compilation/reserved_version.d(195): Error: version identifier `CRuntime_WASI` is reserved and cannot be set -fail_compilation/reserved_version.d(196): Error: version identifier `D_Coverage` is reserved and cannot be set -fail_compilation/reserved_version.d(197): Error: version identifier `D_Ddoc` is reserved and cannot be set -fail_compilation/reserved_version.d(198): Error: version identifier `D_InlineAsm_X86` is reserved and cannot be set -fail_compilation/reserved_version.d(199): Error: version identifier `D_InlineAsm_X86_64` is reserved and cannot be set -fail_compilation/reserved_version.d(200): Error: version identifier `D_LP64` is reserved and cannot be set -fail_compilation/reserved_version.d(201): Error: version identifier `D_X32` is reserved and cannot be set -fail_compilation/reserved_version.d(202): Error: version identifier `D_HardFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(203): Error: version identifier `D_SoftFloat` is reserved and cannot be set -fail_compilation/reserved_version.d(204): Error: version identifier `D_PIC` is reserved and cannot be set -fail_compilation/reserved_version.d(205): Error: version identifier `D_SIMD` is reserved and cannot be set -fail_compilation/reserved_version.d(206): Error: version identifier `D_Version2` is reserved and cannot be set -fail_compilation/reserved_version.d(207): Error: version identifier `D_NoBoundsChecks` is reserved and cannot be set -fail_compilation/reserved_version.d(210): Error: version identifier `all` is reserved and cannot be set -fail_compilation/reserved_version.d(211): Error: version identifier `none` is reserved and cannot be set -fail_compilation/reserved_version.d(212): Error: version identifier `AsmJS` is reserved and cannot be set -fail_compilation/reserved_version.d(213): Error: version identifier `Emscripten` is reserved and cannot be set -fail_compilation/reserved_version.d(214): Error: version identifier `WebAssembly` is reserved and cannot be set -fail_compilation/reserved_version.d(215): Error: version identifier `WASI` is reserved and cannot be set -fail_compilation/reserved_version.d(216): Error: version identifier `CppRuntime_LLVM` is reserved and cannot be set -fail_compilation/reserved_version.d(217): Error: version identifier `CppRuntime_DigitalMars` is reserved and cannot be set -fail_compilation/reserved_version.d(218): Error: version identifier `CppRuntime_GNU` is reserved and cannot be set -fail_compilation/reserved_version.d(219): Error: version identifier `CppRuntime_Microsoft` is reserved and cannot be set -fail_compilation/reserved_version.d(220): Error: version identifier `CppRuntime_Sun` is reserved and cannot be set -fail_compilation/reserved_version.d(221): Error: version identifier `D_PIE` is reserved and cannot be set -fail_compilation/reserved_version.d(222): Error: version identifier `AVR` is reserved and cannot be set -fail_compilation/reserved_version.d(223): Error: version identifier `D_PreConditions` is reserved and cannot be set -fail_compilation/reserved_version.d(224): Error: version identifier `D_PostConditions` is reserved and cannot be set -fail_compilation/reserved_version.d(225): Error: version identifier `D_ProfileGC` is reserved and cannot be set -fail_compilation/reserved_version.d(226): Error: version identifier `D_Invariants` is reserved and cannot be set -fail_compilation/reserved_version.d(227): Error: version identifier `D_Optimized` is reserved and cannot be set -fail_compilation/reserved_version.d(228): Error: version identifier `VisionOS` is reserved and cannot be set +fail_compilation/reserved_version.d(377): Error: version identifier `MSP430` is reserved and cannot be set +version = MSP430; + ^ +fail_compilation/reserved_version.d(378): Error: version identifier `D_P16` is reserved and cannot be set +version = D_P16; + ^ +fail_compilation/reserved_version.d(379): Error: version identifier `DigitalMars` is reserved and cannot be set +version = DigitalMars; + ^ +fail_compilation/reserved_version.d(380): Error: version identifier `GNU` is reserved and cannot be set +version = GNU; + ^ +fail_compilation/reserved_version.d(381): Error: version identifier `LDC` is reserved and cannot be set +version = LDC; + ^ +fail_compilation/reserved_version.d(382): Error: version identifier `SDC` is reserved and cannot be set +version = SDC; + ^ +fail_compilation/reserved_version.d(383): Error: version identifier `Windows` is reserved and cannot be set +version = Windows; + ^ +fail_compilation/reserved_version.d(384): Error: version identifier `Win32` is reserved and cannot be set +version = Win32; + ^ +fail_compilation/reserved_version.d(385): Error: version identifier `Win64` is reserved and cannot be set +version = Win64; + ^ +fail_compilation/reserved_version.d(386): Error: version identifier `linux` is reserved and cannot be set +version = linux; + ^ +fail_compilation/reserved_version.d(387): Error: version identifier `OSX` is reserved and cannot be set +version = OSX; + ^ +fail_compilation/reserved_version.d(388): Error: version identifier `iOS` is reserved and cannot be set +version = iOS; + ^ +fail_compilation/reserved_version.d(389): Error: version identifier `TVOS` is reserved and cannot be set +version = TVOS; + ^ +fail_compilation/reserved_version.d(390): Error: version identifier `WatchOS` is reserved and cannot be set +version = WatchOS; + ^ +fail_compilation/reserved_version.d(391): Error: version identifier `FreeBSD` is reserved and cannot be set +version = FreeBSD; + ^ +fail_compilation/reserved_version.d(392): Error: version identifier `OpenBSD` is reserved and cannot be set +version = OpenBSD; + ^ +fail_compilation/reserved_version.d(393): Error: version identifier `NetBSD` is reserved and cannot be set +version = NetBSD; + ^ +fail_compilation/reserved_version.d(394): Error: version identifier `DragonFlyBSD` is reserved and cannot be set +version = DragonFlyBSD; + ^ +fail_compilation/reserved_version.d(395): Error: version identifier `BSD` is reserved and cannot be set +version = BSD; + ^ +fail_compilation/reserved_version.d(396): Error: version identifier `Solaris` is reserved and cannot be set +version = Solaris; + ^ +fail_compilation/reserved_version.d(397): Error: version identifier `Posix` is reserved and cannot be set +version = Posix; + ^ +fail_compilation/reserved_version.d(398): Error: version identifier `AIX` is reserved and cannot be set +version = AIX; + ^ +fail_compilation/reserved_version.d(399): Error: version identifier `Haiku` is reserved and cannot be set +version = Haiku; + ^ +fail_compilation/reserved_version.d(400): Error: version identifier `SkyOS` is reserved and cannot be set +version = SkyOS; + ^ +fail_compilation/reserved_version.d(401): Error: version identifier `SysV3` is reserved and cannot be set +version = SysV3; + ^ +fail_compilation/reserved_version.d(402): Error: version identifier `SysV4` is reserved and cannot be set +version = SysV4; + ^ +fail_compilation/reserved_version.d(403): Error: version identifier `Hurd` is reserved and cannot be set +version = Hurd; + ^ +fail_compilation/reserved_version.d(404): Error: version identifier `Android` is reserved and cannot be set +version = Android; + ^ +fail_compilation/reserved_version.d(405): Error: version identifier `PlayStation` is reserved and cannot be set +version = PlayStation; + ^ +fail_compilation/reserved_version.d(406): Error: version identifier `PlayStation4` is reserved and cannot be set +version = PlayStation4; + ^ +fail_compilation/reserved_version.d(407): Error: version identifier `Cygwin` is reserved and cannot be set +version = Cygwin; + ^ +fail_compilation/reserved_version.d(408): Error: version identifier `MinGW` is reserved and cannot be set +version = MinGW; + ^ +fail_compilation/reserved_version.d(409): Error: version identifier `FreeStanding` is reserved and cannot be set +version = FreeStanding; + ^ +fail_compilation/reserved_version.d(410): Error: version identifier `X86` is reserved and cannot be set +version = X86; + ^ +fail_compilation/reserved_version.d(411): Error: version identifier `X86_64` is reserved and cannot be set +version = X86_64; + ^ +fail_compilation/reserved_version.d(412): Error: version identifier `ARM` is reserved and cannot be set +version = ARM; + ^ +fail_compilation/reserved_version.d(413): Error: version identifier `ARM_Thumb` is reserved and cannot be set +version = ARM_Thumb; + ^ +fail_compilation/reserved_version.d(414): Error: version identifier `ARM_SoftFloat` is reserved and cannot be set +version = ARM_SoftFloat; + ^ +fail_compilation/reserved_version.d(415): Error: version identifier `ARM_SoftFP` is reserved and cannot be set +version = ARM_SoftFP; + ^ +fail_compilation/reserved_version.d(416): Error: version identifier `ARM_HardFloat` is reserved and cannot be set +version = ARM_HardFloat; + ^ +fail_compilation/reserved_version.d(417): Error: version identifier `AArch64` is reserved and cannot be set +version = AArch64; + ^ +fail_compilation/reserved_version.d(418): Error: version identifier `Epiphany` is reserved and cannot be set +version = Epiphany; + ^ +fail_compilation/reserved_version.d(419): Error: version identifier `PPC` is reserved and cannot be set +version = PPC; + ^ +fail_compilation/reserved_version.d(420): Error: version identifier `PPC_SoftFloat` is reserved and cannot be set +version = PPC_SoftFloat; + ^ +fail_compilation/reserved_version.d(421): Error: version identifier `PPC_HardFloat` is reserved and cannot be set +version = PPC_HardFloat; + ^ +fail_compilation/reserved_version.d(422): Error: version identifier `PPC64` is reserved and cannot be set +version = PPC64; + ^ +fail_compilation/reserved_version.d(423): Error: version identifier `IA64` is reserved and cannot be set +version = IA64; + ^ +fail_compilation/reserved_version.d(424): Error: version identifier `MIPS32` is reserved and cannot be set +version = MIPS32; + ^ +fail_compilation/reserved_version.d(425): Error: version identifier `MIPS64` is reserved and cannot be set +version = MIPS64; + ^ +fail_compilation/reserved_version.d(426): Error: version identifier `MIPS_O32` is reserved and cannot be set +version = MIPS_O32; + ^ +fail_compilation/reserved_version.d(427): Error: version identifier `MIPS_N32` is reserved and cannot be set +version = MIPS_N32; + ^ +fail_compilation/reserved_version.d(428): Error: version identifier `MIPS_O64` is reserved and cannot be set +version = MIPS_O64; + ^ +fail_compilation/reserved_version.d(429): Error: version identifier `MIPS_N64` is reserved and cannot be set +version = MIPS_N64; + ^ +fail_compilation/reserved_version.d(430): Error: version identifier `MIPS_EABI` is reserved and cannot be set +version = MIPS_EABI; + ^ +fail_compilation/reserved_version.d(431): Error: version identifier `MIPS_SoftFloat` is reserved and cannot be set +version = MIPS_SoftFloat; + ^ +fail_compilation/reserved_version.d(432): Error: version identifier `MIPS_HardFloat` is reserved and cannot be set +version = MIPS_HardFloat; + ^ +fail_compilation/reserved_version.d(433): Error: version identifier `NVPTX` is reserved and cannot be set +version = NVPTX; + ^ +fail_compilation/reserved_version.d(434): Error: version identifier `NVPTX64` is reserved and cannot be set +version = NVPTX64; + ^ +fail_compilation/reserved_version.d(435): Error: version identifier `RISCV32` is reserved and cannot be set +version = RISCV32; + ^ +fail_compilation/reserved_version.d(436): Error: version identifier `RISCV64` is reserved and cannot be set +version = RISCV64; + ^ +fail_compilation/reserved_version.d(437): Error: version identifier `SPARC` is reserved and cannot be set +version = SPARC; + ^ +fail_compilation/reserved_version.d(438): Error: version identifier `SPARC_V8Plus` is reserved and cannot be set +version = SPARC_V8Plus; + ^ +fail_compilation/reserved_version.d(439): Error: version identifier `SPARC_SoftFloat` is reserved and cannot be set +version = SPARC_SoftFloat; + ^ +fail_compilation/reserved_version.d(440): Error: version identifier `SPARC_HardFloat` is reserved and cannot be set +version = SPARC_HardFloat; + ^ +fail_compilation/reserved_version.d(441): Error: version identifier `SPARC64` is reserved and cannot be set +version = SPARC64; + ^ +fail_compilation/reserved_version.d(442): Error: version identifier `S390` is reserved and cannot be set +version = S390; + ^ +fail_compilation/reserved_version.d(443): Error: version identifier `S390X` is reserved and cannot be set +version = S390X; + ^ +fail_compilation/reserved_version.d(444): Error: version identifier `SystemZ` is reserved and cannot be set +version = SystemZ; + ^ +fail_compilation/reserved_version.d(445): Error: version identifier `HPPA` is reserved and cannot be set +version = HPPA; + ^ +fail_compilation/reserved_version.d(446): Error: version identifier `HPPA64` is reserved and cannot be set +version = HPPA64; + ^ +fail_compilation/reserved_version.d(447): Error: version identifier `SH` is reserved and cannot be set +version = SH; + ^ +fail_compilation/reserved_version.d(448): Error: version identifier `Alpha` is reserved and cannot be set +version = Alpha; + ^ +fail_compilation/reserved_version.d(449): Error: version identifier `Alpha_SoftFloat` is reserved and cannot be set +version = Alpha_SoftFloat; + ^ +fail_compilation/reserved_version.d(450): Error: version identifier `Alpha_HardFloat` is reserved and cannot be set +version = Alpha_HardFloat; + ^ +fail_compilation/reserved_version.d(451): Error: version identifier `LoongArch32` is reserved and cannot be set +version = LoongArch32; + ^ +fail_compilation/reserved_version.d(452): Error: version identifier `LoongArch64` is reserved and cannot be set +version = LoongArch64; + ^ +fail_compilation/reserved_version.d(453): Error: version identifier `LoongArch_HardFloat` is reserved and cannot be set +version = LoongArch_HardFloat; + ^ +fail_compilation/reserved_version.d(454): Error: version identifier `LoongArch_SoftFloat` is reserved and cannot be set +version = LoongArch_SoftFloat; + ^ +fail_compilation/reserved_version.d(455): Error: version identifier `Xtensa` is reserved and cannot be set +version = Xtensa; + ^ +fail_compilation/reserved_version.d(456): Error: version identifier `LittleEndian` is reserved and cannot be set +version = LittleEndian; + ^ +fail_compilation/reserved_version.d(457): Error: version identifier `BigEndian` is reserved and cannot be set +version = BigEndian; + ^ +fail_compilation/reserved_version.d(458): Error: version identifier `ELFv1` is reserved and cannot be set +version = ELFv1; + ^ +fail_compilation/reserved_version.d(459): Error: version identifier `ELFv2` is reserved and cannot be set +version = ELFv2; + ^ +fail_compilation/reserved_version.d(460): Error: version identifier `CRuntime_Bionic` is reserved and cannot be set +version = CRuntime_Bionic; + ^ +fail_compilation/reserved_version.d(461): Error: version identifier `CRuntime_DigitalMars` is reserved and cannot be set +version = CRuntime_DigitalMars; + ^ +fail_compilation/reserved_version.d(462): Error: version identifier `CRuntime_Glibc` is reserved and cannot be set +version = CRuntime_Glibc; + ^ +fail_compilation/reserved_version.d(463): Error: version identifier `CRuntime_Microsoft` is reserved and cannot be set +version = CRuntime_Microsoft; + ^ +fail_compilation/reserved_version.d(464): Error: version identifier `CRuntime_Musl` is reserved and cannot be set +version = CRuntime_Musl; + ^ +fail_compilation/reserved_version.d(465): Error: version identifier `CRuntime_Newlib` is reserved and cannot be set +version = CRuntime_Newlib; + ^ +fail_compilation/reserved_version.d(466): Error: version identifier `CRuntime_UClibc` is reserved and cannot be set +version = CRuntime_UClibc; + ^ +fail_compilation/reserved_version.d(467): Error: version identifier `CRuntime_WASI` is reserved and cannot be set +version = CRuntime_WASI; + ^ +fail_compilation/reserved_version.d(468): Error: version identifier `D_Coverage` is reserved and cannot be set +version = D_Coverage; + ^ +fail_compilation/reserved_version.d(469): Error: version identifier `D_Ddoc` is reserved and cannot be set +version = D_Ddoc; + ^ +fail_compilation/reserved_version.d(470): Error: version identifier `D_InlineAsm_X86` is reserved and cannot be set +version = D_InlineAsm_X86; + ^ +fail_compilation/reserved_version.d(471): Error: version identifier `D_InlineAsm_X86_64` is reserved and cannot be set +version = D_InlineAsm_X86_64; + ^ +fail_compilation/reserved_version.d(472): Error: version identifier `D_LP64` is reserved and cannot be set +version = D_LP64; + ^ +fail_compilation/reserved_version.d(473): Error: version identifier `D_X32` is reserved and cannot be set +version = D_X32; + ^ +fail_compilation/reserved_version.d(474): Error: version identifier `D_HardFloat` is reserved and cannot be set +version = D_HardFloat; + ^ +fail_compilation/reserved_version.d(475): Error: version identifier `D_SoftFloat` is reserved and cannot be set +version = D_SoftFloat; + ^ +fail_compilation/reserved_version.d(476): Error: version identifier `D_PIC` is reserved and cannot be set +version = D_PIC; + ^ +fail_compilation/reserved_version.d(477): Error: version identifier `D_SIMD` is reserved and cannot be set +version = D_SIMD; + ^ +fail_compilation/reserved_version.d(478): Error: version identifier `D_Version2` is reserved and cannot be set +version = D_Version2; + ^ +fail_compilation/reserved_version.d(479): Error: version identifier `D_NoBoundsChecks` is reserved and cannot be set +version = D_NoBoundsChecks; + ^ +fail_compilation/reserved_version.d(482): Error: version identifier `all` is reserved and cannot be set +version = all; + ^ +fail_compilation/reserved_version.d(483): Error: version identifier `none` is reserved and cannot be set +version = none; + ^ +fail_compilation/reserved_version.d(484): Error: version identifier `AsmJS` is reserved and cannot be set +version = AsmJS; + ^ +fail_compilation/reserved_version.d(485): Error: version identifier `Emscripten` is reserved and cannot be set +version = Emscripten; + ^ +fail_compilation/reserved_version.d(486): Error: version identifier `WebAssembly` is reserved and cannot be set +version = WebAssembly; + ^ +fail_compilation/reserved_version.d(487): Error: version identifier `WASI` is reserved and cannot be set +version = WASI; + ^ +fail_compilation/reserved_version.d(488): Error: version identifier `CppRuntime_LLVM` is reserved and cannot be set +version = CppRuntime_LLVM; + ^ +fail_compilation/reserved_version.d(489): Error: version identifier `CppRuntime_DigitalMars` is reserved and cannot be set +version = CppRuntime_DigitalMars; + ^ +fail_compilation/reserved_version.d(490): Error: version identifier `CppRuntime_GNU` is reserved and cannot be set +version = CppRuntime_GNU; + ^ +fail_compilation/reserved_version.d(491): Error: version identifier `CppRuntime_Microsoft` is reserved and cannot be set +version = CppRuntime_Microsoft; + ^ +fail_compilation/reserved_version.d(492): Error: version identifier `CppRuntime_Sun` is reserved and cannot be set +version = CppRuntime_Sun; + ^ +fail_compilation/reserved_version.d(493): Error: version identifier `D_PIE` is reserved and cannot be set +version = D_PIE; + ^ +fail_compilation/reserved_version.d(494): Error: version identifier `AVR` is reserved and cannot be set +version = AVR; + ^ +fail_compilation/reserved_version.d(495): Error: version identifier `D_PreConditions` is reserved and cannot be set +version = D_PreConditions; + ^ +fail_compilation/reserved_version.d(496): Error: version identifier `D_PostConditions` is reserved and cannot be set +version = D_PostConditions; + ^ +fail_compilation/reserved_version.d(497): Error: version identifier `D_ProfileGC` is reserved and cannot be set +version = D_ProfileGC; + ^ +fail_compilation/reserved_version.d(498): Error: version identifier `D_Invariants` is reserved and cannot be set +version = D_Invariants; + ^ +fail_compilation/reserved_version.d(499): Error: version identifier `D_Optimized` is reserved and cannot be set +version = D_Optimized; + ^ +fail_compilation/reserved_version.d(500): Error: version identifier `VisionOS` is reserved and cannot be set +version = VisionOS; + ^ --- */ // Some extra empty lines to help fixup the manual line numbering after adding new version identifiers -#line 105 +// Line 105 starts here version = MSP430; version = D_P16; version = DigitalMars; diff --git a/compiler/test/fail_compilation/retref2.d b/compiler/test/fail_compilation/retref2.d index ca64653efaec..0012afb71aa5 100644 --- a/compiler/test/fail_compilation/retref2.d +++ b/compiler/test/fail_compilation/retref2.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/retref2.d(18): Error: function `ref int retref2.D.foo(return ref int)` does not override any function, did you mean to override `ref int retref2.C.foo(ref int)`? -fail_compilation/retref2.d(19): Error: function `ref int retref2.D.bar() scope return` does not override any function, did you mean to override `ref int retref2.C.bar()`? +fail_compilation/retref2.d(22): Error: function `ref int retref2.D.foo(return ref int)` does not override any function, did you mean to override `ref int retref2.C.foo(ref int)`? + override ref int foo(return ref int); + ^ +fail_compilation/retref2.d(23): Error: function `ref int retref2.D.bar() scope return` does not override any function, did you mean to override `ref int retref2.C.bar()`? + override ref int bar() return; + ^ --- */ diff --git a/compiler/test/fail_compilation/safe_gshared.d b/compiler/test/fail_compilation/safe_gshared.d index ea0775cf9a74..6fb029fd3cd1 100644 --- a/compiler/test/fail_compilation/safe_gshared.d +++ b/compiler/test/fail_compilation/safe_gshared.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/safe_gshared.d(13): Error: `@safe` function `f` cannot access `__gshared` data `x` -fail_compilation/safe_gshared.d(14): Error: `@safe` function `f` cannot access `__gshared` data `x` +fail_compilation/safe_gshared.d(17): Error: `@safe` function `f` cannot access `__gshared` data `x` + x++; + ^ +fail_compilation/safe_gshared.d(18): Error: `@safe` function `f` cannot access `__gshared` data `x` + return x; + ^ --- */ diff --git a/compiler/test/fail_compilation/safe_pointer_index.d b/compiler/test/fail_compilation/safe_pointer_index.d index 4b107dba8144..ecd970dbe49e 100644 --- a/compiler/test/fail_compilation/safe_pointer_index.d +++ b/compiler/test/fail_compilation/safe_pointer_index.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/safe_pointer_index.d(11): Error: `@safe` function `f` cannot index pointer `x` +fail_compilation/safe_pointer_index.d(13): Error: `@safe` function `f` cannot index pointer `x` + int z = x[1]; + ^ --- */ diff --git a/compiler/test/fail_compilation/scope_class.d b/compiler/test/fail_compilation/scope_class.d index b5e1a54d71bb..a3b975d51620 100644 --- a/compiler/test/fail_compilation/scope_class.d +++ b/compiler/test/fail_compilation/scope_class.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/scope_class.d(12): Error: functions cannot return `scope scope_class.C` +fail_compilation/scope_class.d(14): Error: functions cannot return `scope scope_class.C` +C increment(C c) + ^ --- */ diff --git a/compiler/test/fail_compilation/skip.d b/compiler/test/fail_compilation/skip.d index 6207a106ddb5..64f45c8d1bb5 100644 --- a/compiler/test/fail_compilation/skip.d +++ b/compiler/test/fail_compilation/skip.d @@ -2,10 +2,18 @@ * REQUIRED_ARGS: -de * TEST_OUTPUT: --- -fail_compilation/skip.d(23): Error: `switch` skips declaration of `with` temporary -fail_compilation/skip.d(28): declared here -fail_compilation/skip.d(45): Error: `switch` skips declaration of variable `skip.test14532.n` -fail_compilation/skip.d(47): declared here +fail_compilation/skip.d(31): Error: `switch` skips declaration of `with` temporary + switch( a ) + ^ +fail_compilation/skip.d(36): declared here + with( struct_with_long_name ) + ^ +fail_compilation/skip.d(53): Error: `switch` skips declaration of variable `skip.test14532.n` + switch (ch) + ^ +fail_compilation/skip.d(55): declared here + int n = 42; + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=10524 diff --git a/compiler/test/fail_compilation/spell23908.d b/compiler/test/fail_compilation/spell23908.d index a7501e1ca545..14043b08cb44 100644 --- a/compiler/test/fail_compilation/spell23908.d +++ b/compiler/test/fail_compilation/spell23908.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/spell23908a.d imports/spell23908b.d TEST_OUTPUT: --- fail_compilation/imports/spell23908a.d(3): Error: module `imports.spell23908b` import `nonexistent` not found +import imports.spell23908b : nonexistent; + ^ --- */ diff --git a/compiler/test/fail_compilation/spell9644.d b/compiler/test/fail_compilation/spell9644.d index 0c6d67ba283a..eae646a10859 100644 --- a/compiler/test/fail_compilation/spell9644.d +++ b/compiler/test/fail_compilation/spell9644.d @@ -3,14 +3,30 @@ /* TEST_OUTPUT: --- -fail_compilation/spell9644.d(26): Error: undefined identifier `b` -fail_compilation/spell9644.d(27): Error: undefined identifier `xx` -fail_compilation/spell9644.d(28): Error: undefined identifier `cb`, did you mean variable `ab`? -fail_compilation/spell9644.d(29): Error: undefined identifier `bc`, did you mean variable `abc`? -fail_compilation/spell9644.d(30): Error: undefined identifier `ccc` -fail_compilation/spell9644.d(32): Error: undefined identifier `cor2`, did you mean variable `cor1`? -fail_compilation/spell9644.d(33): Error: undefined identifier `pua`, did you mean variable `pub`? -fail_compilation/spell9644.d(34): Error: undefined identifier `priw` +fail_compilation/spell9644.d(42): Error: undefined identifier `b` + cast(void)b; // max distance 0, no match + ^ +fail_compilation/spell9644.d(43): Error: undefined identifier `xx` + cast(void)xx; // max distance 1, no match + ^ +fail_compilation/spell9644.d(44): Error: undefined identifier `cb`, did you mean variable `ab`? + cast(void)cb; // max distance 1, match + ^ +fail_compilation/spell9644.d(45): Error: undefined identifier `bc`, did you mean variable `abc`? + cast(void)bc; // max distance 1, match + ^ +fail_compilation/spell9644.d(46): Error: undefined identifier `ccc` + cast(void)ccc; // max distance 2, match + ^ +fail_compilation/spell9644.d(48): Error: undefined identifier `cor2`, did you mean variable `cor1`? + cast(void)cor2; // max distance 1, match "cor1", but not cora from import (bug 13736) + ^ +fail_compilation/spell9644.d(49): Error: undefined identifier `pua`, did you mean variable `pub`? + cast(void)pua; // max distance 1, match "pub" from import + ^ +fail_compilation/spell9644.d(50): Error: undefined identifier `priw` + cast(void)priw; // max distance 1, match "priv" from import, but do not report (bug 5839) + ^ --- */ diff --git a/compiler/test/fail_compilation/standalone_modctor.d b/compiler/test/fail_compilation/standalone_modctor.d index cb36ed6b790d..f851711b404f 100644 --- a/compiler/test/fail_compilation/standalone_modctor.d +++ b/compiler/test/fail_compilation/standalone_modctor.d @@ -1,9 +1,15 @@ /** TEST_OUTPUT: --- -fail_compilation/standalone_modctor.d(11): Error: `@standalone` can only be used on shared static constructors -fail_compilation/standalone_modctor.d(12): Error: a module constructor using `@standalone` must be `@system` or `@trusted` -fail_compilation/standalone_modctor.d(13): Error: a module constructor using `@standalone` must be `@system` or `@trusted` +fail_compilation/standalone_modctor.d(17): Error: `@standalone` can only be used on shared static constructors +@standalone static this() {} + ^ +fail_compilation/standalone_modctor.d(18): Error: a module constructor using `@standalone` must be `@system` or `@trusted` +@standalone shared static this() {} + ^ +fail_compilation/standalone_modctor.d(19): Error: a module constructor using `@standalone` must be `@system` or `@trusted` +@standalone shared static this() @safe {} + ^ --- */ import core.attribute : standalone; diff --git a/compiler/test/fail_compilation/static_import.d b/compiler/test/fail_compilation/static_import.d index 24b7bc195468..d1f4e5d7086f 100644 --- a/compiler/test/fail_compilation/static_import.d +++ b/compiler/test/fail_compilation/static_import.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/static_import.d(8): Error: static import `core` cannot have an import bind list +fail_compilation/static_import.d(10): Error: static import `core` cannot have an import bind list +static import core.stdc.stdio : p = q; + ^ --- */ diff --git a/compiler/test/fail_compilation/staticarrayoverflow.d b/compiler/test/fail_compilation/staticarrayoverflow.d index 028f8e124875..b4ed4817a9b3 100644 --- a/compiler/test/fail_compilation/staticarrayoverflow.d +++ b/compiler/test/fail_compilation/staticarrayoverflow.d @@ -2,14 +2,30 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/staticarrayoverflow.d(23): Error: static array `S[cast(size_t)1879048192]` size overflowed to 7516192768000 -fail_compilation/staticarrayoverflow.d(23): Error: variable `staticarrayoverflow.y` size overflow -fail_compilation/staticarrayoverflow.d(25): Error: static array `S[cast(size_t)8070450532247928832]` size overflowed to 8070450532247928832 -fail_compilation/staticarrayoverflow.d(25): Error: variable `staticarrayoverflow.a` size overflow -fail_compilation/staticarrayoverflow.d(26): Error: static array `S[0][18446744073709551615LU]` size overflowed to 18446744073709551615 -fail_compilation/staticarrayoverflow.d(26): Error: variable `staticarrayoverflow.b` size overflow -fail_compilation/staticarrayoverflow.d(27): Error: static array `S[0][cast(size_t)4294967295]` size overflowed to 4294967295 -fail_compilation/staticarrayoverflow.d(27): Error: variable `staticarrayoverflow.c` size overflow +fail_compilation/staticarrayoverflow.d(39): Error: static array `S[cast(size_t)1879048192]` size overflowed to 7516192768000 +S[0x7000_0000] y; + ^ +fail_compilation/staticarrayoverflow.d(39): Error: variable `staticarrayoverflow.y` size overflow +S[0x7000_0000] y; + ^ +fail_compilation/staticarrayoverflow.d(41): Error: static array `S[cast(size_t)8070450532247928832]` size overflowed to 8070450532247928832 +S[0x7000_0000_0000_0000] a; + ^ +fail_compilation/staticarrayoverflow.d(41): Error: variable `staticarrayoverflow.a` size overflow +S[0x7000_0000_0000_0000] a; + ^ +fail_compilation/staticarrayoverflow.d(42): Error: static array `S[0][18446744073709551615LU]` size overflowed to 18446744073709551615 +S[0][-1] b; + ^ +fail_compilation/staticarrayoverflow.d(42): Error: variable `staticarrayoverflow.b` size overflow +S[0][-1] b; + ^ +fail_compilation/staticarrayoverflow.d(43): Error: static array `S[0][cast(size_t)4294967295]` size overflowed to 4294967295 +S[0][uint.max] c; + ^ +fail_compilation/staticarrayoverflow.d(43): Error: variable `staticarrayoverflow.c` size overflow +S[0][uint.max] c; + ^ --- */ diff --git a/compiler/test/fail_compilation/staticassert_sema1.d b/compiler/test/fail_compilation/staticassert_sema1.d index e64c437de32b..40ce855ce9a1 100644 --- a/compiler/test/fail_compilation/staticassert_sema1.d +++ b/compiler/test/fail_compilation/staticassert_sema1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/staticassert_sema1.d(17): Error: static assert: "unsupported OS" +fail_compilation/staticassert_sema1.d(19): Error: static assert: "unsupported OS" + static assert(0, msg); + ^ --- */ diff --git a/compiler/test/fail_compilation/staticassertargs.d b/compiler/test/fail_compilation/staticassertargs.d index 9591fd809a90..708156569952 100644 --- a/compiler/test/fail_compilation/staticassertargs.d +++ b/compiler/test/fail_compilation/staticassertargs.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/staticassertargs.d(9): Error: static assert: abcxe3!! +fail_compilation/staticassertargs.d(11): Error: static assert: abcxe3!! +static assert(false, "abc", ['x', 'e'], 3, e); +^ --- */ diff --git a/compiler/test/fail_compilation/staticassertargsfail.d b/compiler/test/fail_compilation/staticassertargsfail.d index 911d58875628..fb559c203538 100644 --- a/compiler/test/fail_compilation/staticassertargsfail.d +++ b/compiler/test/fail_compilation/staticassertargsfail.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/staticassertargsfail.d(10): Error: incompatible types for `('x') : (new Object)`: `char` and `object.Object` -fail_compilation/staticassertargsfail.d(10): while evaluating `static assert` argument `['x', new Object] ~ ""` +fail_compilation/staticassertargsfail.d(14): Error: incompatible types for `('x') : (new Object)`: `char` and `object.Object` +static assert(0, "abc", ['x', new Object] ~ ""); + ^ +fail_compilation/staticassertargsfail.d(14): while evaluating `static assert` argument `['x', new Object] ~ ""` +static assert(0, "abc", ['x', new Object] ~ ""); +^ --- */ diff --git a/compiler/test/fail_compilation/staticforeach1.d b/compiler/test/fail_compilation/staticforeach1.d index b58f520c0bf3..6abeec7dfaff 100644 --- a/compiler/test/fail_compilation/staticforeach1.d +++ b/compiler/test/fail_compilation/staticforeach1.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/staticforeach1.d(10): Error: must use labeled `break` within `static foreach` +fail_compilation/staticforeach1.d(12): Error: must use labeled `break` within `static foreach` + break; + ^ --- */ void main(){ diff --git a/compiler/test/fail_compilation/staticforeach2.d b/compiler/test/fail_compilation/staticforeach2.d index 25e283efb5cd..a8ebd4797f83 100644 --- a/compiler/test/fail_compilation/staticforeach2.d +++ b/compiler/test/fail_compilation/staticforeach2.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/staticforeach2.d(10): Error: must use labeled `continue` within `static foreach` +fail_compilation/staticforeach2.d(12): Error: must use labeled `continue` within `static foreach` + continue; + ^ --- */ void main(){ diff --git a/compiler/test/fail_compilation/staticforeach3.d b/compiler/test/fail_compilation/staticforeach3.d index a93d20be86fe..1f0fc31d5277 100644 --- a/compiler/test/fail_compilation/staticforeach3.d +++ b/compiler/test/fail_compilation/staticforeach3.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/staticforeach3.d(7): Error: variable `staticforeach3.__anonymous.i` conflicts with variable `staticforeach3.__anonymous.i` at fail_compilation/staticforeach3.d(7) +fail_compilation/staticforeach3.d(9): Error: variable `staticforeach3.__anonymous.i` conflicts with variable `staticforeach3.__anonymous.i` at fail_compilation/staticforeach3.d(9) +static foreach(i,i;[0]){} +^ --- */ static foreach(i,i;[0]){} diff --git a/compiler/test/fail_compilation/switches.d b/compiler/test/fail_compilation/switches.d index 06652c8cf345..e75454463962 100644 --- a/compiler/test/fail_compilation/switches.d +++ b/compiler/test/fail_compilation/switches.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/switches.d(14): Error: `case 2` not found -fail_compilation/switches.d(25): Error: no `case` statement following `goto case;` +fail_compilation/switches.d(18): Error: `case 2` not found + goto case 2; + ^ +fail_compilation/switches.d(29): Error: no `case` statement following `goto case;` + goto case; + ^ --- */ diff --git a/compiler/test/fail_compilation/system_ptr_cast.d b/compiler/test/fail_compilation/system_ptr_cast.d index fc10b2a78010..6545b0265702 100644 --- a/compiler/test/fail_compilation/system_ptr_cast.d +++ b/compiler/test/fail_compilation/system_ptr_cast.d @@ -2,10 +2,14 @@ REQUIRED_ARGS: -preview=dip1000 -de TEST_OUTPUT: --- -fail_compilation/system_ptr_cast.d(20): Deprecation: cast from `S*` to `int*` not allowed in safe code -fail_compilation/system_ptr_cast.d(20): Source element type has unsafe bit patterns and target element type is mutable -fail_compilation/system_ptr_cast.d(24): Deprecation: cast from `int*` to `S*` not allowed in safe code -fail_compilation/system_ptr_cast.d(24): Target element type has unsafe bit patterns +fail_compilation/system_ptr_cast.d(24): Deprecation: cast from `S*` to `int*` not allowed in safe code + auto p = cast(int*) &s; + ^ +fail_compilation/system_ptr_cast.d(24): Source element type has unsafe bit patterns and target element type is mutable +fail_compilation/system_ptr_cast.d(28): Deprecation: cast from `int*` to `S*` not allowed in safe code + auto ps = cast(S*) &i; + ^ +fail_compilation/system_ptr_cast.d(28): Target element type has unsafe bit patterns --- */ diff --git a/compiler/test/fail_compilation/systemvariables.d b/compiler/test/fail_compilation/systemvariables.d index 796eda609353..e7f2ccb777ab 100644 --- a/compiler/test/fail_compilation/systemvariables.d +++ b/compiler/test/fail_compilation/systemvariables.d @@ -2,24 +2,60 @@ REQUIRED_ARGS: -preview=systemVariables TEST_OUTPUT: --- -fail_compilation/systemvariables.d(39): Error: cannot access `@system` variable `gInt` in @safe code -fail_compilation/systemvariables.d(29): `gInt` is declared here -fail_compilation/systemvariables.d(40): Error: cannot access `@system` variable `gInt` in @safe code -fail_compilation/systemvariables.d(29): `gInt` is declared here -fail_compilation/systemvariables.d(41): Error: cannot access `@system` variable `gArr` in @safe code -fail_compilation/systemvariables.d(31): `gArr` is declared here -fail_compilation/systemvariables.d(42): Error: cannot access `@system` variable `gArr` in @safe code -fail_compilation/systemvariables.d(31): `gArr` is declared here -fail_compilation/systemvariables.d(43): Error: cannot access `@system` variable `gInt` in @safe code -fail_compilation/systemvariables.d(29): `gInt` is declared here -fail_compilation/systemvariables.d(46): Error: cannot access `@system` variable `lSys` in @safe code -fail_compilation/systemvariables.d(45): `lSys` is declared here -fail_compilation/systemvariables.d(47): Error: cannot access `@system` variable `lSys` in @safe code -fail_compilation/systemvariables.d(45): `lSys` is declared here -fail_compilation/systemvariables.d(48): Error: cannot access `@system` variable `lSys` in @safe code -fail_compilation/systemvariables.d(45): `lSys` is declared here -fail_compilation/systemvariables.d(50): Error: cannot access `@system` variable `eInt` in @safe code -fail_compilation/systemvariables.d(30): `eInt` is declared here +fail_compilation/systemvariables.d(75): Error: cannot access `@system` variable `gInt` in @safe code + gInt = 0; // error + ^ +fail_compilation/systemvariables.d(65): `gInt` is declared here +@system int gInt; + ^ +fail_compilation/systemvariables.d(76): Error: cannot access `@system` variable `gInt` in @safe code + gInt++; // error + ^ +fail_compilation/systemvariables.d(65): `gInt` is declared here +@system int gInt; + ^ +fail_compilation/systemvariables.d(77): Error: cannot access `@system` variable `gArr` in @safe code + gArr ~= 30; // error + ^ +fail_compilation/systemvariables.d(67): `gArr` is declared here +@system { int[] gArr; } + ^ +fail_compilation/systemvariables.d(78): Error: cannot access `@system` variable `gArr` in @safe code + const c = gArr[0]; // error + ^ +fail_compilation/systemvariables.d(67): `gArr` is declared here +@system { int[] gArr; } + ^ +fail_compilation/systemvariables.d(79): Error: cannot access `@system` variable `gInt` in @safe code + aliasToSys++; // error + ^ +fail_compilation/systemvariables.d(65): `gInt` is declared here +@system int gInt; + ^ +fail_compilation/systemvariables.d(82): Error: cannot access `@system` variable `lSys` in @safe code + lSys = 0; // error + ^ +fail_compilation/systemvariables.d(81): `lSys` is declared here + @system int lSys = 0; + ^ +fail_compilation/systemvariables.d(83): Error: cannot access `@system` variable `lSys` in @safe code + increment(lSys); // error + ^ +fail_compilation/systemvariables.d(81): `lSys` is declared here + @system int lSys = 0; + ^ +fail_compilation/systemvariables.d(84): Error: cannot access `@system` variable `lSys` in @safe code + incrementP(&lSys); // error + ^ +fail_compilation/systemvariables.d(81): `lSys` is declared here + @system int lSys = 0; + ^ +fail_compilation/systemvariables.d(86): Error: cannot access `@system` variable `eInt` in @safe code + int a = eInt; // error + ^ +fail_compilation/systemvariables.d(66): `eInt` is declared here +@system enum int eInt = 3; + ^ --- */ diff --git a/compiler/test/fail_compilation/systemvariables_bool_union.d b/compiler/test/fail_compilation/systemvariables_bool_union.d index ca6e620a51a3..7cf46e5472d3 100644 --- a/compiler/test/fail_compilation/systemvariables_bool_union.d +++ b/compiler/test/fail_compilation/systemvariables_bool_union.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/systemvariables_bool_union.d(21): Deprecation: cannot access overlapped field `Box.b` with unsafe bit patterns in `@safe` code +fail_compilation/systemvariables_bool_union.d(23): Deprecation: cannot access overlapped field `Box.b` with unsafe bit patterns in `@safe` code + return u.b; + ^ --- */ diff --git a/compiler/test/fail_compilation/systemvariables_deprecation.d b/compiler/test/fail_compilation/systemvariables_deprecation.d index b5115351efeb..10561c3f1c61 100644 --- a/compiler/test/fail_compilation/systemvariables_deprecation.d +++ b/compiler/test/fail_compilation/systemvariables_deprecation.d @@ -2,10 +2,16 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/systemvariables_deprecation.d(16): Deprecation: `@safe` function `main` calling `middle` -fail_compilation/systemvariables_deprecation.d(21): which calls `systemvariables_deprecation.inferred` -fail_compilation/systemvariables_deprecation.d(27): which wouldn't be `@safe` because of: -fail_compilation/systemvariables_deprecation.d(27): cannot access `@system` variable `x0` in @safe code +fail_compilation/systemvariables_deprecation.d(22): Deprecation: `@safe` function `main` calling `middle` + middle(); // nested deprecation + ^ +fail_compilation/systemvariables_deprecation.d(27): which calls `systemvariables_deprecation.inferred` + return inferred(); // no deprecation, inferredC is not explicit `@safe` + ^ +fail_compilation/systemvariables_deprecation.d(33): which wouldn't be `@safe` because of: + x0 = null; + ^ +fail_compilation/systemvariables_deprecation.d(33): cannot access `@system` variable `x0` in @safe code --- */ diff --git a/compiler/test/fail_compilation/systemvariables_struct.d b/compiler/test/fail_compilation/systemvariables_struct.d index 7d8bfabeb7db..745cfddd0fa0 100644 --- a/compiler/test/fail_compilation/systemvariables_struct.d +++ b/compiler/test/fail_compilation/systemvariables_struct.d @@ -2,16 +2,36 @@ REQUIRED_ARGS: -preview=systemVariables TEST_OUTPUT: --- -fail_compilation/systemvariables_struct.d(31): Error: cannot access `@system` field `S.syst` in `@safe` code -fail_compilation/systemvariables_struct.d(32): Error: cannot access `@system` field `S.syst` in `@safe` code -fail_compilation/systemvariables_struct.d(33): Error: cannot access `@system` field `S.syst` in `@safe` code -fail_compilation/systemvariables_struct.d(36): Error: cannot access `@system` field `S.syst` in `@safe` code -fail_compilation/systemvariables_struct.d(37): Error: cannot access `@system` field `S.syst` in `@safe` code -fail_compilation/systemvariables_struct.d(38): Error: cannot access `@system` field `S.syst` in `@safe` code -fail_compilation/systemvariables_struct.d(54): Error: cannot access `@system` field `S2.syst` in `@safe` code -fail_compilation/systemvariables_struct.d(55): Error: cannot access `@system` field `S2.syst` in `@safe` code +fail_compilation/systemvariables_struct.d(51): Error: cannot access `@system` field `S.syst` in `@safe` code + s0.syst = null; + ^ +fail_compilation/systemvariables_struct.d(52): Error: cannot access `@system` field `S.syst` in `@safe` code + __traits(getMember, s0, "syst") = null; + ^ +fail_compilation/systemvariables_struct.d(53): Error: cannot access `@system` field `S.syst` in `@safe` code + s0.tupleof[0] = null; + ^ fail_compilation/systemvariables_struct.d(56): Error: cannot access `@system` field `S.syst` in `@safe` code + auto a0 = s0.syst; + ^ fail_compilation/systemvariables_struct.d(57): Error: cannot access `@system` field `S.syst` in `@safe` code + auto a1 = __traits(getMember, s0, "syst"); + ^ +fail_compilation/systemvariables_struct.d(58): Error: cannot access `@system` field `S.syst` in `@safe` code + auto a2 = s0.tupleof[0]; + ^ +fail_compilation/systemvariables_struct.d(74): Error: cannot access `@system` field `S2.syst` in `@safe` code + gs2.syst.syst = null; + ^ +fail_compilation/systemvariables_struct.d(75): Error: cannot access `@system` field `S2.syst` in `@safe` code + gs2.syst.safe = null; + ^ +fail_compilation/systemvariables_struct.d(76): Error: cannot access `@system` field `S.syst` in `@safe` code + gs2.safe.syst = null; + ^ +fail_compilation/systemvariables_struct.d(77): Error: cannot access `@system` field `S.syst` in `@safe` code + gs2.safe.syst.safe = null; + ^ --- */ diff --git a/compiler/test/fail_compilation/systemvariables_var_init.d b/compiler/test/fail_compilation/systemvariables_var_init.d index 221bd54f44cc..5319fc949a11 100644 --- a/compiler/test/fail_compilation/systemvariables_var_init.d +++ b/compiler/test/fail_compilation/systemvariables_var_init.d @@ -2,12 +2,24 @@ REQUIRED_ARGS: -preview=systemVariables TEST_OUTPUT: --- -fail_compilation/systemvariables_var_init.d(24): Error: cannot access `@system` variable `ptrEnum` in @safe code -fail_compilation/systemvariables_var_init.d(16): `ptrEnum` is inferred to be `@system` from its initializer here -fail_compilation/systemvariables_var_init.d(25): Error: cannot access `@system` variable `ptrConst` in @safe code -fail_compilation/systemvariables_var_init.d(17): `ptrConst` is inferred to be `@system` from its initializer here -fail_compilation/systemvariables_var_init.d(27): Error: cannot access `@system` variable `ptrVar` in @safe code -fail_compilation/systemvariables_var_init.d(19): `ptrVar` is inferred to be `@system` from its initializer here +fail_compilation/systemvariables_var_init.d(36): Error: cannot access `@system` variable `ptrEnum` in @safe code + *ptrEnum = 0; + ^ +fail_compilation/systemvariables_var_init.d(28): `ptrEnum` is inferred to be `@system` from its initializer here +enum uint* ptrEnum = cast(uint*) 0xC00000; + ^ +fail_compilation/systemvariables_var_init.d(37): Error: cannot access `@system` variable `ptrConst` in @safe code + *ptrConst = 0; + ^ +fail_compilation/systemvariables_var_init.d(29): `ptrConst` is inferred to be `@system` from its initializer here +const uint* ptrConst = cast(uint*) 0xC00000; + ^ +fail_compilation/systemvariables_var_init.d(39): Error: cannot access `@system` variable `ptrVar` in @safe code + *ptrVar = 0; + ^ +fail_compilation/systemvariables_var_init.d(31): `ptrVar` is inferred to be `@system` from its initializer here +uint* ptrVar = cast(uint*) 0xC00000; + ^ --- */ diff --git a/compiler/test/fail_compilation/systemvariables_void_init.d b/compiler/test/fail_compilation/systemvariables_void_init.d index ea0e55daff3d..dc9c0dda8ac8 100644 --- a/compiler/test/fail_compilation/systemvariables_void_init.d +++ b/compiler/test/fail_compilation/systemvariables_void_init.d @@ -2,13 +2,27 @@ REQUIRED_ARGS: -preview=systemVariables TEST_OUTPUT: --- -fail_compilation/systemvariables_void_init.d(48): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions -fail_compilation/systemvariables_void_init.d(49): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions -fail_compilation/systemvariables_void_init.d(50): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions -fail_compilation/systemvariables_void_init.d(51): Error: a `bool` must be 0 or 1, so void intializing it is not allowed in safe functions -fail_compilation/systemvariables_void_init.d(52): Error: a `bool` must be 0 or 1, so void intializing it is not allowed in safe functions -fail_compilation/systemvariables_void_init.d(53): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions -fail_compilation/systemvariables_void_init.d(54): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions +fail_compilation/systemvariables_void_init.d(62): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions + S s = void; + ^ +fail_compilation/systemvariables_void_init.d(63): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions + C c = void; + ^ +fail_compilation/systemvariables_void_init.d(64): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions + E e = void; + ^ +fail_compilation/systemvariables_void_init.d(65): Error: a `bool` must be 0 or 1, so void intializing it is not allowed in safe functions + const bool b = void; + ^ +fail_compilation/systemvariables_void_init.d(66): Error: a `bool` must be 0 or 1, so void intializing it is not allowed in safe functions + B bb = void; + ^ +fail_compilation/systemvariables_void_init.d(67): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions + SB sb = void; + ^ +fail_compilation/systemvariables_void_init.d(68): Error: `void` initializers for types with unsafe bit patterns are not allowed in safe functions + SSB ssb = void; + ^ --- */ diff --git a/compiler/test/fail_compilation/template_decl.d b/compiler/test/fail_compilation/template_decl.d index d986dd65065f..64c4c57fd51f 100644 --- a/compiler/test/fail_compilation/template_decl.d +++ b/compiler/test/fail_compilation/template_decl.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/template_decl.d(8): Error: `{` expected after template parameter list, not `(` -fail_compilation/template_decl.d(8): Error: declaration expected, not `(` +fail_compilation/template_decl.d(12): Error: `{` expected after template parameter list, not `(` +template b(alias d)() { + ^ +fail_compilation/template_decl.d(12): Error: declaration expected, not `(` +template b(alias d)() { + ^ --- */ template b(alias d)() { diff --git a/compiler/test/fail_compilation/template_enum_param.d b/compiler/test/fail_compilation/template_enum_param.d index 79fb5e4d8f85..3990e0f39e57 100644 --- a/compiler/test/fail_compilation/template_enum_param.d +++ b/compiler/test/fail_compilation/template_enum_param.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/template_enum_param.d(15): Error: static assert: `false` is false -fail_compilation/template_enum_param.d(17): instantiated from here: `X!(E.a)` +fail_compilation/template_enum_param.d(19): Error: static assert: `false` is false + static assert(false); + ^ +fail_compilation/template_enum_param.d(21): instantiated from here: `X!(E.a)` +alias Y = X!(E.a); + ^ --- */ diff --git a/compiler/test/fail_compilation/template_function_oop.d b/compiler/test/fail_compilation/template_function_oop.d index 84db02e87e66..c37d3a6642cf 100644 --- a/compiler/test/fail_compilation/template_function_oop.d +++ b/compiler/test/fail_compilation/template_function_oop.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/template_function_oop.d(16): Deprecation: a function template is not virtual so cannot be marked `override` -fail_compilation/template_function_oop.d(17): Deprecation: a function template is not virtual so cannot be marked `abstract` +fail_compilation/template_function_oop.d(20): Deprecation: a function template is not virtual so cannot be marked `override` + override void f()() {} + ^ +fail_compilation/template_function_oop.d(21): Deprecation: a function template is not virtual so cannot be marked `abstract` + abstract void g()(); + ^ --- */ class C diff --git a/compiler/test/fail_compilation/templateoverload.d b/compiler/test/fail_compilation/templateoverload.d index 420e0b8b31f5..9c4d8af37917 100644 --- a/compiler/test/fail_compilation/templateoverload.d +++ b/compiler/test/fail_compilation/templateoverload.d @@ -1,14 +1,26 @@ /* TEST_OUTPUT: --- -fail_compilation/templateoverload.d(17): Error: template instance `T!1` does not match any template declaration -fail_compilation/templateoverload.d(17): Candidates are: -fail_compilation/templateoverload.d(14): T(X) -fail_compilation/templateoverload.d(15): T() -fail_compilation/templateoverload.d(22): Error: template instance `V!int` does not match any template declaration -fail_compilation/templateoverload.d(22): Candidates are: -fail_compilation/templateoverload.d(19): V(int i) -fail_compilation/templateoverload.d(20): V(T, alias a) +fail_compilation/templateoverload.d(29): Error: template instance `T!1` does not match any template declaration +alias t = T!1; + ^ +fail_compilation/templateoverload.d(29): Candidates are: +fail_compilation/templateoverload.d(26): T(X) +template T(X) {} +^ +fail_compilation/templateoverload.d(27): T() +template T() {} +^ +fail_compilation/templateoverload.d(34): Error: template instance `V!int` does not match any template declaration +alias v = V!int; + ^ +fail_compilation/templateoverload.d(34): Candidates are: +fail_compilation/templateoverload.d(31): V(int i) +template V(int i) {} +^ +fail_compilation/templateoverload.d(32): V(T, alias a) +template V(T, alias a) {} +^ --- */ template T(X) {} diff --git a/compiler/test/fail_compilation/templatethis.d b/compiler/test/fail_compilation/templatethis.d index 73036d959b4a..aca329b6fe07 100644 --- a/compiler/test/fail_compilation/templatethis.d +++ b/compiler/test/fail_compilation/templatethis.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/templatethis.d(13): Error: cannot use `this` outside an aggregate type -fail_compilation/templatethis.d(17): Error: cannot use `this` outside an aggregate type -fail_compilation/templatethis.d(21): Error: cannot use `this` outside an aggregate type -fail_compilation/templatethis.d(23): Error: cannot use `this` outside an aggregate type +fail_compilation/templatethis.d(25): Error: cannot use `this` outside an aggregate type +template t(this T) + ^ fail_compilation/templatethis.d(29): Error: cannot use `this` outside an aggregate type -fail_compilation/templatethis.d(32): Error: mixin `templatethis.t2!()` error instantiating +struct S(this T) + ^ +fail_compilation/templatethis.d(33): Error: cannot use `this` outside an aggregate type +enum e(this T) = 1; + ^ +fail_compilation/templatethis.d(35): Error: cannot use `this` outside an aggregate type +void f(this T)() + ^ +fail_compilation/templatethis.d(41): Error: cannot use `this` outside an aggregate type + int i(this T) = 1; + ^ +fail_compilation/templatethis.d(44): Error: mixin `templatethis.t2!()` error instantiating +mixin t2; +^ --- */ diff --git a/compiler/test/fail_compilation/test10.d b/compiler/test/fail_compilation/test10.d index 4c1425772b25..700ac6983a70 100644 --- a/compiler/test/fail_compilation/test10.d +++ b/compiler/test/fail_compilation/test10.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test10.d(10): Error: found `else` without a corresponding `if`, `version` or `debug` statement +fail_compilation/test10.d(12): Error: found `else` without a corresponding `if`, `version` or `debug` statement + else + ^ --- */ diff --git a/compiler/test/fail_compilation/test11006.d b/compiler/test/fail_compilation/test11006.d index e7257b7c2e31..112780e1d003 100644 --- a/compiler/test/fail_compilation/test11006.d +++ b/compiler/test/fail_compilation/test11006.d @@ -1,10 +1,18 @@ /* REQUIRED_ARGS: -main -de * TEST_OUTPUT: --- -fail_compilation/test11006.d(10): Deprecation: cannot subtract pointers to different types: `void*` and `int*`. -fail_compilation/test11006.d(10): while evaluating: `static assert(2L == 2L)` -fail_compilation/test11006.d(11): Deprecation: cannot subtract pointers to different types: `int*` and `void*`. -fail_compilation/test11006.d(11): while evaluating: `static assert(8L == 8L)` +fail_compilation/test11006.d(18): Deprecation: cannot subtract pointers to different types: `void*` and `int*`. +static assert(cast(void*)8 - cast(int*) 0 == 2L); + ^ +fail_compilation/test11006.d(18): while evaluating: `static assert(2L == 2L)` +static assert(cast(void*)8 - cast(int*) 0 == 2L); +^ +fail_compilation/test11006.d(19): Deprecation: cannot subtract pointers to different types: `int*` and `void*`. +static assert(cast(int*) 8 - cast(void*)0 == 8L); + ^ +fail_compilation/test11006.d(19): while evaluating: `static assert(8L == 8L)` +static assert(cast(int*) 8 - cast(void*)0 == 8L); +^ --- */ static assert(cast(void*)8 - cast(int*) 0 == 2L); diff --git a/compiler/test/fail_compilation/test11047.d b/compiler/test/fail_compilation/test11047.d index 6f4f64439c94..04249034f888 100644 --- a/compiler/test/fail_compilation/test11047.d +++ b/compiler/test/fail_compilation/test11047.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test11047.d(11): Error: value of `x` is not known at compile time -fail_compilation/test11047.d(11): Error: value of `x` is not known at compile time +fail_compilation/test11047.d(15): Error: value of `x` is not known at compile time +@(++x, ++x) void foo(){} + ^ +fail_compilation/test11047.d(15): Error: value of `x` is not known at compile time +@(++x, ++x) void foo(){} + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=11047 diff --git a/compiler/test/fail_compilation/test11176.d b/compiler/test/fail_compilation/test11176.d index 5ef7324ce8ca..e0c5e2f1b33b 100644 --- a/compiler/test/fail_compilation/test11176.d +++ b/compiler/test/fail_compilation/test11176.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test11176.d(12): Error: `b.ptr` cannot be used in `@safe` code, use `&b[0]` instead fail_compilation/test11176.d(16): Error: `b.ptr` cannot be used in `@safe` code, use `&b[0]` instead + return *b.ptr; + ^ +fail_compilation/test11176.d(20): Error: `b.ptr` cannot be used in `@safe` code, use `&b[0]` instead + return *b.ptr; + ^ --- */ diff --git a/compiler/test/fail_compilation/test11471.d b/compiler/test/fail_compilation/test11471.d index 3e24f103247f..059f2763693d 100644 --- a/compiler/test/fail_compilation/test11471.d +++ b/compiler/test/fail_compilation/test11471.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test11471.d(10): Error: `asm` statement is assumed to throw - mark it with `nothrow` if it does not +fail_compilation/test11471.d(12): Error: `asm` statement is assumed to throw - mark it with `nothrow` if it does not +{ asm { nop; } } // Error: asm statements are assumed to throw + ^ --- */ diff --git a/compiler/test/fail_compilation/test12228.d b/compiler/test/fail_compilation/test12228.d index d96b2a522d93..263f94d18178 100644 --- a/compiler/test/fail_compilation/test12228.d +++ b/compiler/test/fail_compilation/test12228.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test12228.d(12): Error: undefined identifier `this`, did you mean `typeof(this)`? -fail_compilation/test12228.d(18): Error: undefined identifier `super`, did you mean `typeof(super)`? -fail_compilation/test12228.d(19): Error: undefined identifier `super`, did you mean `typeof(super)`? +fail_compilation/test12228.d(18): Error: undefined identifier `this`, did you mean `typeof(this)`? + shared(this) x; + ^ +fail_compilation/test12228.d(24): Error: undefined identifier `super`, did you mean `typeof(super)`? + shared(super) a; + ^ +fail_compilation/test12228.d(25): Error: undefined identifier `super`, did you mean `typeof(super)`? + super b; + ^ --- */ diff --git a/compiler/test/fail_compilation/test12385.d b/compiler/test/fail_compilation/test12385.d index cbba723fe749..c15ee88a960d 100644 --- a/compiler/test/fail_compilation/test12385.d +++ b/compiler/test/fail_compilation/test12385.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test12385.d(29): Error: cannot modify `immutable` expression `unbundled.x` +fail_compilation/test12385.d(31): Error: cannot modify `immutable` expression `unbundled.x` + States.unbundled.x = 6; // Modifies x. + ^ --- */ diff --git a/compiler/test/fail_compilation/test12430.d b/compiler/test/fail_compilation/test12430.d index 92ee79eb99c1..f9ef7b9cb5d7 100644 --- a/compiler/test/fail_compilation/test12430.d +++ b/compiler/test/fail_compilation/test12430.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/test12430.d(17): Error: simd operator must be an integer constant, not `op` +fail_compilation/test12430.d(19): Error: simd operator must be an integer constant, not `op` + auto b = __simd(op, a); + ^ --- */ diff --git a/compiler/test/fail_compilation/test12558.d b/compiler/test/fail_compilation/test12558.d index 5ff7c97804a7..ca04c91efb08 100644 --- a/compiler/test/fail_compilation/test12558.d +++ b/compiler/test/fail_compilation/test12558.d @@ -1,24 +1,38 @@ /* TEST_OUTPUT: --- -fail_compilation/test12558.d(32): Deprecation: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(32): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(36): Deprecation: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(36): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(43): Deprecation: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(43): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(47): Deprecation: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(47): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(56): Deprecation: `catch` statement without an exception specification is deprecated +fail_compilation/test12558.d(46): Deprecation: `catch` statement without an exception specification is deprecated + handler(); + ^ +fail_compilation/test12558.d(46): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(50): Deprecation: `catch` statement without an exception specification is deprecated +fail_compilation/test12558.d(50): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(57): Deprecation: `catch` statement without an exception specification is deprecated + handler(); + ^ +fail_compilation/test12558.d(57): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(61): Deprecation: `catch` statement without an exception specification is deprecated +fail_compilation/test12558.d(61): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(70): Deprecation: `catch` statement without an exception specification is deprecated + assert(false); + ^ +fail_compilation/test12558.d(70): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(45): Error: `catch` statement without an exception specification is deprecated + } catch + ^ +fail_compilation/test12558.d(45): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(50): Error: `catch` statement without an exception specification is deprecated + } catch { + ^ +fail_compilation/test12558.d(50): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(56): Error: `catch` statement without an exception specification is deprecated + } catch + ^ fail_compilation/test12558.d(56): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(31): Error: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(31): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(36): Error: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(36): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(42): Error: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(42): use `catch(Throwable)` for old behavior -fail_compilation/test12558.d(47): Error: `catch` statement without an exception specification is deprecated -fail_compilation/test12558.d(47): use `catch(Throwable)` for old behavior +fail_compilation/test12558.d(61): Error: `catch` statement without an exception specification is deprecated + } catch { + ^ +fail_compilation/test12558.d(61): use `catch(Throwable)` for old behavior --- */ diff --git a/compiler/test/fail_compilation/test128.i b/compiler/test/fail_compilation/test128.i index fbbd5e7d7588..2c8e7a1f25b7 100644 --- a/compiler/test/fail_compilation/test128.i +++ b/compiler/test/fail_compilation/test128.i @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/test128.i(12): Error: unsigned __int128 not supported -fail_compilation/test128.i(12): Error: __int128 not supported +fail_compilation/test128.i(16): Error: unsigned __int128 not supported + unsigned __int128 __res = (__int128) __X * __Y; + ^ +fail_compilation/test128.i(16): Error: __int128 not supported + unsigned __int128 __res = (__int128) __X * __Y; + ^ --- */ diff --git a/compiler/test/fail_compilation/test12822.d b/compiler/test/fail_compilation/test12822.d index 510d9e2a9f15..66e7a2dce197 100644 --- a/compiler/test/fail_compilation/test12822.d +++ b/compiler/test/fail_compilation/test12822.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test12822.d(13): Error: cannot modify delegate pointer in `@safe` code `dg.ptr` -fail_compilation/test12822.d(14): Error: `dg.funcptr` cannot be used in `@safe` code +fail_compilation/test12822.d(17): Error: cannot modify delegate pointer in `@safe` code `dg.ptr` + dg.ptr = &i; + ^ +fail_compilation/test12822.d(18): Error: `dg.funcptr` cannot be used in `@safe` code + dg.funcptr = &func; + ^ --- */ diff --git a/compiler/test/fail_compilation/test13152.d b/compiler/test/fail_compilation/test13152.d index 8033e2817680..63ffe9a01933 100644 --- a/compiler/test/fail_compilation/test13152.d +++ b/compiler/test/fail_compilation/test13152.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/test13152a.d imports/test13152b.d imports/test13152c.d imports/test13152d.d imports/test13152e.d imports/test13152f.d imports/test13152g.d imports/test13152h.d imports/test13152i.d imports/test13152j.d imports/test13152k.d imports/test13152l.d imports/test13152m.d imports/test13152n.d imports/test13152o.d imports/test13152p.d imports/test13152q.d imports/test13152r.d imports/test13152s.d imports/test13152t.d imports/test13152u.d imports/test13152v.d imports/test13152w.d imports/test13152x.d imports/test13152y.d imports/test13152z.d TEST_OUTPUT: --- -fail_compilation/test13152.d(12): Error: undefined identifier `x` +fail_compilation/test13152.d(14): Error: undefined identifier `x` + auto y = x; + ^ --- */ import imports.test13152a; diff --git a/compiler/test/fail_compilation/test13536.d b/compiler/test/fail_compilation/test13536.d index eff807ab5a34..ecf2d339c841 100644 --- a/compiler/test/fail_compilation/test13536.d +++ b/compiler/test/fail_compilation/test13536.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test13536.d(22): Error: field `U.sysDg` cannot access pointers in `@safe` code that overlap other fields -fail_compilation/test13536.d(23): Error: field `U.safeDg` cannot access pointers in `@safe` code that overlap other fields +fail_compilation/test13536.d(26): Error: field `U.sysDg` cannot access pointers in `@safe` code that overlap other fields + u.sysDg = &s.sysMethod; + ^ +fail_compilation/test13536.d(27): Error: field `U.safeDg` cannot access pointers in `@safe` code that overlap other fields + u.safeDg(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test13537.d b/compiler/test/fail_compilation/test13537.d index 8e9811c5773b..328124970856 100644 --- a/compiler/test/fail_compilation/test13537.d +++ b/compiler/test/fail_compilation/test13537.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/test13537.d(31): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes -fail_compilation/test13537.d(32): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes -fail_compilation/test13537.d(33): Error: field `U.z` cannot access pointers in `@safe` code that overlap other fields -fail_compilation/test13537.d(34): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes +fail_compilation/test13537.d(39): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes + u.y = 1; + ^ +fail_compilation/test13537.d(40): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes + int* p = &u.y; + ^ +fail_compilation/test13537.d(41): Error: field `U.z` cannot access pointers in `@safe` code that overlap other fields + int** q = &u.z; + ^ +fail_compilation/test13537.d(42): Error: field `U.y` cannot modify fields in `@safe` code that overlap fields with other storage classes + abc(u.y); + ^ --- */ diff --git a/compiler/test/fail_compilation/test13698.d b/compiler/test/fail_compilation/test13698.d index eb74b0aceef9..6e6d05eb63b0 100644 --- a/compiler/test/fail_compilation/test13698.d +++ b/compiler/test/fail_compilation/test13698.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test13698.d(16): Error: constant expression expected, not `cast(void)b` +fail_compilation/test13698.d(18): Error: constant expression expected, not `cast(void)b` + a = __simd(XMM.SHUFPS, a, b); + ^ --- */ diff --git a/compiler/test/fail_compilation/test13786.d b/compiler/test/fail_compilation/test13786.d index 73ec588c7773..36319cc13f78 100644 --- a/compiler/test/fail_compilation/test13786.d +++ b/compiler/test/fail_compilation/test13786.d @@ -1,13 +1,27 @@ /* TEST_OUTPUT: --- -fail_compilation/test13786.d(16): Deprecation: `debug = ` is deprecated, use debug identifiers instead -fail_compilation/test13786.d(18): Deprecation: `version = ` is deprecated, use version identifiers instead -fail_compilation/test13786.d(16): Error: debug `123` level declaration must be at module level -fail_compilation/test13786.d(17): Error: debug `abc` declaration must be at module level -fail_compilation/test13786.d(18): Error: version `123` level declaration must be at module level -fail_compilation/test13786.d(19): Error: version `abc` declaration must be at module level -fail_compilation/test13786.d(22): Error: template instance `test13786.T!()` error instantiating +fail_compilation/test13786.d(30): Deprecation: `debug = ` is deprecated, use debug identifiers instead + debug = 123; + ^ +fail_compilation/test13786.d(32): Deprecation: `version = ` is deprecated, use version identifiers instead + version = 123; + ^ +fail_compilation/test13786.d(30): Error: debug `123` level declaration must be at module level + debug = 123; + ^ +fail_compilation/test13786.d(31): Error: debug `abc` declaration must be at module level + debug = abc; + ^ +fail_compilation/test13786.d(32): Error: version `123` level declaration must be at module level + version = 123; + ^ +fail_compilation/test13786.d(33): Error: version `abc` declaration must be at module level + version = abc; + ^ +fail_compilation/test13786.d(36): Error: template instance `test13786.T!()` error instantiating +alias X = T!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test13867.d b/compiler/test/fail_compilation/test13867.d index 36543f92ebe9..0c177c277552 100644 --- a/compiler/test/fail_compilation/test13867.d +++ b/compiler/test/fail_compilation/test13867.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test13867.d(12): Error: function `void test13867.X.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`? -fail_compilation/test13867.d(19): Error: function `void test13867.Z.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`? +fail_compilation/test13867.d(16): Error: function `void test13867.X.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`? + override void blah();//Error + ^ +fail_compilation/test13867.d(23): Error: function `void test13867.Z.blah()` does not override any function, did you mean to override `extern (C++) void test13867.Base.blah()`? + override void blah(){}//Error + ^ --- */ extern (C++) class Base { diff --git a/compiler/test/fail_compilation/test14064.d b/compiler/test/fail_compilation/test14064.d index 9513e47fdb0b..a93b528d6a94 100644 --- a/compiler/test/fail_compilation/test14064.d +++ b/compiler/test/fail_compilation/test14064.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: --- -fail_compilation/test14064.d(11): Error: `private` is a keyword, not an `@` attribute -fail_compilation/test14064.d(12): Error: `deprecated` is a keyword, not an `@` attribute -fail_compilation/test14064.d(13): Error: `pure` is a keyword, not an `@` attribute -fail_compilation/test14064.d(14): Error: `nothrow` is a keyword, not an `@` attribute -fail_compilation/test14064.d(15): Error: `in` is a keyword, not an `@` attribute +fail_compilation/test14064.d(21): Error: `private` is a keyword, not an `@` attribute +@private int v; + ^ +fail_compilation/test14064.d(22): Error: `deprecated` is a keyword, not an `@` attribute +@deprecated void foo(); + ^ +fail_compilation/test14064.d(23): Error: `pure` is a keyword, not an `@` attribute +int goo() @pure; + ^ +fail_compilation/test14064.d(24): Error: `nothrow` is a keyword, not an `@` attribute +@nothrow unittest {}; + ^ +fail_compilation/test14064.d(25): Error: `in` is a keyword, not an `@` attribute +void zoom(@in int x); + ^ --- */ @private int v; diff --git a/compiler/test/fail_compilation/test14238.d b/compiler/test/fail_compilation/test14238.d index e1cd39c595af..0794fe5c0d25 100644 --- a/compiler/test/fail_compilation/test14238.d +++ b/compiler/test/fail_compilation/test14238.d @@ -1,10 +1,18 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test14238.d(22): Error: scope parameter `fn` may not be returned -fail_compilation/test14238.d(25): Error: function `test14238.bar` is `@nogc` yet allocates closure for `bar()` with the GC -fail_compilation/test14238.d(27): function `test14238.bar.baz` closes over variable `x` -fail_compilation/test14238.d(26): `x` declared here +fail_compilation/test14238.d(30): Error: scope parameter `fn` may not be returned + return fn(); // Error + ^ +fail_compilation/test14238.d(33): Error: function `test14238.bar` is `@nogc` yet allocates closure for `bar()` with the GC +ref int bar() @nogc { + ^ +fail_compilation/test14238.d(35): function `test14238.bar.baz` closes over variable `x` + ref int baz() { + ^ +fail_compilation/test14238.d(34): `x` declared here + int x; + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=14238 diff --git a/compiler/test/fail_compilation/test143.d b/compiler/test/fail_compilation/test143.d index 1a1ed70698bf..ccc8addd3035 100644 --- a/compiler/test/fail_compilation/test143.d +++ b/compiler/test/fail_compilation/test143.d @@ -4,7 +4,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test143.d(20): Error: undefined identifier `x` +fail_compilation/test143.d(22): Error: undefined identifier `x` + bar(x); + ^ --- */ module test143; diff --git a/compiler/test/fail_compilation/test14496.d b/compiler/test/fail_compilation/test14496.d index 94d5d0ffc5ff..9c7d95f0247d 100644 --- a/compiler/test/fail_compilation/test14496.d +++ b/compiler/test/fail_compilation/test14496.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/test14496.d(21): Error: `void` initializers for pointers not allowed in safe functions -fail_compilation/test14496.d(24): Error: `void` initializers for pointers not allowed in safe functions -fail_compilation/test14496.d(28): Error: `void` initializers for pointers not allowed in safe functions -fail_compilation/test14496.d(48): Error: `void` initializers for pointers not allowed in safe functions -fail_compilation/test14496.d(49): Error: `void` initializers for pointers not allowed in safe functions -fail_compilation/test14496.d(50): Error: `void` initializers for pointers not allowed in safe functions +fail_compilation/test14496.d(33): Error: `void` initializers for pointers not allowed in safe functions + Foo f = void; + ^ +fail_compilation/test14496.d(36): Error: `void` initializers for pointers not allowed in safe functions + Foo foo = void; + ^ +fail_compilation/test14496.d(40): Error: `void` initializers for pointers not allowed in safe functions + int* x = void; + ^ +fail_compilation/test14496.d(60): Error: `void` initializers for pointers not allowed in safe functions + Bar bar; + ^ +fail_compilation/test14496.d(61): Error: `void` initializers for pointers not allowed in safe functions + Baz baz; + ^ +fail_compilation/test14496.d(62): Error: `void` initializers for pointers not allowed in safe functions + Bar[2] bars; // https://issues.dlang.org/show_bug.cgi?id=23412 + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=14496 diff --git a/compiler/test/fail_compilation/test14538.d b/compiler/test/fail_compilation/test14538.d index 1ad2126fd431..d0944a17e2bf 100644 --- a/compiler/test/fail_compilation/test14538.d +++ b/compiler/test/fail_compilation/test14538.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test14538.d(18): Error: cannot implicitly convert expression `x ? cast(uint)this.fCells[x].code : 32u` of type `uint` to `Cell` +fail_compilation/test14538.d(20): Error: cannot implicitly convert expression `x ? cast(uint)this.fCells[x].code : 32u` of type `uint` to `Cell` + Cell opIndex(size_t x) { return x ? fCells[x] : ' '; } + ^ --- */ diff --git a/compiler/test/fail_compilation/test15177.d b/compiler/test/fail_compilation/test15177.d index b0ae7ae53d44..0aa9c7450a93 100644 --- a/compiler/test/fail_compilation/test15177.d +++ b/compiler/test/fail_compilation/test15177.d @@ -3,8 +3,10 @@ /* TEST_OUTPUT: --- -fail_compilation/test15177.d-mixin-19(19): Error: `imports.test15117a.object` is not visible from module `test15177` -fail_compilation/test15177.d(28): Error: template instance `test15177.RunApiTest!()` error instantiating +fail_compilation/test15177.d-mixin-21(21): Error: `imports.test15117a.object` is not visible from module `test15177` +fail_compilation/test15177.d(30): Error: template instance `test15177.RunApiTest!()` error instantiating + RunApiTest!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test15191.d b/compiler/test/fail_compilation/test15191.d index fbbc1c0fa88a..8411f28ccee9 100644 --- a/compiler/test/fail_compilation/test15191.d +++ b/compiler/test/fail_compilation/test15191.d @@ -1,11 +1,21 @@ /* TEST_OUTPUT: REQUIRED_ARGS: -preview=dip1000 --- -fail_compilation/test15191.d(34): Error: returning `&identity(x)` escapes a reference to local variable `x` -fail_compilation/test15191.d(40): Error: returning `&identityPtr(x)` escapes a reference to local variable `x` -fail_compilation/test15191.d(46): Error: returning `&identityPtr(x)` escapes a reference to local variable `x` -fail_compilation/test15191.d(67): Error: cannot take address of `scope` variable `x` since `scope` applies to first indirection only -fail_compilation/test15191.d(69): Error: cannot take address of `scope` variable `x` since `scope` applies to first indirection only +fail_compilation/test15191.d(44): Error: returning `&identity(x)` escapes a reference to local variable `x` + return &identity(x); + ^ +fail_compilation/test15191.d(50): Error: returning `&identityPtr(x)` escapes a reference to local variable `x` + return &identityPtr(x); + ^ +fail_compilation/test15191.d(56): Error: returning `&identityPtr(x)` escapes a reference to local variable `x` + return &identityPtr(x); + ^ +fail_compilation/test15191.d(77): Error: cannot take address of `scope` variable `x` since `scope` applies to first indirection only + auto y = identityArr(x)[]; // check transitive scope in assignment + ^ +fail_compilation/test15191.d(79): Error: cannot take address of `scope` variable `x` since `scope` applies to first indirection only + return identityArr(x)[]; // check transitive scope in return statement + ^ --- */ diff --git a/compiler/test/fail_compilation/test15306.d b/compiler/test/fail_compilation/test15306.d index ff532aea220a..dcdfeffada0a 100644 --- a/compiler/test/fail_compilation/test15306.d +++ b/compiler/test/fail_compilation/test15306.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test15306.d(15): Error: `immutable` delegate `test15306.main.__dgliteral2` cannot access mutable data `i` -fail_compilation/test15306.d(19): Error: `shared` delegate `test15306.main.__dgliteral5` cannot access non-shared data `p` +fail_compilation/test15306.d(19): Error: `immutable` delegate `test15306.main.__dgliteral2` cannot access mutable data `i` + auto dg1 = delegate void() immutable { auto inner = i; }; + ^ +fail_compilation/test15306.d(23): Error: `shared` delegate `test15306.main.__dgliteral5` cannot access non-shared data `p` + auto dg2 = delegate int() shared { return *p; }; + ^ --- */ diff --git a/compiler/test/fail_compilation/test15368.d b/compiler/test/fail_compilation/test15368.d index ab12e86602c1..bc0fe86af18c 100644 --- a/compiler/test/fail_compilation/test15368.d +++ b/compiler/test/fail_compilation/test15368.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test15368.d(13): Error: cannot declare `auto` loop variable, omit `auto` to still get type inference +fail_compilation/test15368.d(15): Error: cannot declare `auto` loop variable, omit `auto` to still get type inference + foreach (auto e; foo) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/test15373.d b/compiler/test/fail_compilation/test15373.d index 02a1b32338b2..e34885b7178f 100644 --- a/compiler/test/fail_compilation/test15373.d +++ b/compiler/test/fail_compilation/test15373.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test15373.d(21): Error: runtime type information is not supported for `extern(C++)` classes +fail_compilation/test15373.d(23): Error: runtime type information is not supported for `extern(C++)` classes + auto ti = typeid(c); + ^ --- */ diff --git a/compiler/test/fail_compilation/test15399.d b/compiler/test/fail_compilation/test15399.d index fe9934a864f4..910235710ab5 100644 --- a/compiler/test/fail_compilation/test15399.d +++ b/compiler/test/fail_compilation/test15399.d @@ -1,14 +1,30 @@ /* https://issues.dlang.org/show_bug.cgi?id=15399 TEST_OUTPUT: --- -fail_compilation/test15399.d(32): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code -fail_compilation/test15399.d(33): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code -fail_compilation/test15399.d(34): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code -fail_compilation/test15399.d(35): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code -fail_compilation/test15399.d(36): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code -fail_compilation/test15399.d(37): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code -fail_compilation/test15399.d(38): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code -fail_compilation/test15399.d(39): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code +fail_compilation/test15399.d(48): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code + s1.ptr = null; + ^ +fail_compilation/test15399.d(49): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code + s2.ptr = null; + ^ +fail_compilation/test15399.d(50): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code + int** pp = &s1.ptr; + ^ +fail_compilation/test15399.d(51): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code + pp = &s2.ptr; + ^ +fail_compilation/test15399.d(52): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code + bar(s1.ptr); + ^ +fail_compilation/test15399.d(53): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code + bar(s2.ptr); + ^ +fail_compilation/test15399.d(54): Error: field `S1.ptr` cannot modify misaligned pointers in `@safe` code + sinister(s1.ptr); + ^ +fail_compilation/test15399.d(55): Error: field `S2.ptr` cannot modify misaligned pointers in `@safe` code + sinister(s2.ptr); + ^ --- */ diff --git a/compiler/test/fail_compilation/test15525.d b/compiler/test/fail_compilation/test15525.d index cd35f3046f27..d48e96ca5f31 100644 --- a/compiler/test/fail_compilation/test15525.d +++ b/compiler/test/fail_compilation/test15525.d @@ -4,9 +4,13 @@ TEST_OUTPUT: --- fail_compilation/imports/import15525.d(3): Error: parenthesized template parameter list expected following template identifier +template Tuple{ static if } + ^ fail_compilation/imports/import15525.d(3): Error: (expression) expected following `static if` fail_compilation/imports/import15525.d(3): Error: declaration expected, not `}` -fail_compilation/test15525.d(16): Error: template instance `Tuple!()` template `Tuple` is not defined +fail_compilation/test15525.d(20): Error: template instance `Tuple!()` template `Tuple` is not defined + Tuple!() crash; + ^ --- */ diff --git a/compiler/test/fail_compilation/test15660.d b/compiler/test/fail_compilation/test15660.d index 9bf05d125384..e1c656487475 100644 --- a/compiler/test/fail_compilation/test15660.d +++ b/compiler/test/fail_compilation/test15660.d @@ -1,13 +1,19 @@ /* REQUIRED_ARGS: -preview=fixImmutableConv TEST_OUTPUT: --- -fail_compilation/test15660.d(26): Error: cannot implicitly convert expression `f(v)` of type `int[]` to `immutable(int[])` -fail_compilation/test15660.d(34): Error: cannot copy `const(void)[]` to `void[]` -fail_compilation/test15660.d(34): Source data has incompatible type qualifier(s) -fail_compilation/test15660.d(34): Use `cast(void[])` to force copy -fail_compilation/test15660.d(36): Error: cannot copy `const(int*)[]` to `void[]` -fail_compilation/test15660.d(36): Source data has incompatible type qualifier(s) -fail_compilation/test15660.d(36): Use `cast(void[])` to force copy +fail_compilation/test15660.d(32): Error: cannot implicitly convert expression `f(v)` of type `int[]` to `immutable(int[])` + immutable x = f(v); + ^ +fail_compilation/test15660.d(40): Error: cannot copy `const(void)[]` to `void[]` + a1[] = b1[]; + ^ +fail_compilation/test15660.d(40): Source data has incompatible type qualifier(s) +fail_compilation/test15660.d(40): Use `cast(void[])` to force copy +fail_compilation/test15660.d(42): Error: cannot copy `const(int*)[]` to `void[]` + a1[] = new const(int*)[2]; + ^ +fail_compilation/test15660.d(42): Source data has incompatible type qualifier(s) +fail_compilation/test15660.d(42): Use `cast(void[])` to force copy --- */ diff --git a/compiler/test/fail_compilation/test15672.d b/compiler/test/fail_compilation/test15672.d index c3d14db21000..d40c7cf194c0 100644 --- a/compiler/test/fail_compilation/test15672.d +++ b/compiler/test/fail_compilation/test15672.d @@ -1,10 +1,14 @@ /* * TEST_OUTPUT: --- -fail_compilation/test15672.d(17): Error: cast from `void[]` to `byte[]` not allowed in safe code -fail_compilation/test15672.d(17): `void` data may contain pointers and target element type is mutable -fail_compilation/test15672.d(27): Error: cast from `void*` to `byte*` not allowed in safe code -fail_compilation/test15672.d(27): `void` data may contain pointers and target element type is mutable +fail_compilation/test15672.d(21): Error: cast from `void[]` to `byte[]` not allowed in safe code + return cast(T[])a; + ^ +fail_compilation/test15672.d(21): `void` data may contain pointers and target element type is mutable +fail_compilation/test15672.d(31): Error: cast from `void*` to `byte*` not allowed in safe code + return cast(T*)a; + ^ +fail_compilation/test15672.d(31): `void` data may contain pointers and target element type is mutable --- */ // https://issues.dlang.org/show_bug.cgi?id=15672 diff --git a/compiler/test/fail_compilation/test15703.d b/compiler/test/fail_compilation/test15703.d index 9ee9ac52ec75..922861917f4e 100644 --- a/compiler/test/fail_compilation/test15703.d +++ b/compiler/test/fail_compilation/test15703.d @@ -2,16 +2,26 @@ REQUIRED_ARGS: -m32 TEST_OUTPUT: --- -fail_compilation/test15703.d(23): Error: cast from `Object[]` to `uint[]` not allowed in safe code -fail_compilation/test15703.d(23): Target element type is mutable and source element type contains a pointer -fail_compilation/test15703.d(25): Error: cast from `object.Object` to `const(uint)*` not allowed in safe code -fail_compilation/test15703.d(25): Source type is incompatible with target type containing a pointer -fail_compilation/test15703.d(28): Error: cast from `uint[]` to `Object[]` not allowed in safe code -fail_compilation/test15703.d(28): Target element type contains a pointer -fail_compilation/test15703.d(44): Error: cast from `int[]` to `S[]` not allowed in safe code -fail_compilation/test15703.d(44): Target element type is opaque -fail_compilation/test15703.d(45): Error: cast from `S[]` to `int[]` not allowed in safe code -fail_compilation/test15703.d(45): Source element type is opaque +fail_compilation/test15703.d(33): Error: cast from `Object[]` to `uint[]` not allowed in safe code + auto longs = cast(size_t[]) objs; // error + ^ +fail_compilation/test15703.d(33): Target element type is mutable and source element type contains a pointer +fail_compilation/test15703.d(35): Error: cast from `object.Object` to `const(uint)*` not allowed in safe code + auto longp = cast(const(size_t)*) objs[0]; // error + ^ +fail_compilation/test15703.d(35): Source type is incompatible with target type containing a pointer +fail_compilation/test15703.d(38): Error: cast from `uint[]` to `Object[]` not allowed in safe code + objs = cast(Object[]) al; // error + ^ +fail_compilation/test15703.d(38): Target element type contains a pointer +fail_compilation/test15703.d(54): Error: cast from `int[]` to `S[]` not allowed in safe code + S[] b = cast(S[]) a; + ^ +fail_compilation/test15703.d(54): Target element type is opaque +fail_compilation/test15703.d(55): Error: cast from `S[]` to `int[]` not allowed in safe code + a = cast(int[]) b; + ^ +fail_compilation/test15703.d(55): Source element type is opaque --- */ diff --git a/compiler/test/fail_compilation/test15704.d b/compiler/test/fail_compilation/test15704.d index 04d4be4aa93a..99485fb5c0b9 100644 --- a/compiler/test/fail_compilation/test15704.d +++ b/compiler/test/fail_compilation/test15704.d @@ -1,9 +1,15 @@ /* * TEST_OUTPUT: --- -fail_compilation/test15704.d(17): Error: cannot copy `void[]` to `void[]` in `@safe` code -fail_compilation/test15704.d(18): Error: cannot copy `const(void)[]` to `void[]` in `@safe` code -fail_compilation/test15704.d(19): Deprecation: cannot copy `int[]` to `void[]` in `@safe` code +fail_compilation/test15704.d(23): Error: cannot copy `void[]` to `void[]` in `@safe` code + arr1[] = arr2[]; // overwrites pointers with arbitrary ints + ^ +fail_compilation/test15704.d(24): Error: cannot copy `const(void)[]` to `void[]` in `@safe` code + arr1[] = new const(void)[3]; + ^ +fail_compilation/test15704.d(25): Deprecation: cannot copy `int[]` to `void[]` in `@safe` code + arr1[] = [5]; + ^ --- */ diff --git a/compiler/test/fail_compilation/test15785.d b/compiler/test/fail_compilation/test15785.d index fc61e3db070c..c617c0ba039d 100644 --- a/compiler/test/fail_compilation/test15785.d +++ b/compiler/test/fail_compilation/test15785.d @@ -2,9 +2,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test15785.d(17): Error: no property `foo` for `super` of type `imports.test15785.Base` +fail_compilation/test15785.d(23): Error: no property `foo` for `super` of type `imports.test15785.Base` + super.foo(); + ^ fail_compilation/imports/test15785.d(3): class `Base` defined here -fail_compilation/test15785.d(18): Error: undefined identifier `bar` +class Base +^ +fail_compilation/test15785.d(24): Error: undefined identifier `bar` + bar(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test15785b.d b/compiler/test/fail_compilation/test15785b.d index 910db18ab2d8..03684de94b4e 100644 --- a/compiler/test/fail_compilation/test15785b.d +++ b/compiler/test/fail_compilation/test15785b.d @@ -2,9 +2,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test15785b.d(14): Error: `imports.test15785.Base.T` is not visible from module `test15785b` -fail_compilation/test15785b.d(15): Error: `imports.test15785.Base.T` is not visible from module `test15785b` -fail_compilation/test15785b.d(16): Error: `imports.test15785.IBase2.T` is not visible from module `test15785b` +fail_compilation/test15785b.d(20): Error: `imports.test15785.Base.T` is not visible from module `test15785b` + typeof(super).T t; + ^ +fail_compilation/test15785b.d(21): Error: `imports.test15785.Base.T` is not visible from module `test15785b` + Base.T t2; + ^ +fail_compilation/test15785b.d(22): Error: `imports.test15785.IBase2.T` is not visible from module `test15785b` + IBase2.T t3; + ^ --- */ import imports.test15785; diff --git a/compiler/test/fail_compilation/test15897.d b/compiler/test/fail_compilation/test15897.d index c911263718f6..c751f4eb793a 100644 --- a/compiler/test/fail_compilation/test15897.d +++ b/compiler/test/fail_compilation/test15897.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test15897.d(20): Error: no property `create` for `cat` of type `imports.test15897.Cat` +fail_compilation/test15897.d(24): Error: no property `create` for `cat` of type `imports.test15897.Cat` + cat.create(); + ^ fail_compilation/imports/test15897.d(4): class `Cat` defined here +class Cat : Animal +^ --- */ module test15897; diff --git a/compiler/test/fail_compilation/test15925.d b/compiler/test/fail_compilation/test15925.d index 88102ac8ff26..8929480a1239 100644 --- a/compiler/test/fail_compilation/test15925.d +++ b/compiler/test/fail_compilation/test15925.d @@ -2,8 +2,12 @@ EXTRA_FILES: imports/imp15925.d TEST_OUTPUT: --- -fail_compilation/test15925.d(18): Error: undefined identifier `X` -fail_compilation/test15925.d(18): while evaluating: `static assert(X == 1)` +fail_compilation/test15925.d(22): Error: undefined identifier `X` + static assert(X == 1); + ^ +fail_compilation/test15925.d(22): while evaluating: `static assert(X == 1)` + static assert(X == 1); + ^ --- */ diff --git a/compiler/test/fail_compilation/test15989.d b/compiler/test/fail_compilation/test15989.d index 38ca33126724..86c60f62527c 100644 --- a/compiler/test/fail_compilation/test15989.d +++ b/compiler/test/fail_compilation/test15989.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test15989.d(39): Error: variable `test15989.main.ctRegex` : Unable to initialize enum with class or pointer to struct. Use static const variable instead. -fail_compilation/test15989.d(48): Error: variable `test15989.test.c` : Unable to initialize enum with class or pointer to struct. Use static const variable instead. -fail_compilation/test15989.d(49): Error: cannot use non-constant CTFE pointer in an initializer `new int(3)` +fail_compilation/test15989.d(45): Error: variable `test15989.main.ctRegex` : Unable to initialize enum with class or pointer to struct. Use static const variable instead. + enum ctRegex = regex(); + ^ +fail_compilation/test15989.d(54): Error: variable `test15989.test.c` : Unable to initialize enum with class or pointer to struct. Use static const variable instead. + enum c = new C(); + ^ +fail_compilation/test15989.d(55): Error: cannot use non-constant CTFE pointer in an initializer `new int(3)` + enum pi = new int(3); + ^ --- */ diff --git a/compiler/test/fail_compilation/test16095.d b/compiler/test/fail_compilation/test16095.d index 38a3a7dfbc9d..ea6cda5fd052 100644 --- a/compiler/test/fail_compilation/test16095.d +++ b/compiler/test/fail_compilation/test16095.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test16095.d(18): Error: `shared` method `test16095.C.ping` is not callable using a non-shared `a` -fail_compilation/test16095.d(28): Error: `shared` method `test16095.S.ping` is not callable using a non-shared `*a` -fail_compilation/test16095.d(41): Error: mutable method `test16095.Foo.flip` is not callable using a `immutable` `foo` +fail_compilation/test16095.d(24): Error: `shared` method `test16095.C.ping` is not callable using a non-shared `a` + (&a.ping)(); // error + ^ +fail_compilation/test16095.d(34): Error: `shared` method `test16095.S.ping` is not callable using a non-shared `*a` + (&a.ping)(); // error + ^ +fail_compilation/test16095.d(47): Error: mutable method `test16095.Foo.flip` is not callable using a `immutable` `foo` + (&foo.flip)(); // error + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=16095 diff --git a/compiler/test/fail_compilation/test16116.d b/compiler/test/fail_compilation/test16116.d index d407aa315b97..6aa8ed93b674 100644 --- a/compiler/test/fail_compilation/test16116.d +++ b/compiler/test/fail_compilation/test16116.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/test16116.d(14): Error: incompatible types for `(v) * (i)`: `__vector(short[8])` and `int` +fail_compilation/test16116.d(16): Error: incompatible types for `(v) * (i)`: `__vector(short[8])` and `int` + v = v * i; + ^ --- */ diff --git a/compiler/test/fail_compilation/test16193.d b/compiler/test/fail_compilation/test16193.d index 39399cf01d80..4ee84dcb32c4 100644 --- a/compiler/test/fail_compilation/test16193.d +++ b/compiler/test/fail_compilation/test16193.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test16193.d(39): Error: function `test16193.abc` is `@nogc` yet allocates closure for `abc()` with the GC -fail_compilation/test16193.d(41): delegate `test16193.abc.__foreachbody2` closes over variable `x` -fail_compilation/test16193.d(40): `x` declared here +fail_compilation/test16193.d(45): Error: function `test16193.abc` is `@nogc` yet allocates closure for `abc()` with the GC +void abc() @nogc { + ^ +fail_compilation/test16193.d(47): delegate `test16193.abc.__foreachbody2` closes over variable `x` + foreach(i; S.init) { + ^ +fail_compilation/test16193.d(46): `x` declared here + int x = 0; + ^ --- */ //fail_compilation/test16193.d(22): To enforce `@safe`, the compiler allocates a closure unless `opApply()` uses `scope` diff --git a/compiler/test/fail_compilation/test16195.d b/compiler/test/fail_compilation/test16195.d index 018ab0d8cde5..6145013511f9 100644 --- a/compiler/test/fail_compilation/test16195.d +++ b/compiler/test/fail_compilation/test16195.d @@ -1,8 +1,10 @@ /* * TEST_OUTPUT: --- -fail_compilation/test16195.d(14): Error: the `delete` keyword is obsolete -fail_compilation/test16195.d(14): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead +fail_compilation/test16195.d(16): Error: the `delete` keyword is obsolete + delete p; + ^ +fail_compilation/test16195.d(16): use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead --- */ diff --git a/compiler/test/fail_compilation/test16228.d b/compiler/test/fail_compilation/test16228.d index b8622844f691..6087d2406a2b 100644 --- a/compiler/test/fail_compilation/test16228.d +++ b/compiler/test/fail_compilation/test16228.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: TEST_OUTPUT: --- -fail_compilation/test16228.d(23): Error: function `test16228.S.bar` `static` member has no `this` to which `return` can apply +fail_compilation/test16228.d(25): Error: function `test16228.S.bar` `static` member has no `this` to which `return` can apply + static ref int bar() return { return x; } + ^ --- */ diff --git a/compiler/test/fail_compilation/test16284.d b/compiler/test/fail_compilation/test16284.d index 77b73b0db94d..7fb1ab5ccc6c 100644 --- a/compiler/test/fail_compilation/test16284.d +++ b/compiler/test/fail_compilation/test16284.d @@ -1,9 +1,15 @@ /* REQUIRED_ARGS: -preview=fieldwise TEST_OUTPUT: --- -fail_compilation/test16284.d(24): Error: reinterpretation through overlapped field `s` is not allowed in CTFE -fail_compilation/test16284.d(27): called from here: `test()` -fail_compilation/test16284.d(27): while evaluating: `static assert(test())` +fail_compilation/test16284.d(30): Error: reinterpretation through overlapped field `s` is not allowed in CTFE + return t1 == t2; + ^ +fail_compilation/test16284.d(33): called from here: `test()` +static assert(test()); + ^ +fail_compilation/test16284.d(33): while evaluating: `static assert(test())` +static assert(test()); +^ --- */ diff --git a/compiler/test/fail_compilation/test16365.d b/compiler/test/fail_compilation/test16365.d index 5bfa5f8dba67..5d21c28f55c7 100644 --- a/compiler/test/fail_compilation/test16365.d +++ b/compiler/test/fail_compilation/test16365.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test16365.d(20): Error: `this` reference necessary to take address of member `f1` in `@safe` function `main` -fail_compilation/test16365.d(22): Error: cannot implicitly convert expression `&f2` of type `void delegate() pure nothrow @nogc @safe` to `void function() @safe` -fail_compilation/test16365.d(27): Error: `dg.funcptr` cannot be used in `@safe` code +fail_compilation/test16365.d(26): Error: `this` reference necessary to take address of member `f1` in `@safe` function `main` + f = &S.f1; + ^ +fail_compilation/test16365.d(28): Error: cannot implicitly convert expression `&f2` of type `void delegate() pure nothrow @nogc @safe` to `void function() @safe` + f = &f2; + ^ +fail_compilation/test16365.d(33): Error: `dg.funcptr` cannot be used in `@safe` code + f = dg.funcptr; + ^ --- */ diff --git a/compiler/test/fail_compilation/test16381.d b/compiler/test/fail_compilation/test16381.d index 5847e0459b6e..3a92b94b1553 100644 --- a/compiler/test/fail_compilation/test16381.d +++ b/compiler/test/fail_compilation/test16381.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/test16381.d(15): Error: cannot take address of expression `foo()` because it is not an lvalue +fail_compilation/test16381.d(17): Error: cannot take address of expression `foo()` because it is not an lvalue + float g = foo().ptr[0]; + ^ --- */ diff --git a/compiler/test/fail_compilation/test16443.d b/compiler/test/fail_compilation/test16443.d index a83dc53bbe22..a8dda4f9ad17 100644 --- a/compiler/test/fail_compilation/test16443.d +++ b/compiler/test/fail_compilation/test16443.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/test16443.d(10): Error: incompatible types for `(null) + (null)`: both operands are of type `typeof(null)` -fail_compilation/test16443.d(11): Error: incompatible types for `(null) - (null)`: both operands are of type `typeof(null)` +fail_compilation/test16443.d(14): Error: incompatible types for `(null) + (null)`: both operands are of type `typeof(null)` + auto a = null + null; + ^ +fail_compilation/test16443.d(15): Error: incompatible types for `(null) - (null)`: both operands are of type `typeof(null)` + auto b = null - null; + ^ --- */ diff --git a/compiler/test/fail_compilation/test16495.d b/compiler/test/fail_compilation/test16495.d index 667d4c2feb77..5738335f65ff 100644 --- a/compiler/test/fail_compilation/test16495.d +++ b/compiler/test/fail_compilation/test16495.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/test16495.d(12): Error: undefined identifier `q` -fail_compilation/test16495.d(17): Error: expected 1 arguments for `fullyQualifiedName` but had 0 +fail_compilation/test16495.d(16): Error: undefined identifier `q` + auto m = __traits(fullyQualifiedName, q); + ^ +fail_compilation/test16495.d(21): Error: expected 1 arguments for `fullyQualifiedName` but had 0 + auto n = __traits(fullyQualifiedName); + ^ --- */ diff --git a/compiler/test/fail_compilation/test16523.d b/compiler/test/fail_compilation/test16523.d index 78563c92525a..ab18a301d75a 100644 --- a/compiler/test/fail_compilation/test16523.d +++ b/compiler/test/fail_compilation/test16523.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test16523.d(12): Error: `case` variables have to be `const` or `immutable` +fail_compilation/test16523.d(14): Error: `case` variables have to be `const` or `immutable` + case b: return; + ^ --- */ diff --git a/compiler/test/fail_compilation/test16589.d b/compiler/test/fail_compilation/test16589.d index dc4c5931a4f0..eee498a53eec 100644 --- a/compiler/test/fail_compilation/test16589.d +++ b/compiler/test/fail_compilation/test16589.d @@ -2,16 +2,36 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test16589.d(26): Error: returning `&this.data` escapes a reference to parameter `this` -fail_compilation/test16589.d(24): perhaps annotate the function with `return` -fail_compilation/test16589.d(31): Error: returning `&this` escapes a reference to parameter `this` -fail_compilation/test16589.d(29): perhaps annotate the function with `return` -fail_compilation/test16589.d(37): Error: returning `&s.data` escapes a reference to parameter `s` -fail_compilation/test16589.d(35): perhaps annotate the parameter with `return` -fail_compilation/test16589.d(42): Error: returning `&s` escapes a reference to parameter `s` -fail_compilation/test16589.d(40): perhaps annotate the parameter with `return` -fail_compilation/test16589.d(47): Error: returning `&s.data` escapes a reference to parameter `s` -fail_compilation/test16589.d(52): Error: returning `& s` escapes a reference to parameter `s` +fail_compilation/test16589.d(46): Error: returning `&this.data` escapes a reference to parameter `this` + return &data; + ^ +fail_compilation/test16589.d(44): perhaps annotate the function with `return` + @safe int* access1() + ^ +fail_compilation/test16589.d(51): Error: returning `&this` escapes a reference to parameter `this` + return &this; + ^ +fail_compilation/test16589.d(49): perhaps annotate the function with `return` + @safe S* access2() + ^ +fail_compilation/test16589.d(57): Error: returning `&s.data` escapes a reference to parameter `s` + return &s.data; + ^ +fail_compilation/test16589.d(55): perhaps annotate the parameter with `return` +@safe int* access3(ref S s) + ^ +fail_compilation/test16589.d(62): Error: returning `&s` escapes a reference to parameter `s` + return &s; + ^ +fail_compilation/test16589.d(60): perhaps annotate the parameter with `return` +@safe S* access4(ref S s) + ^ +fail_compilation/test16589.d(67): Error: returning `&s.data` escapes a reference to parameter `s` + return &s.data; + ^ +fail_compilation/test16589.d(72): Error: returning `& s` escapes a reference to parameter `s` + return &s; + ^ --- */ diff --git a/compiler/test/fail_compilation/test16694.d b/compiler/test/fail_compilation/test16694.d index 1b15aa435fb5..1078171072b0 100644 --- a/compiler/test/fail_compilation/test16694.d +++ b/compiler/test/fail_compilation/test16694.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test16694.d(8): Error: cannot take address of imported symbol `bar` at compile time +fail_compilation/test16694.d(10): Error: cannot take address of imported symbol `bar` at compile time +auto barptr = &bar; + ^ --- */ export void bar(); diff --git a/compiler/test/fail_compilation/test17096.d b/compiler/test/fail_compilation/test17096.d index 2c431a3849b3..6517c0ed9347 100644 --- a/compiler/test/fail_compilation/test17096.d +++ b/compiler/test/fail_compilation/test17096.d @@ -1,29 +1,77 @@ /* TEST_OUTPUT: --- -fail_compilation/test17096.d(29): Error: expected 1 arguments for `isPOD` but had 2 -fail_compilation/test17096.d(30): Error: expected 1 arguments for `isNested` but had 2 -fail_compilation/test17096.d(31): Deprecation: `traits(isVirtualFunction)` is deprecated. Use `traits(isVirtualMethod)` instead -fail_compilation/test17096.d(31): Error: expected 1 arguments for `isVirtualFunction` but had 2 -fail_compilation/test17096.d(32): Error: expected 1 arguments for `isVirtualMethod` but had 2 -fail_compilation/test17096.d(33): Error: expected 1 arguments for `isAbstractFunction` but had 2 -fail_compilation/test17096.d(34): Error: expected 1 arguments for `isFinalFunction` but had 2 -fail_compilation/test17096.d(35): Error: expected 1 arguments for `isOverrideFunction` but had 2 -fail_compilation/test17096.d(36): Error: expected 1 arguments for `isStaticFunction` but had 2 -fail_compilation/test17096.d(37): Error: expected 1 arguments for `isRef` but had 2 -fail_compilation/test17096.d(38): Error: expected 1 arguments for `isOut` but had 2 -fail_compilation/test17096.d(39): Error: expected 1 arguments for `isLazy` but had 2 -fail_compilation/test17096.d(40): Error: expected 1 arguments for `identifier` but had 2 -fail_compilation/test17096.d(41): Error: expected 1 arguments for `getProtection` but had 2 -fail_compilation/test17096.d(42): Error: expected 1 arguments for `parent` but had 2 -fail_compilation/test17096.d(43): Error: expected 1 arguments for `classInstanceSize` but had 2 -fail_compilation/test17096.d(44): Error: expected 1 arguments for `allMembers` but had 2 -fail_compilation/test17096.d(45): Error: expected 1 arguments for `derivedMembers` but had 2 -fail_compilation/test17096.d(46): Error: expected 1 arguments for `getAliasThis` but had 2 -fail_compilation/test17096.d(47): Error: expected 1 arguments for `getAttributes` but had 2 -fail_compilation/test17096.d(48): Error: expected 1 arguments for `getFunctionAttributes` but had 2 -fail_compilation/test17096.d(49): Error: expected 1 arguments for `getUnitTests` but had 2 -fail_compilation/test17096.d(50): Error: expected 1 arguments for `getVirtualIndex` but had 2 -fail_compilation/test17096.d(51): Error: a single type expected for trait pointerBitmap +fail_compilation/test17096.d(77): Error: expected 1 arguments for `isPOD` but had 2 +enum b03 = __traits(isPOD, 1, 2); + ^ +fail_compilation/test17096.d(78): Error: expected 1 arguments for `isNested` but had 2 +enum b04 = __traits(isNested, 1, 2); + ^ +fail_compilation/test17096.d(79): Deprecation: `traits(isVirtualFunction)` is deprecated. Use `traits(isVirtualMethod)` instead +enum b05 = __traits(isVirtualFunction, 1, 2); + ^ +fail_compilation/test17096.d(79): Error: expected 1 arguments for `isVirtualFunction` but had 2 +enum b05 = __traits(isVirtualFunction, 1, 2); + ^ +fail_compilation/test17096.d(80): Error: expected 1 arguments for `isVirtualMethod` but had 2 +enum b06 = __traits(isVirtualMethod, 1, 2); + ^ +fail_compilation/test17096.d(81): Error: expected 1 arguments for `isAbstractFunction` but had 2 +enum b07 = __traits(isAbstractFunction, 1, 2); + ^ +fail_compilation/test17096.d(82): Error: expected 1 arguments for `isFinalFunction` but had 2 +enum b08 = __traits(isFinalFunction, 1, 2); + ^ +fail_compilation/test17096.d(83): Error: expected 1 arguments for `isOverrideFunction` but had 2 +enum b09 = __traits(isOverrideFunction, 1, 2); + ^ +fail_compilation/test17096.d(84): Error: expected 1 arguments for `isStaticFunction` but had 2 +enum b10 = __traits(isStaticFunction, 1, 2); + ^ +fail_compilation/test17096.d(85): Error: expected 1 arguments for `isRef` but had 2 +enum b11 = __traits(isRef, 1, 2); + ^ +fail_compilation/test17096.d(86): Error: expected 1 arguments for `isOut` but had 2 +enum b12 = __traits(isOut, 1, 2); + ^ +fail_compilation/test17096.d(87): Error: expected 1 arguments for `isLazy` but had 2 +enum b13 = __traits(isLazy, 1, 2); + ^ +fail_compilation/test17096.d(88): Error: expected 1 arguments for `identifier` but had 2 +enum b14 = __traits(identifier, 1, 2); + ^ +fail_compilation/test17096.d(89): Error: expected 1 arguments for `getProtection` but had 2 +enum b15 = __traits(getProtection, 1, 2); + ^ +fail_compilation/test17096.d(90): Error: expected 1 arguments for `parent` but had 2 +enum b16 = __traits(parent, 1, 2); + ^ +fail_compilation/test17096.d(91): Error: expected 1 arguments for `classInstanceSize` but had 2 +enum b17 = __traits(classInstanceSize, 1, 2); + ^ +fail_compilation/test17096.d(92): Error: expected 1 arguments for `allMembers` but had 2 +enum b18 = __traits(allMembers, 1, 2); + ^ +fail_compilation/test17096.d(93): Error: expected 1 arguments for `derivedMembers` but had 2 +enum b19 = __traits(derivedMembers, 1, 2); + ^ +fail_compilation/test17096.d(94): Error: expected 1 arguments for `getAliasThis` but had 2 +enum b20 = __traits(getAliasThis, 1, 2); + ^ +fail_compilation/test17096.d(95): Error: expected 1 arguments for `getAttributes` but had 2 +enum b21 = __traits(getAttributes, 1, 2); + ^ +fail_compilation/test17096.d(96): Error: expected 1 arguments for `getFunctionAttributes` but had 2 +enum b22 = __traits(getFunctionAttributes, 1, 2); + ^ +fail_compilation/test17096.d(97): Error: expected 1 arguments for `getUnitTests` but had 2 +enum b23 = __traits(getUnitTests, 1, 2); + ^ +fail_compilation/test17096.d(98): Error: expected 1 arguments for `getVirtualIndex` but had 2 +enum b24 = __traits(getVirtualIndex, 1, 2); + ^ +fail_compilation/test17096.d(99): Error: a single type expected for trait pointerBitmap +enum b25 = __traits(getPointerBitmap, 1, 2); + ^ --- */ enum b03 = __traits(isPOD, 1, 2); diff --git a/compiler/test/fail_compilation/test17284.d b/compiler/test/fail_compilation/test17284.d index b7fd9796d8be..5e0fad41b0fa 100644 --- a/compiler/test/fail_compilation/test17284.d +++ b/compiler/test/fail_compilation/test17284.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test17284.d(17): Error: field `U.c` cannot access pointers in `@safe` code that overlap other fields +fail_compilation/test17284.d(19): Error: field `U.c` cannot access pointers in `@safe` code that overlap other fields + t.c = new C; + ^ pure nothrow @safe void(U t) --- REQUIRED_ARGS: -preview=bitfields diff --git a/compiler/test/fail_compilation/test17307.d b/compiler/test/fail_compilation/test17307.d index e73cca697fdb..30b09f364dc5 100644 --- a/compiler/test/fail_compilation/test17307.d +++ b/compiler/test/fail_compilation/test17307.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test17307.d(9): Error: anonymous struct can only be a part of an aggregate, not module `test17307` +fail_compilation/test17307.d(11): Error: anonymous struct can only be a part of an aggregate, not module `test17307` +struct { enum bitsPerWord = size_t; } +^ --- * https://issues.dlang.org/show_bug.cgi?id=17307 */ diff --git a/compiler/test/fail_compilation/test17380.d b/compiler/test/fail_compilation/test17380.d index 22e3c3153362..90712914d3a4 100644 --- a/compiler/test/fail_compilation/test17380.d +++ b/compiler/test/fail_compilation/test17380.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test17380.d(12): Error: undefined identifier `ThisTypeDoesNotExistsAndCrahesTheCompiler` +fail_compilation/test17380.d(14): Error: undefined identifier `ThisTypeDoesNotExistsAndCrahesTheCompiler` + return ThisTypeDoesNotExistsAndCrahesTheCompiler; + ^ --- * https://issues.dlang.org/show_bug.cgi?id=17380 */ diff --git a/compiler/test/fail_compilation/test17380spec.d b/compiler/test/fail_compilation/test17380spec.d index 8ab8739d978c..f126cc8ea43e 100644 --- a/compiler/test/fail_compilation/test17380spec.d +++ b/compiler/test/fail_compilation/test17380spec.d @@ -1,10 +1,18 @@ /* REQUIRED_ARGS: -verrors=spec TEST_OUTPUT: --- -(spec:1) fail_compilation/test17380spec.d(15): Error: cannot resolve identifier `ThisTypeDoesNotExistAndCrashesTheCompiler` -(spec:1) fail_compilation/test17380spec.d(15): Error: no property `ThisTypeDoesNotExistAndCrashesTheCompiler` for `this.opCast()` of type `test17380spec.Uint128` -(spec:1) fail_compilation/test17380spec.d(20): struct `Uint128` defined here -fail_compilation/test17380spec.d(15): Error: undefined identifier `ThisTypeDoesNotExistAndCrashesTheCompiler` +(spec:1) fail_compilation/test17380spec.d(23): Error: cannot resolve identifier `ThisTypeDoesNotExistAndCrashesTheCompiler` + return ThisTypeDoesNotExistAndCrashesTheCompiler; + ^ +(spec:1) fail_compilation/test17380spec.d(23): Error: no property `ThisTypeDoesNotExistAndCrashesTheCompiler` for `this.opCast()` of type `test17380spec.Uint128` + return ThisTypeDoesNotExistAndCrashesTheCompiler; + ^ +(spec:1) fail_compilation/test17380spec.d(28): struct `Uint128` defined here +struct Uint128 +^ +fail_compilation/test17380spec.d(23): Error: undefined identifier `ThisTypeDoesNotExistAndCrashesTheCompiler` + return ThisTypeDoesNotExistAndCrashesTheCompiler; + ^ --- */ diff --git a/compiler/test/fail_compilation/test17422.d b/compiler/test/fail_compilation/test17422.d index 80f8fbe2613d..5690f23f51d2 100644 --- a/compiler/test/fail_compilation/test17422.d +++ b/compiler/test/fail_compilation/test17422.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test17422.d(23): Error: scope variable `p` may not be returned +fail_compilation/test17422.d(25): Error: scope variable `p` may not be returned + return p; + ^ --- */ struct RC diff --git a/compiler/test/fail_compilation/test17423.d b/compiler/test/fail_compilation/test17423.d index faa98063e65f..2af7e6356dcc 100644 --- a/compiler/test/fail_compilation/test17423.d +++ b/compiler/test/fail_compilation/test17423.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test17423.d(27): Error: reference to local `this` assigned to non-scope parameter `dlg` calling `opApply` -fail_compilation/test17423.d(16): which is not `scope` because of `this.myDlg = dlg` +fail_compilation/test17423.d(31): Error: reference to local `this` assigned to non-scope parameter `dlg` calling `opApply` + foreach(_; o) { i = 0; } + ^ +fail_compilation/test17423.d(20): which is not `scope` because of `this.myDlg = dlg` + myDlg = dlg; + ^ --- */ diff --git a/compiler/test/fail_compilation/test17425.d b/compiler/test/fail_compilation/test17425.d index 7140615cc427..da05964ecfea 100644 --- a/compiler/test/fail_compilation/test17425.d +++ b/compiler/test/fail_compilation/test17425.d @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/test17425.d(24): Error: parameter index must be in range 0..4 not 4 -fail_compilation/test17425.d(27): Error: first argument to `__traits(getParameterStorageClasses, i, 4)` is not a function or a function call -fail_compilation/test17425.d(29): Error: expression expected as second argument of `__traits(getParameterStorageClasses, foo, int)` -fail_compilation/test17425.d(31): Error: expected 2 arguments for `getParameterStorageClasses` but had 3 +fail_compilation/test17425.d(32): Error: parameter index must be in range 0..4 not 4 +enum a1 = __traits(getParameterStorageClasses, foo, 4); + ^ +fail_compilation/test17425.d(35): Error: first argument to `__traits(getParameterStorageClasses, i, 4)` is not a function or a function call +enum a2 = __traits(getParameterStorageClasses, i, 4); + ^ +fail_compilation/test17425.d(37): Error: expression expected as second argument of `__traits(getParameterStorageClasses, foo, int)` +enum a3 = __traits(getParameterStorageClasses, foo, int); + ^ +fail_compilation/test17425.d(39): Error: expected 2 arguments for `getParameterStorageClasses` but had 3 +enum a4 = __traits(getParameterStorageClasses, foo, 0, 1); + ^ --- */ diff --git a/compiler/test/fail_compilation/test17451.d b/compiler/test/fail_compilation/test17451.d index b0cda2105a22..3b07548ecb8c 100644 --- a/compiler/test/fail_compilation/test17451.d +++ b/compiler/test/fail_compilation/test17451.d @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/test17451.d(22): Error: undefined identifier `allocator` -fail_compilation/test17451.d(23): Error: `false` has no effect -fail_compilation/test17451.d(30): Error: variable `test17451.HashMap!(ThreadSlot).HashMap.__lambda2.v` - size of type `ThreadSlot` is invalid -fail_compilation/test17451.d(44): Error: template instance `test17451.HashMap!(ThreadSlot)` error instantiating +fail_compilation/test17451.d(30): Error: undefined identifier `allocator` + try allocator; + ^ +fail_compilation/test17451.d(31): Error: `false` has no effect + catch (Exception e) false; // should never happen + ^ +fail_compilation/test17451.d(38): Error: variable `test17451.HashMap!(ThreadSlot).HashMap.__lambda2.v` - size of type `ThreadSlot` is invalid + static if ({ Value v; }) {} + ^ +fail_compilation/test17451.d(52): Error: template instance `test17451.HashMap!(ThreadSlot)` error instantiating + HashMap!ThreadSlot m_waiters; + ^ --- */ diff --git a/compiler/test/fail_compilation/test17586.d b/compiler/test/fail_compilation/test17586.d index fcfb7b7141a6..6bdd22b5b93b 100644 --- a/compiler/test/fail_compilation/test17586.d +++ b/compiler/test/fail_compilation/test17586.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -o- -de TEST_OUTPUT: --- -fail_compilation/test17586.d(13): Deprecation: `test17586.D.foo` is overriding the deprecated method `test17586.C.foo` +fail_compilation/test17586.d(15): Deprecation: `test17586.D.foo` is overriding the deprecated method `test17586.C.foo` + override void foo(){} + ^ --- */ diff --git a/compiler/test/fail_compilation/test17868.d b/compiler/test/fail_compilation/test17868.d index 4e55c2a85b07..83feb4ed5a60 100644 --- a/compiler/test/fail_compilation/test17868.d +++ b/compiler/test/fail_compilation/test17868.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: ---- -fail_compilation/test17868.d(10): Error: pragma `crt_constructor` takes no argument -fail_compilation/test17868.d(11): Error: pragma `crt_constructor` takes no argument -fail_compilation/test17868.d(12): Error: pragma `crt_constructor` takes no argument -fail_compilation/test17868.d(13): Error: pragma `crt_constructor` takes no argument +fail_compilation/test17868.d(18): Error: pragma `crt_constructor` takes no argument +pragma(crt_constructor, ctfe()) +^ +fail_compilation/test17868.d(19): Error: pragma `crt_constructor` takes no argument +pragma(crt_constructor, 1.5f) +^ +fail_compilation/test17868.d(20): Error: pragma `crt_constructor` takes no argument +pragma(crt_constructor, "foobar") +^ +fail_compilation/test17868.d(21): Error: pragma `crt_constructor` takes no argument +pragma(crt_constructor, S()) +^ ---- */ pragma(crt_constructor, ctfe()) diff --git a/compiler/test/fail_compilation/test17868b.d b/compiler/test/fail_compilation/test17868b.d index 18f18443df79..0eddeadf55e5 100644 --- a/compiler/test/fail_compilation/test17868b.d +++ b/compiler/test/fail_compilation/test17868b.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: ---- -fail_compilation/test17868b.d(9): Error: pragma `crt_constructor` can only apply to a single declaration -fail_compilation/test17868b.d(14): Error: function `test17868b.bar` must return `void` for `pragma(crt_constructor)` -fail_compilation/test17868b.d(18): Error: function `test17868b.baz` must be `extern(C)` for `pragma(crt_constructor)` when taking parameters +fail_compilation/test17868b.d(15): Error: pragma `crt_constructor` can only apply to a single declaration +pragma(crt_constructor): +^ +fail_compilation/test17868b.d(20): Error: function `test17868b.bar` must return `void` for `pragma(crt_constructor)` +extern(C) int bar() + ^ +fail_compilation/test17868b.d(24): Error: function `test17868b.baz` must be `extern(C)` for `pragma(crt_constructor)` when taking parameters +void baz(int argc, char** argv) + ^ ---- */ pragma(crt_constructor): diff --git a/compiler/test/fail_compilation/test17892.d b/compiler/test/fail_compilation/test17892.d index aaa7ad3c1b45..a4d11d184351 100644 --- a/compiler/test/fail_compilation/test17892.d +++ b/compiler/test/fail_compilation/test17892.d @@ -1,9 +1,15 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test17892.d(27): Error: returning `s.pointer1()` escapes a reference to local variable `s` -fail_compilation/test17892.d(29): Error: returning `s.pointer2()` escapes a reference to local variable `s` -fail_compilation/test17892.d(31): Error: returning `s.pointer3()` escapes a reference to local variable `s` +fail_compilation/test17892.d(33): Error: returning `s.pointer1()` escapes a reference to local variable `s` + return s.pointer1(); + ^ +fail_compilation/test17892.d(35): Error: returning `s.pointer2()` escapes a reference to local variable `s` + return s.pointer2(); + ^ +fail_compilation/test17892.d(37): Error: returning `s.pointer3()` escapes a reference to local variable `s` + return s.pointer3(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test17908a.d b/compiler/test/fail_compilation/test17908a.d index 907239734d43..73d0ebd7c726 100644 --- a/compiler/test/fail_compilation/test17908a.d +++ b/compiler/test/fail_compilation/test17908a.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test17908a.d(10): Error: function `test17908a.foo` cannot be used because it is annotated with `@disable` +fail_compilation/test17908a.d(12): Error: function `test17908a.foo` cannot be used because it is annotated with `@disable` +alias g = foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/test17908b.d b/compiler/test/fail_compilation/test17908b.d index e2c4d84abedd..47e3e41ead28 100644 --- a/compiler/test/fail_compilation/test17908b.d +++ b/compiler/test/fail_compilation/test17908b.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test17908b.d(13): Error: function `test17908b.foobar` cannot be used because it is annotated with `@disable` +fail_compilation/test17908b.d(15): Error: function `test17908b.foobar` cannot be used because it is annotated with `@disable` + i(10); + ^ --- */ void foobar() {} diff --git a/compiler/test/fail_compilation/test17959.d b/compiler/test/fail_compilation/test17959.d index cd2216ff0456..f550bb71ebb7 100644 --- a/compiler/test/fail_compilation/test17959.d +++ b/compiler/test/fail_compilation/test17959.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test17959.d(18): Error: scope variable `this` assigned to non-scope `this.escape` -fail_compilation/test17959.d(19): Error: scope variable `this` assigned to non-scope `this.f` +fail_compilation/test17959.d(22): Error: scope variable `this` assigned to non-scope `this.escape` + this.escape = &this.escfoo; + ^ +fail_compilation/test17959.d(23): Error: scope variable `this` assigned to non-scope `this.f` + f = this; + ^ --- */ diff --git a/compiler/test/fail_compilation/test17977.d b/compiler/test/fail_compilation/test17977.d index ff6bc1c44f4f..093239450c15 100644 --- a/compiler/test/fail_compilation/test17977.d +++ b/compiler/test/fail_compilation/test17977.d @@ -3,7 +3,9 @@ https://issues.dlang.org/show_bug.cgi?id=15399 REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test17977.d(19): Error: address of variable `__slList3` assigned to `elem` with longer lifetime +fail_compilation/test17977.d(21): Error: address of variable `__slList3` assigned to `elem` with longer lifetime + auto elem = List().front; + ^ --- */ diff --git a/compiler/test/fail_compilation/test18130.d b/compiler/test/fail_compilation/test18130.d index be296f823983..25026e6df590 100644 --- a/compiler/test/fail_compilation/test18130.d +++ b/compiler/test/fail_compilation/test18130.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test18130.d(8): Error: variable `test18130.foo.v` zero-length `out` parameters are not allowed. +fail_compilation/test18130.d(10): Error: variable `test18130.foo.v` zero-length `out` parameters are not allowed. +void foo(out byte[0] v) + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=18130 diff --git a/compiler/test/fail_compilation/test18282.d b/compiler/test/fail_compilation/test18282.d index 580fe1bde7b3..284c30316dc6 100644 --- a/compiler/test/fail_compilation/test18282.d +++ b/compiler/test/fail_compilation/test18282.d @@ -1,13 +1,39 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test18282.d(25): Error: scope variable `aa` may not be returned -fail_compilation/test18282.d(34): Error: copying `& i` into allocated memory escapes a reference to local variable `i` -fail_compilation/test18282.d(35): Error: copying `& i` into allocated memory escapes a reference to local variable `i` -fail_compilation/test18282.d(36): Error: scope variable `staa` may not be returned -fail_compilation/test18282.d(44): Error: copying `S2000(& i)` into allocated memory escapes a reference to local variable `i` -fail_compilation/test18282.d(53): Error: copying `& i` into allocated memory escapes a reference to local variable `i` -fail_compilation/test18282.d(53): Error: copying `& c` into allocated memory escapes a reference to local variable `c` +fail_compilation/test18282.d(51): Error: scope variable `aa` may not be returned + return aa[0]; + ^ +fail_compilation/test18282.d(60): Error: copying `& i` into allocated memory escapes a reference to local variable `i` + auto dyna = [ &i ]; + ^ +fail_compilation/test18282.d(61): Error: copying `& i` into allocated memory escapes a reference to local variable `i` + int*[ ] dynb = [ &i ]; + ^ +fail_compilation/test18282.d(62): Error: scope variable `staa` may not be returned + return staa[0]; + ^ +fail_compilation/test18282.d(70): Error: copying `S2000(& i)` into allocated memory escapes a reference to local variable `i` + S2000[] arr = [ S2000(&i) ]; + ^ +fail_compilation/test18282.d(79): Error: copying `& i` into allocated memory escapes a reference to local variable `i` + char*[int*] aa = [ &i : &c ]; + ^ +fail_compilation/test18282.d(79): Error: copying `& c` into allocated memory escapes a reference to local variable `c` + char*[int*] aa = [ &i : &c ]; + ^ +fail_compilation/test18282.d(91): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo` + ls = ls ~ &foo; + ^ +fail_compilation/test18282.d(92): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo` + ls = &foo ~ ls; + ^ +fail_compilation/test18282.d(93): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo` + ls ~= &foo; + ^ +fail_compilation/test18282.d(100): Error: copying `&this` into allocated memory escapes a reference to parameter `this` + arr ~= &this; + ^ --- */ @@ -54,17 +80,7 @@ void bar3() } -/****************************** -TEST_OUTPUT: ---- -fail_compilation/test18282.d(1007): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo` -fail_compilation/test18282.d(1008): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo` -fail_compilation/test18282.d(1009): Error: copying `& foo` into allocated memory escapes a reference to local variable `foo` -fail_compilation/test18282.d(1016): Error: copying `&this` into allocated memory escapes a reference to parameter `this` ---- -*/ - -#line 1000 +// Line 1000 starts here // https://issues.dlang.org/show_bug.cgi?id=18282 diff --git a/compiler/test/fail_compilation/test18312.d b/compiler/test/fail_compilation/test18312.d index e354a11eae86..38a548668f6a 100644 --- a/compiler/test/fail_compilation/test18312.d +++ b/compiler/test/fail_compilation/test18312.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -betterC TEST_OUTPUT: --- -fail_compilation/test18312.d(14): Error: array concatenation of expression `"[" ~ s ~ "]"` requires the GC which is not available with -betterC +fail_compilation/test18312.d(16): Error: array concatenation of expression `"[" ~ s ~ "]"` requires the GC which is not available with -betterC + s = "[" ~ s ~ "]"; + ^ --- */ diff --git a/compiler/test/fail_compilation/test18385.d b/compiler/test/fail_compilation/test18385.d index 2e48192ab642..b6ae52dfa2f8 100644 --- a/compiler/test/fail_compilation/test18385.d +++ b/compiler/test/fail_compilation/test18385.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/test18385.d(13): Error: function `test18385.foo` cannot overload `extern(C)` function at fail_compilation/test18385.d(12) +fail_compilation/test18385.d(15): Error: function `test18385.foo` cannot overload `extern(C)` function at fail_compilation/test18385.d(14) +void foo(double) { } + ^ --- */ diff --git a/compiler/test/fail_compilation/test18480.d b/compiler/test/fail_compilation/test18480.d index 848cd388303b..596384b65713 100644 --- a/compiler/test/fail_compilation/test18480.d +++ b/compiler/test/fail_compilation/test18480.d @@ -3,7 +3,11 @@ TEST_OUTPUT: --- fail_compilation/imports/test18480a.d(2): Error: `alias TestTemplate = TestTemplate;` cannot alias itself, use a qualified name to create an overload set +alias TestTemplate = TestTemplate; +^ fail_compilation/imports/test18480a.d(2): Error: alias `test18480a.TestTemplate` conflicts with alias `test18480a.TestTemplate` at fail_compilation/imports/test18480a.d(1) +alias TestTemplate = TestTemplate; +^ --- https://issues.dlang.org/show_bug.cgi?id=18480 */ diff --git a/compiler/test/fail_compilation/test18484.d b/compiler/test/fail_compilation/test18484.d index e51647b34914..af659f1043ec 100644 --- a/compiler/test/fail_compilation/test18484.d +++ b/compiler/test/fail_compilation/test18484.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test18484.d(19): Error: returning `x.bar()` escapes a reference to local variable `x` -fail_compilation/test18484.d(24): Error: escaping reference to stack allocated value returned by `S(0)` +fail_compilation/test18484.d(23): Error: returning `x.bar()` escapes a reference to local variable `x` + auto x = S(); return x.bar(); // error + ^ +fail_compilation/test18484.d(28): Error: escaping reference to stack allocated value returned by `S(0)` + return S().bar(); // error + ^ --- */ diff --git a/compiler/test/fail_compilation/test18597.d b/compiler/test/fail_compilation/test18597.d index 66cde58e047b..5d9ddb77d598 100644 --- a/compiler/test/fail_compilation/test18597.d +++ b/compiler/test/fail_compilation/test18597.d @@ -1,8 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/test18597.d(24): Error: field `Unaligned.p` cannot modify misaligned pointers in `@safe` code -fail_compilation/test18597.d(25): Error: field `Unaligned.p` cannot assign to misaligned pointers in `@safe` code -fail_compilation/test18597.d(26): Error: field `Unaligned.p` cannot assign to misaligned pointers in `@safe` code +fail_compilation/test18597.d(30): Error: field `Unaligned.p` cannot modify misaligned pointers in `@safe` code + u.p = new int; + ^ +fail_compilation/test18597.d(31): Error: field `Unaligned.p` cannot assign to misaligned pointers in `@safe` code + Unaligned v = Unaligned(0, new int); + ^ +fail_compilation/test18597.d(32): Error: field `Unaligned.p` cannot assign to misaligned pointers in `@safe` code + Unaligned w = { p : new int }; + ^ --- */ diff --git a/compiler/test/fail_compilation/test18607.d b/compiler/test/fail_compilation/test18607.d index b3af393bdac4..82aabb835206 100644 --- a/compiler/test/fail_compilation/test18607.d +++ b/compiler/test/fail_compilation/test18607.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test18607.d(10): Error: function `test18607.test!int.test` no `return exp;` or `assert(0);` at end of function +fail_compilation/test18607.d(12): Error: function `test18607.test!int.test` no `return exp;` or `assert(0);` at end of function +int* test(T...)() pure @safe { + ^ & test --- */ diff --git a/compiler/test/fail_compilation/test18644.d b/compiler/test/fail_compilation/test18644.d index 201e44694edc..484fb647fb62 100644 --- a/compiler/test/fail_compilation/test18644.d +++ b/compiler/test/fail_compilation/test18644.d @@ -1,9 +1,15 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test18644.d(15): Error: nested function `foo` returns `scope` values and escapes them into allocated memory -fail_compilation/test18644.d(16): Error: escaping local variable through nested function `foo` +fail_compilation/test18644.d(21): Error: nested function `foo` returns `scope` values and escapes them into allocated memory + int*[] b = [foo()]; + ^ fail_compilation/test18644.d(22): Error: escaping local variable through nested function `foo` + return foo(); + ^ +fail_compilation/test18644.d(28): Error: escaping local variable through nested function `foo` + return foo(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test18708.d b/compiler/test/fail_compilation/test18708.d index 16530ca19077..0d1544ab05bb 100644 --- a/compiler/test/fail_compilation/test18708.d +++ b/compiler/test/fail_compilation/test18708.d @@ -1,9 +1,17 @@ /* TEST_OUTPUT: --- -fail_compilation/test18708.d(24): Error: one path skips field `s` -fail_compilation/test18708.d(29): Error: one path skips field `s` -fail_compilation/test18708.d(34): Error: one path skips field `s` -fail_compilation/test18708.d(39): Error: one path skips field `s` +fail_compilation/test18708.d(32): Error: one path skips field `s` + i || bar(s = t); + ^ +fail_compilation/test18708.d(37): Error: one path skips field `s` + i && bar(s = t); + ^ +fail_compilation/test18708.d(42): Error: one path skips field `s` + i ? bar(s = t) : i; + ^ +fail_compilation/test18708.d(47): Error: one path skips field `s` + i ? i : bar(s = t); + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=18708 diff --git a/compiler/test/fail_compilation/test18736.d b/compiler/test/fail_compilation/test18736.d index 36c5fd89a1eb..985e7f83a923 100644 --- a/compiler/test/fail_compilation/test18736.d +++ b/compiler/test/fail_compilation/test18736.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test18736.d(21): Error: constructor calls not allowed in loops or after labels +fail_compilation/test18736.d(23): Error: constructor calls not allowed in loops or after labels + this('c'); + ^ --- */ diff --git a/compiler/test/fail_compilation/test19097.d b/compiler/test/fail_compilation/test19097.d index 980931e3da2f..bb112a45914c 100644 --- a/compiler/test/fail_compilation/test19097.d +++ b/compiler/test/fail_compilation/test19097.d @@ -1,14 +1,30 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/test19097.d(44): Error: scope variable `s` may not be returned -fail_compilation/test19097.d(48): Error: scope variable `s1` may not be returned -fail_compilation/test19097.d(77): Error: scope variable `z` assigned to `ref` variable `refPtr` with longer lifetime -fail_compilation/test19097.d(108): Error: scope variable `s4` may not be returned -fail_compilation/test19097.d(126): Error: scope variable `s5c` may not be returned -fail_compilation/test19097.d(130): Error: scope variable `s5m` may not be returned -fail_compilation/test19097.d(147): Error: scope variable `s6c` may not be returned -fail_compilation/test19097.d(151): Error: scope variable `s6m` may not be returned +fail_compilation/test19097.d(60): Error: scope variable `s` may not be returned + return s; // so this should error + ^ +fail_compilation/test19097.d(64): Error: scope variable `s1` may not be returned + return s1; + ^ +fail_compilation/test19097.d(93): Error: scope variable `z` assigned to `ref` variable `refPtr` with longer lifetime + refPtr = z; // should not be allowed + ^ +fail_compilation/test19097.d(124): Error: scope variable `s4` may not be returned + return s4.p; + ^ +fail_compilation/test19097.d(142): Error: scope variable `s5c` may not be returned + return s5c; // so this should error + ^ +fail_compilation/test19097.d(146): Error: scope variable `s5m` may not be returned + return s5m; + ^ +fail_compilation/test19097.d(163): Error: scope variable `s6c` may not be returned + return s6c; // so this should error + ^ +fail_compilation/test19097.d(167): Error: scope variable `s6m` may not be returned + return s6m; + ^ --- */ diff --git a/compiler/test/fail_compilation/test19107.d b/compiler/test/fail_compilation/test19107.d index 9a6e33586477..56d4a156dd44 100644 --- a/compiler/test/fail_compilation/test19107.d +++ b/compiler/test/fail_compilation/test19107.d @@ -2,12 +2,16 @@ EXTRA_FILES: imports/imp19661.d imports/test19107a.d imports/test19107b.d TEST_OUTPUT: --- -fail_compilation/test19107.d(24): Error: template `all` is not callable using argument types `!((c) => c)(string[])` -fail_compilation/test19107.d(18): Candidate is: `all(alias pred, T)(T t)` +fail_compilation/test19107.d(28): Error: template `all` is not callable using argument types `!((c) => c)(string[])` + args.all!(c => c); + ^ +fail_compilation/test19107.d(22): Candidate is: `all(alias pred, T)(T t)` with `pred = __lambda2, T = string[]` must satisfy the following constraint: ` is(typeof(I!pred(t)))` +void all(alias pred, T)(T t) + ^ --- */ diff --git a/compiler/test/fail_compilation/test19112.d b/compiler/test/fail_compilation/test19112.d index f5bd4035eeb7..da4acc16e6b2 100644 --- a/compiler/test/fail_compilation/test19112.d +++ b/compiler/test/fail_compilation/test19112.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/test19112.d(13): Error: cannot implicitly convert expression `[123, 456]` of type `int[]` to `int[1]` -fail_compilation/test19112.d(15): Error: cannot implicitly convert expression `a` of type `int[]` to `int[1]` +fail_compilation/test19112.d(17): Error: cannot implicitly convert expression `[123, 456]` of type `int[]` to `int[1]` + int* p = [123, 456] in aa; + ^ +fail_compilation/test19112.d(19): Error: cannot implicitly convert expression `a` of type `int[]` to `int[1]` + p = a in aa; + ^ --- */ diff --git a/compiler/test/fail_compilation/test19176.d b/compiler/test/fail_compilation/test19176.d index ceceb74c9cba..a72496288950 100644 --- a/compiler/test/fail_compilation/test19176.d +++ b/compiler/test/fail_compilation/test19176.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -unittest TEST_OUTPUT: --- -fail_compilation/test19176.d(13): Error: argument `foo()` to __traits(getUnitTests) must be a module or aggregate, not a template +fail_compilation/test19176.d(15): Error: argument `foo()` to __traits(getUnitTests) must be a module or aggregate, not a template + __traits(getUnitTests, foo); + ^ --- */ diff --git a/compiler/test/fail_compilation/test19193.d b/compiler/test/fail_compilation/test19193.d index e75d90e5a926..5a9093270966 100644 --- a/compiler/test/fail_compilation/test19193.d +++ b/compiler/test/fail_compilation/test19193.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/test19193.d(13): Deprecation: enum member `test19193.T19193!int.A.b` is deprecated +fail_compilation/test19193.d(15): Deprecation: enum member `test19193.T19193!int.A.b` is deprecated + cast(void)T19193!int.A.b; + ^ --- */ diff --git a/compiler/test/fail_compilation/test19473.d b/compiler/test/fail_compilation/test19473.d index ba6024b000b8..0adbed22dab7 100644 --- a/compiler/test/fail_compilation/test19473.d +++ b/compiler/test/fail_compilation/test19473.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test19473.d(14): Error: union `test19473.P` no size because of forward reference +fail_compilation/test19473.d(16): Error: union `test19473.P` no size because of forward reference + P p; + ^ --- */ diff --git a/compiler/test/fail_compilation/test19608.d b/compiler/test/fail_compilation/test19608.d index cea84a6bd50a..1e4aa8311a37 100644 --- a/compiler/test/fail_compilation/test19608.d +++ b/compiler/test/fail_compilation/test19608.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test19608.d(15): Error: cannot pass function `*& f` as a function argument +fail_compilation/test19608.d(17): Error: cannot pass function `*& f` as a function argument + g(*&f); // ICE -> Error + ^ --- */ import core.stdc.stdarg; diff --git a/compiler/test/fail_compilation/test19646.d b/compiler/test/fail_compilation/test19646.d index 766b387a559e..6a79df17c31d 100644 --- a/compiler/test/fail_compilation/test19646.d +++ b/compiler/test/fail_compilation/test19646.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test19646.d(12): Error: cast from `const(int)*` to `int*` not allowed in safe code -fail_compilation/test19646.d(12): Source type is incompatible with target type containing a pointer -fail_compilation/test19646.d(18): Error: `@safe` variable `z` cannot be initialized by calling `@system` function `f` +fail_compilation/test19646.d(16): Error: cast from `const(int)*` to `int*` not allowed in safe code +int* y = cast(int*)&x; + ^ +fail_compilation/test19646.d(16): Source type is incompatible with target type containing a pointer +fail_compilation/test19646.d(22): Error: `@safe` variable `z` cannot be initialized by calling `@system` function `f` +@safe int* z = f(); + ^ --- https://issues.dlang.org/show_bug.cgi?id=19646 */ diff --git a/compiler/test/fail_compilation/test19661.d b/compiler/test/fail_compilation/test19661.d index 369c0a862495..b358b2bf8c56 100644 --- a/compiler/test/fail_compilation/test19661.d +++ b/compiler/test/fail_compilation/test19661.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/imp19661.d TEST_OUTPUT: --- -fail_compilation/test19661.d(11): Error: variables cannot be initialized with an expression of type `void`. Use `void` initialization instead. +fail_compilation/test19661.d(13): Error: variables cannot be initialized with an expression of type `void`. Use `void` initialization instead. +immutable bool testModule = testFunctionMembers!(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test19971.d b/compiler/test/fail_compilation/test19971.d index 3d46eeb82ef0..cf59ff60f21c 100644 --- a/compiler/test/fail_compilation/test19971.d +++ b/compiler/test/fail_compilation/test19971.d @@ -1,10 +1,16 @@ /* TEST_OUTPUT: --- -fail_compilation/test19971.d(16): Error: function `f` is not callable using argument types `(string)` -fail_compilation/test19971.d(16): cannot pass argument `"%s"` of type `string` to parameter `int x` -fail_compilation/test19971.d(13): `test19971.f(int x)` declared here -fail_compilation/test19971.d(17): Error: function literal `__lambda1(int x)` is not callable using argument types `(string)` -fail_compilation/test19971.d(17): cannot pass argument `"%s"` of type `string` to parameter `int x` +fail_compilation/test19971.d(22): Error: function `f` is not callable using argument types `(string)` + f("%s"); + ^ +fail_compilation/test19971.d(22): cannot pass argument `"%s"` of type `string` to parameter `int x` +fail_compilation/test19971.d(19): `test19971.f(int x)` declared here +void f(int x) {} + ^ +fail_compilation/test19971.d(23): Error: function literal `__lambda1(int x)` is not callable using argument types `(string)` + (int x) {} ("%s"); + ^ +fail_compilation/test19971.d(23): cannot pass argument `"%s"` of type `string` to parameter `int x` --- */ diff --git a/compiler/test/fail_compilation/test20023.d b/compiler/test/fail_compilation/test20023.d index 909e699d3b5a..28ff532a6dae 100644 --- a/compiler/test/fail_compilation/test20023.d +++ b/compiler/test/fail_compilation/test20023.d @@ -4,7 +4,11 @@ TEST_OUTPUT: --- fail_compilation/imports/test20023b.d(8): Error: scope variable `e` may not be returned -fail_compilation/test20023.d(15): Error: template instance `imports.test20023b.threw!()` error instantiating + return e; + ^ +fail_compilation/test20023.d(19): Error: template instance `imports.test20023b.threw!()` error instantiating + threw!()(); + ^ --- */ import imports.test20023b; diff --git a/compiler/test/fail_compilation/test20096.d b/compiler/test/fail_compilation/test20096.d index 159efc0ac799..41a756ff1788 100644 --- a/compiler/test/fail_compilation/test20096.d +++ b/compiler/test/fail_compilation/test20096.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test20096.d(15): Error: cannot `goto` into `try` block +fail_compilation/test20096.d(17): Error: cannot `goto` into `try` block + goto L1; + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=20096 diff --git a/compiler/test/fail_compilation/test20149.d b/compiler/test/fail_compilation/test20149.d index af99a59d7e0c..8bee94c045ff 100644 --- a/compiler/test/fail_compilation/test20149.d +++ b/compiler/test/fail_compilation/test20149.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/test20149.d(28): Error: escaping reference to stack allocated value returned by `S('\xff').this(1)` +fail_compilation/test20149.d(30): Error: escaping reference to stack allocated value returned by `S('\xff').this(1)` + return S(1)[]; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20245.d b/compiler/test/fail_compilation/test20245.d index a6bbba291285..9c9e3f7c75a3 100644 --- a/compiler/test/fail_compilation/test20245.d +++ b/compiler/test/fail_compilation/test20245.d @@ -2,16 +2,36 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test20245.d(21): Error: reference to local variable `x` assigned to non-scope parameter `ptr` calling `escape` -fail_compilation/test20245.d(22): Error: copying `&x` into allocated memory escapes a reference to parameter `x` -fail_compilation/test20245.d(23): Error: scope variable `a` may not be returned -fail_compilation/test20245.d(27): Error: cannot take address of `scope` variable `x` since `scope` applies to first indirection only -fail_compilation/test20245.d(33): Error: reference to local variable `x` assigned to non-scope parameter `ptr` calling `escape` -fail_compilation/test20245.d(34): Error: copying `&x` into allocated memory escapes a reference to parameter `x` -fail_compilation/test20245.d(50): Error: reference to local variable `price` assigned to non-scope `this.minPrice` -fail_compilation/test20245.d(69): Error: reference to local variable `this.content[]` calling non-scope member function `Exception.this()` -fail_compilation/test20245.d(89): Error: reference to local variable `this` assigned to non-scope parameter `content` calling `listUp` -fail_compilation/test20245.d(82): which is not `scope` because of `charPtr = content` +fail_compilation/test20245.d(41): Error: reference to local variable `x` assigned to non-scope parameter `ptr` calling `escape` + escape(&x); + ^ +fail_compilation/test20245.d(42): Error: copying `&x` into allocated memory escapes a reference to parameter `x` + auto b = [&x]; + ^ +fail_compilation/test20245.d(43): Error: scope variable `a` may not be returned + return a; + ^ +fail_compilation/test20245.d(47): Error: cannot take address of `scope` variable `x` since `scope` applies to first indirection only + int** a = &x; + ^ +fail_compilation/test20245.d(53): Error: reference to local variable `x` assigned to non-scope parameter `ptr` calling `escape` + escape(&x); + ^ +fail_compilation/test20245.d(54): Error: copying `&x` into allocated memory escapes a reference to parameter `x` + auto b = [&x]; + ^ +fail_compilation/test20245.d(70): Error: reference to local variable `price` assigned to non-scope `this.minPrice` + minPrice = &price; // Should not compile. + ^ +fail_compilation/test20245.d(89): Error: reference to local variable `this.content[]` calling non-scope member function `Exception.this()` + throw new Exception(content[]); + ^ +fail_compilation/test20245.d(109): Error: reference to local variable `this` assigned to non-scope parameter `content` calling `listUp` + listUp(&content); + ^ +fail_compilation/test20245.d(102): which is not `scope` because of `charPtr = content` +auto listUp(const(char)* content) {charPtr = content;} + ^ --- */ diff --git a/compiler/test/fail_compilation/test20267.d b/compiler/test/fail_compilation/test20267.d index 996980a94d23..78b43bf624bb 100644 --- a/compiler/test/fail_compilation/test20267.d +++ b/compiler/test/fail_compilation/test20267.d @@ -2,13 +2,27 @@ EXTRA_FILES: imports/test20267.d TEST_OUTPUT: --- -fail_compilation/test20267.d(20): Error: variable `string` is used as a type -fail_compilation/test20267.d(19): variable `string` is declared here -fail_compilation/test20267.d(23): Error: variable `boolean` is used as a type -fail_compilation/test20267.d(22): variable `boolean` is declared here -fail_compilation/test20267.d(30): Error: variable `array` is used as a type -fail_compilation/test20267.d(28): variable `array` is imported here from: `imports.test20267` +fail_compilation/test20267.d(34): Error: variable `string` is used as a type + string[] args2 = args; + ^ +fail_compilation/test20267.d(33): variable `string` is declared here + immutable string = "bar"; + ^ +fail_compilation/test20267.d(37): Error: variable `boolean` is used as a type + boolean b = false; + ^ +fail_compilation/test20267.d(36): variable `boolean` is declared here + bool boolean = true; + ^ +fail_compilation/test20267.d(44): Error: variable `array` is used as a type + array foo; + ^ +fail_compilation/test20267.d(42): variable `array` is imported here from: `imports.test20267` + import imports.test20267 : array; + ^ fail_compilation/imports/test20267.d(3): variable `array` is declared here +int[1] array; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20324.d b/compiler/test/fail_compilation/test20324.d index c38e348aceeb..e812ea7d78ef 100644 --- a/compiler/test/fail_compilation/test20324.d +++ b/compiler/test/fail_compilation/test20324.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -unittest TEST_OUTPUT: --- -fail_compilation/test20324.d(16): Error: argument `Test()` to __traits(getUnitTests) must be a module or aggregate, not a template -fail_compilation/test20324.d(16): while evaluating `pragma(msg, __traits(getUnitTests, Test))` +fail_compilation/test20324.d(20): Error: argument `Test()` to __traits(getUnitTests) must be a module or aggregate, not a template +pragma(msg, __traits(getUnitTests, Test)); + ^ +fail_compilation/test20324.d(20): while evaluating `pragma(msg, __traits(getUnitTests, Test))` +pragma(msg, __traits(getUnitTests, Test)); +^ --- */ // https://issues.dlang.org/show_bug.cgi?id=20324 diff --git a/compiler/test/fail_compilation/test20383.d b/compiler/test/fail_compilation/test20383.d index 88c56ee75d1c..0bf2a37880b6 100644 --- a/compiler/test/fail_compilation/test20383.d +++ b/compiler/test/fail_compilation/test20383.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test20383.d(11): Error: invalid array operation `cast(int[])data[] & [42]` (possible missing []) +fail_compilation/test20383.d(13): Error: invalid array operation `cast(int[])data[] & [42]` (possible missing []) + ubyte[1] result = data[] & [42]; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20515.d b/compiler/test/fail_compilation/test20515.d index cf4bbde58d93..acff462fbadb 100644 --- a/compiler/test/fail_compilation/test20515.d +++ b/compiler/test/fail_compilation/test20515.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test20515.d:16: Deprecation: function `test20515.foo` is deprecated -fail_compilation/test20515.d:17: Error: undefined identifier `bar` +fail_compilation/test20515.d:20: Deprecation: function `test20515.foo` is deprecated + foo; + ^ +fail_compilation/test20515.d:21: Error: undefined identifier `bar` + bar; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20522.d b/compiler/test/fail_compilation/test20522.d index 1d21c178b7f9..bab0b49028df 100644 --- a/compiler/test/fail_compilation/test20522.d +++ b/compiler/test/fail_compilation/test20522.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -w TEST_OUTPUT: --- -fail_compilation/test20522.d(19): Error: undefined identifier `non_existent` +fail_compilation/test20522.d(21): Error: undefined identifier `non_existent` + non_existent; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20549.d b/compiler/test/fail_compilation/test20549.d index dc95da10eb53..f443c06c5927 100644 --- a/compiler/test/fail_compilation/test20549.d +++ b/compiler/test/fail_compilation/test20549.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: ---- -fail_compilation/test20549.d(12): Error: variable `test.__a_field_0` - variables cannot be of type `void` +fail_compilation/test20549.d(14): Error: variable `test.__a_field_0` - variables cannot be of type `void` +enum a = AliasSeq!test; + ^ ---- */ diff --git a/compiler/test/fail_compilation/test20569.d b/compiler/test/fail_compilation/test20569.d index 7ad50dc13083..ec6e149ff76c 100644 --- a/compiler/test/fail_compilation/test20569.d +++ b/compiler/test/fail_compilation/test20569.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test20569.d(19): Error: cannot take address of `scope` variable `s1` since `scope` applies to first indirection only -fail_compilation/test20569.d(23): Error: cannot take address of `scope` variable `s2` since `scope` applies to first indirection only +fail_compilation/test20569.d(23): Error: cannot take address of `scope` variable `s1` since `scope` applies to first indirection only + scope int** p1 = &s1.pointer; + ^ +fail_compilation/test20569.d(27): Error: cannot take address of `scope` variable `s2` since `scope` applies to first indirection only + auto p2 = &s2.pointer; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20610.d b/compiler/test/fail_compilation/test20610.d index 9bdeb20cf005..13b019310f53 100644 --- a/compiler/test/fail_compilation/test20610.d +++ b/compiler/test/fail_compilation/test20610.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test20610.d(20): Error: cannot modify `const` expression `field` +fail_compilation/test20610.d(22): Error: cannot modify `const` expression `field` + field = 10; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20626.d b/compiler/test/fail_compilation/test20626.d index bd0bed8a85a7..fd4ea84729c8 100644 --- a/compiler/test/fail_compilation/test20626.d +++ b/compiler/test/fail_compilation/test20626.d @@ -3,6 +3,8 @@ REQUIRED_ARGS: -check=invariant=off TEST_OUTPUT: ---- fail_compilation/test20626.d(2): Error: expression `__unittest_L1_C1` has no type +REQUIRED_ARGS: -check=invariant=off + ^ _error_ const void() ---- diff --git a/compiler/test/fail_compilation/test20655.d b/compiler/test/fail_compilation/test20655.d index c3bb70af4928..e08e8bc7515a 100644 --- a/compiler/test/fail_compilation/test20655.d +++ b/compiler/test/fail_compilation/test20655.d @@ -2,15 +2,27 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/test20655.d(29): Deprecation: `@safe` function `g` calling `f1` -fail_compilation/test20655.d(24): which wouldn't be `@safe` because of: -fail_compilation/test20655.d(24): field `U.s` cannot access pointers in `@safe` code that overlap other fields -fail_compilation/test20655.d(30): Deprecation: `@safe` function `g` calling `f2` -fail_compilation/test20655.d(25): which wouldn't be `@safe` because of: -fail_compilation/test20655.d(25): field `U.s` cannot access pointers in `@safe` code that overlap other fields -fail_compilation/test20655.d(31): Deprecation: `@safe` function `g` calling `f3` -fail_compilation/test20655.d(28): which wouldn't be `@safe` because of: -fail_compilation/test20655.d(28): field `U.s` cannot access pointers in `@safe` code that overlap other fields +fail_compilation/test20655.d(22): Deprecation: `@safe` function `g` calling `f1` + f1(); /* Should be rejected with error "cannot call @system function". */ + ^ +fail_compilation/test20655.d(17): which wouldn't be `@safe` because of: +auto f1() { auto s = u.s; } /* Should be inferred as @system. */ + ^ +fail_compilation/test20655.d(17): field `U.s` cannot access pointers in `@safe` code that overlap other fields +fail_compilation/test20655.d(23): Deprecation: `@safe` function `g` calling `f2` + f2(); /* ditto */ + ^ +fail_compilation/test20655.d(18): which wouldn't be `@safe` because of: +void f2()() { auto s = u.s; } /* ditto */ + ^ +fail_compilation/test20655.d(18): field `U.s` cannot access pointers in `@safe` code that overlap other fields +fail_compilation/test20655.d(24): Deprecation: `@safe` function `g` calling `f3` + f3(); /* ditto */ + ^ +fail_compilation/test20655.d(21): which wouldn't be `@safe` because of: + void f3() { auto s = u.s; } /* ditto */ + ^ +fail_compilation/test20655.d(21): field `U.s` cannot access pointers in `@safe` code that overlap other fields --- */ diff --git a/compiler/test/fail_compilation/test20719.d b/compiler/test/fail_compilation/test20719.d index b9305f20f80f..436870d62fc1 100644 --- a/compiler/test/fail_compilation/test20719.d +++ b/compiler/test/fail_compilation/test20719.d @@ -1,8 +1,14 @@ /* TEST_OUTPUT: --- -fail_compilation/test20719.d(13): Error: struct `test20719.SumType` no size because of forward reference -fail_compilation/test20719.d(32): Error: variable `test20719.isCopyable!(SumType).__lambda2.foo` - size of type `SumType` is invalid -fail_compilation/test20719.d(18): Error: template instance `test20719.isCopyable!(SumType)` error instantiating +fail_compilation/test20719.d(19): Error: struct `test20719.SumType` no size because of forward reference + Types[0] t; + ^ +fail_compilation/test20719.d(38): Error: variable `test20719.isCopyable!(SumType).__lambda2.foo` - size of type `SumType` is invalid +enum isCopyable(S) = { S foo; }; + ^ +fail_compilation/test20719.d(24): Error: template instance `test20719.isCopyable!(SumType)` error instantiating + static if (isCopyable!(Types[0])) {} + ^ --- */ struct SumType diff --git a/compiler/test/fail_compilation/test20881.d b/compiler/test/fail_compilation/test20881.d index d4c5f07bea5e..2186ed578de9 100644 --- a/compiler/test/fail_compilation/test20881.d +++ b/compiler/test/fail_compilation/test20881.d @@ -2,10 +2,18 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test20881.d(20): Error: scope variable `this` may not be returned -fail_compilation/test20881.d(27): Error: address of variable `s` assigned to `global` with longer lifetime -fail_compilation/test20881.d(28): Error: address of variable `s` assigned to `global` with longer lifetime -fail_compilation/test20881.d(29): Error: address of variable `s` assigned to `global` with longer lifetime +fail_compilation/test20881.d(28): Error: scope variable `this` may not be returned + int* borrowC() scope return { return ptr; } + ^ +fail_compilation/test20881.d(35): Error: address of variable `s` assigned to `global` with longer lifetime + global = s.borrowA; + ^ +fail_compilation/test20881.d(36): Error: address of variable `s` assigned to `global` with longer lifetime + global = s.borrowB; + ^ +fail_compilation/test20881.d(37): Error: address of variable `s` assigned to `global` with longer lifetime + global = s.borrowC; + ^ --- */ @safe: diff --git a/compiler/test/fail_compilation/test20903.d b/compiler/test/fail_compilation/test20903.d index 26996aadc949..4150ed144ec0 100644 --- a/compiler/test/fail_compilation/test20903.d +++ b/compiler/test/fail_compilation/test20903.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -O -m64 * TEST_OUTPUT: --- -fail_compilation/test20903.d(14): Error: integer overflow +fail_compilation/test20903.d(16): Error: integer overflow + return r / x; + ^ --- */ diff --git a/compiler/test/fail_compilation/test20919.d b/compiler/test/fail_compilation/test20919.d index 2f1bad135506..730571b0a109 100644 --- a/compiler/test/fail_compilation/test20919.d +++ b/compiler/test/fail_compilation/test20919.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test20919.d(12): Error: `__traits(getAttributes, int a)` does not give a valid type +fail_compilation/test20919.d(14): Error: `__traits(getAttributes, int a)` does not give a valid type + __traits(getAttributes, params) a; + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=20919 diff --git a/compiler/test/fail_compilation/test21025.d b/compiler/test/fail_compilation/test21025.d index 6b2496a58406..26b168a95439 100644 --- a/compiler/test/fail_compilation/test21025.d +++ b/compiler/test/fail_compilation/test21025.d @@ -4,10 +4,18 @@ /* TEST_OUTPUT: --- -fail_compilation/test21025.d(15): Error: variable `r` cannot be read at compile time -fail_compilation/test21025.d(15): called from here: `binaryFun(r, r)` -fail_compilation/test21025.d(24): Error: template `uniq` is not callable using argument types `!()(void[])` -fail_compilation/test21025.d(14): Candidate is: `uniq()(int[] r)` +fail_compilation/test21025.d(23): Error: variable `r` cannot be read at compile time +if (binaryFun(r, r)) {} + ^ +fail_compilation/test21025.d(23): called from here: `binaryFun(r, r)` +if (binaryFun(r, r)) {} + ^ +fail_compilation/test21025.d(32): Error: template `uniq` is not callable using argument types `!()(void[])` + uniq([]); + ^ +fail_compilation/test21025.d(22): Candidate is: `uniq()(int[] r)` +void uniq()(int[] r) + ^ --- */ diff --git a/compiler/test/fail_compilation/test21062.d b/compiler/test/fail_compilation/test21062.d index 5ab530737339..112f2eeaad82 100644 --- a/compiler/test/fail_compilation/test21062.d +++ b/compiler/test/fail_compilation/test21062.d @@ -1,12 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/test21062.d(16): Error: no identifier for declarator `bool` -fail_compilation/test21062.d(16): `synchronized` is a keyword, perhaps append `_` to make it an identifier -fail_compilation/test21062.d(17): Error: no identifier for declarator `ubyte*` -fail_compilation/test21062.d(17): `out` is a keyword, perhaps append `_` to make it an identifier -fail_compilation/test21062.d(21): Error: no identifier for declarator `uint` -fail_compilation/test21062.d(21): `in` is a keyword, perhaps append `_` to make it an identifier +fail_compilation/test21062.d(22): Error: no identifier for declarator `bool` +bool synchronized; + ^ +fail_compilation/test21062.d(22): `synchronized` is a keyword, perhaps append `_` to make it an identifier +fail_compilation/test21062.d(23): Error: no identifier for declarator `ubyte*` +ubyte* out; + ^ +fail_compilation/test21062.d(23): `out` is a keyword, perhaps append `_` to make it an identifier +fail_compilation/test21062.d(27): Error: no identifier for declarator `uint` + foreach(uint in; []) + ^ +fail_compilation/test21062.d(27): `in` is a keyword, perhaps append `_` to make it an identifier --- */ diff --git a/compiler/test/fail_compilation/test21093.d b/compiler/test/fail_compilation/test21093.d index b85d0c36c3fc..b0f090aae641 100644 --- a/compiler/test/fail_compilation/test21093.d +++ b/compiler/test/fail_compilation/test21093.d @@ -2,10 +2,18 @@ /* TEST_OUTPUT: --- -fail_compilation/test21093.d(24): Error: function `test21093.LocalTime.hasDST` does not override any function -fail_compilation/test21093.d(32): Error: class `test21093.LocalTime2` cannot implicitly generate a default constructor when base class `test21093.TimeZone2` is missing a default constructor -fail_compilation/test21093.d(44): Error: function `test21093.LocalTime3.string` does not override any function -fail_compilation/test21093.d(55): Error: cannot implicitly override base class method `test21093.TimeZone4.hasDST` with `test21093.LocalTime4.hasDST`; add `override` attribute +fail_compilation/test21093.d(32): Error: function `test21093.LocalTime.hasDST` does not override any function + override hasDST() { } + ^ +fail_compilation/test21093.d(40): Error: class `test21093.LocalTime2` cannot implicitly generate a default constructor when base class `test21093.TimeZone2` is missing a default constructor +class LocalTime2 : TimeZone2 +^ +fail_compilation/test21093.d(52): Error: function `test21093.LocalTime3.string` does not override any function + override string () { } + ^ +fail_compilation/test21093.d(63): Error: cannot implicitly override base class method `test21093.TimeZone4.hasDST` with `test21093.LocalTime4.hasDST`; add `override` attribute + bool hasDST() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/test21096.d b/compiler/test/fail_compilation/test21096.d index 302eb3da31a1..9b362890c11b 100644 --- a/compiler/test/fail_compilation/test21096.d +++ b/compiler/test/fail_compilation/test21096.d @@ -3,8 +3,10 @@ /* TEST_OUTPUT: --- -fail_compilation/test21096.d(11): Error: identifier or new keyword expected following `(...)`. -fail_compilation/test21096.d(11): Error: no identifier for declarator `char[(__error)]` +fail_compilation/test21096.d(13): Error: identifier or new keyword expected following `(...)`. +char[(void*).]; + ^ +fail_compilation/test21096.d(13): Error: no identifier for declarator `char[(__error)]` --- */ diff --git a/compiler/test/fail_compilation/test21164.d b/compiler/test/fail_compilation/test21164.d index a12002488ede..2261b626831c 100644 --- a/compiler/test/fail_compilation/test21164.d +++ b/compiler/test/fail_compilation/test21164.d @@ -4,7 +4,11 @@ TEST_OUTPUT: fail_compilation/imports/test21164d.d(3): Error: (expression) expected following `static if` fail_compilation/imports/test21164d.d(3): Error: found `}` instead of statement fail_compilation/imports/test21164a.d(5): Error: undefined identifier `I` -fail_compilation/test21164.d(12): Error: template instance `test21164a.D!(R!(O(), 1))` error instantiating + I; + ^ +fail_compilation/test21164.d(16): Error: template instance `test21164a.D!(R!(O(), 1))` error instantiating +auto GB(D!Q) + ^ --- */ import imports.test21164a; diff --git a/compiler/test/fail_compilation/test21198.d b/compiler/test/fail_compilation/test21198.d index 04c3bcff7d3c..a6322b93bd60 100644 --- a/compiler/test/fail_compilation/test21198.d +++ b/compiler/test/fail_compilation/test21198.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test21198.d(23): Error: generating an `inout` copy constructor for `struct test21198.U` failed, therefore instances of it are uncopyable +fail_compilation/test21198.d(25): Error: generating an `inout` copy constructor for `struct test21198.U` failed, therefore instances of it are uncopyable + U copy = original; + ^ --- */ diff --git a/compiler/test/fail_compilation/test21204.d b/compiler/test/fail_compilation/test21204.d index 45bb6d727ab3..f018e9c39d48 100644 --- a/compiler/test/fail_compilation/test21204.d +++ b/compiler/test/fail_compilation/test21204.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test21204.d(22): Error: generating an `inout` copy constructor for `struct test21204.B` failed, therefore instances of it are uncopyable +fail_compilation/test21204.d(24): Error: generating an `inout` copy constructor for `struct test21204.B` failed, therefore instances of it are uncopyable + B b2 = b1; + ^ --- */ diff --git a/compiler/test/fail_compilation/test21246.d b/compiler/test/fail_compilation/test21246.d index 02c0b350171d..d5ebaded220d 100644 --- a/compiler/test/fail_compilation/test21246.d +++ b/compiler/test/fail_compilation/test21246.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test21246.d(16): Error: function `void test21246.C.set(Clock clock)` does not override any function, did you mean to override `void imports.test21246.B.set(imports.test21246.Clock clock)`? +fail_compilation/test21246.d(18): Error: function `void test21246.C.set(Clock clock)` does not override any function, did you mean to override `void imports.test21246.B.set(imports.test21246.Clock clock)`? + override void set (Clock clock) { } + ^ --- */ module test21246; diff --git a/compiler/test/fail_compilation/test21259.d b/compiler/test/fail_compilation/test21259.d index 31dba3d52ca9..8412102e15be 100644 --- a/compiler/test/fail_compilation/test21259.d +++ b/compiler/test/fail_compilation/test21259.d @@ -3,10 +3,18 @@ /* TEST_OUTPUT: --- -fail_compilation/test21259.d(39): Deprecation: alias `test21259.Foo.width` is deprecated -fail_compilation/test21259.d(40): Deprecation: alias `test21259.Foo2.width` is deprecated -fail_compilation/test21259.d(41): Deprecation: variable `test21259.Foo3.bar` is deprecated -fail_compilation/test21259.d(42): Deprecation: alias `test21259.Foo4.width` is deprecated +fail_compilation/test21259.d(47): Deprecation: alias `test21259.Foo.width` is deprecated + Foo a = { width : 100}; + ^ +fail_compilation/test21259.d(48): Deprecation: alias `test21259.Foo2.width` is deprecated + Foo2 b = { width : 100}; + ^ +fail_compilation/test21259.d(49): Deprecation: variable `test21259.Foo3.bar` is deprecated + Foo3 c = { bar : 100}; + ^ +fail_compilation/test21259.d(50): Deprecation: alias `test21259.Foo4.width` is deprecated + Foo4 d = { width : 100}; + ^ --- */ diff --git a/compiler/test/fail_compilation/test21319.d b/compiler/test/fail_compilation/test21319.d index 7298de2df146..ab98cdf91a62 100644 --- a/compiler/test/fail_compilation/test21319.d +++ b/compiler/test/fail_compilation/test21319.d @@ -2,7 +2,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test21319.d(11): Error: circular reference to `test21319.C.c` +fail_compilation/test21319.d(13): Error: circular reference to `test21319.C.c` + immutable C c = new C(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test21353.d b/compiler/test/fail_compilation/test21353.d index 14fa26dcce72..e05f9400332b 100644 --- a/compiler/test/fail_compilation/test21353.d +++ b/compiler/test/fail_compilation/test21353.d @@ -2,14 +2,30 @@ EXTRA_FILES: imports/imp21353.d TEST_OUTPUT: --- -fail_compilation/test21353.d(22): Error: no property `A` for type `imports.imp21353.B` +fail_compilation/test21353.d(38): Error: no property `A` for type `imports.imp21353.B` + B.A; + ^ fail_compilation/imports/imp21353.d(5): struct `B` defined here -fail_compilation/test21353.d(23): Error: no property `A` for type `imports.imp21353.B` +struct B { import imports.imp21353 : A; } +^ +fail_compilation/test21353.d(39): Error: no property `A` for type `imports.imp21353.B` + with (B) { A(0); } + ^ fail_compilation/imports/imp21353.d(5): struct `B` defined here -fail_compilation/test21353.d(24): Error: no property `A` for type `imports.imp21353.B` +struct B { import imports.imp21353 : A; } +^ +fail_compilation/test21353.d(40): Error: no property `A` for type `imports.imp21353.B` + with (B()) { A(0); } // fixed + ^ fail_compilation/imports/imp21353.d(5): struct `B` defined here -fail_compilation/test21353.d(26): Error: undefined identifier `P` in module `imports.imp21353` -fail_compilation/test21353.d(27): Error: undefined identifier `P` in module `imports.imp21353` +struct B { import imports.imp21353 : A; } +^ +fail_compilation/test21353.d(42): Error: undefined identifier `P` in module `imports.imp21353` + imports.imp21353.P(); + ^ +fail_compilation/test21353.d(43): Error: undefined identifier `P` in module `imports.imp21353` + with (imports.imp21353) { P(); } // fixed + ^ --- */ diff --git a/compiler/test/fail_compilation/test21380.d b/compiler/test/fail_compilation/test21380.d index 6a2da1b2132b..7c24fe958690 100644 --- a/compiler/test/fail_compilation/test21380.d +++ b/compiler/test/fail_compilation/test21380.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test21380.d(39): Error: partial template instance `MySerializer().serializeSinkType!int` has no value -fail_compilation/test21380.d(44): Error: template instance `test21380.SupportSinkTypeSer!(MySerializer!int)` error instantiating +fail_compilation/test21380.d(43): Error: partial template instance `MySerializer().serializeSinkType!int` has no value + enum SupportSinkTypeSer = isSomeFunction!(SerT.init.serializeSinkType!int); + ^ +fail_compilation/test21380.d(48): Error: template instance `test21380.SupportSinkTypeSer!(MySerializer!int)` error instantiating + enum x = SupportSinkTypeSer!(MySerializer!int); + ^ --- */ diff --git a/compiler/test/fail_compilation/test21443.d b/compiler/test/fail_compilation/test21443.d index 2d99524da352..44f615890247 100644 --- a/compiler/test/fail_compilation/test21443.d +++ b/compiler/test/fail_compilation/test21443.d @@ -4,8 +4,10 @@ /* TEST_OUTPUT: --- -fail_compilation/test21443.d(14): Deprecation: `return` statements cannot be in `scope(failure)` bodies. -fail_compilation/test21443.d(14): Use try-catch blocks for this purpose +fail_compilation/test21443.d(16): Deprecation: `return` statements cannot be in `scope(failure)` bodies. + scope (failure) return 10; + ^ +fail_compilation/test21443.d(16): Use try-catch blocks for this purpose --- */ diff --git a/compiler/test/fail_compilation/test21518.d b/compiler/test/fail_compilation/test21518.d index 59a9c3cb8824..e696afdc4f72 100644 --- a/compiler/test/fail_compilation/test21518.d +++ b/compiler/test/fail_compilation/test21518.d @@ -2,11 +2,21 @@ https://issues.dlang.org/show_bug.cgi?id=21518 TEST_OUTPUT: --- -fail_compilation/test21518.d(19): Error: cannot implicitly convert expression `[dg]` of type `const(void delegate() pure nothrow @nogc @system)[]` to `void delegate() @safe[]` -fail_compilation/test21518.d(23): Error: cannot implicitly convert expression `[dg]` of type `const(void delegate() pure nothrow @nogc @system)[]` to `const(void delegate() @safe)[]` -fail_compilation/test21518.d(28): Error: cannot implicitly convert expression `sysA` of type `const(void delegate() @system)[]` to `const(void delegate() @safe)[]` -fail_compilation/test21518.d(31): Error: cannot implicitly convert expression `sysA` of type `const(void delegate() @system)[]` to `const(void delegate() @safe)` -fail_compilation/test21518.d(32): Error: cannot implicitly convert expression `dg` of type `const(void delegate() pure nothrow @nogc @system)` to `const(void delegate() @safe)` +fail_compilation/test21518.d(29): Error: cannot implicitly convert expression `[dg]` of type `const(void delegate() pure nothrow @nogc @system)[]` to `void delegate() @safe[]` + void delegate() @safe[] arg2 = [ dg ]; + ^ +fail_compilation/test21518.d(33): Error: cannot implicitly convert expression `[dg]` of type `const(void delegate() pure nothrow @nogc @system)[]` to `const(void delegate() @safe)[]` + const(void delegate() @safe)[] arg = [ dg ]; + ^ +fail_compilation/test21518.d(38): Error: cannot implicitly convert expression `sysA` of type `const(void delegate() @system)[]` to `const(void delegate() @safe)[]` + const(void delegate() @safe)[] safeA = sysA; + ^ +fail_compilation/test21518.d(41): Error: cannot implicitly convert expression `sysA` of type `const(void delegate() @system)[]` to `const(void delegate() @safe)` + func(sysA); + ^ +fail_compilation/test21518.d(42): Error: cannot implicitly convert expression `dg` of type `const(void delegate() pure nothrow @nogc @system)` to `const(void delegate() @safe)` + func(dg); + ^ --- */ diff --git a/compiler/test/fail_compilation/test21651.d b/compiler/test/fail_compilation/test21651.d index a4d959f4626f..13a2fd43787c 100644 --- a/compiler/test/fail_compilation/test21651.d +++ b/compiler/test/fail_compilation/test21651.d @@ -2,7 +2,9 @@ // EXTRA_SOURCES: imports/test21651b.d /* TEST_OUTPUT: --- -fail_compilation/test21651.d(11): Deprecation: module imports.test21651b is not accessible here, perhaps add 'static import imports.test21651b;' +fail_compilation/test21651.d(13): Deprecation: module imports.test21651b is not accessible here, perhaps add 'static import imports.test21651b;' +imports.test21651b.T a; + ^ --- */ diff --git a/compiler/test/fail_compilation/test21665.d b/compiler/test/fail_compilation/test21665.d index b4c28116e340..c30ba0ba8435 100644 --- a/compiler/test/fail_compilation/test21665.d +++ b/compiler/test/fail_compilation/test21665.d @@ -1,7 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/test21665.d(18): Error: `void` initializers for structs with invariants are not allowed in safe functions -fail_compilation/test21665.d(30): Error: field `U.s` cannot access structs with invariants in `@safe` code that overlap other fields +fail_compilation/test21665.d(22): Error: `void` initializers for structs with invariants are not allowed in safe functions + ShortString s = void; + ^ +fail_compilation/test21665.d(34): Error: field `U.s` cannot access structs with invariants in `@safe` code that overlap other fields + u.s.length = 3; + ^ --- */ diff --git a/compiler/test/fail_compilation/test21912.d b/compiler/test/fail_compilation/test21912.d index f8bcb40b5dfb..43e38f497218 100644 --- a/compiler/test/fail_compilation/test21912.d +++ b/compiler/test/fail_compilation/test21912.d @@ -2,18 +2,42 @@ PERMUTE_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test21912.d(28): Error: function `test21912.escapeParam` is `@nogc` yet allocates closure for `escapeParam()` with the GC -fail_compilation/test21912.d(30): delegate `test21912.escapeParam.__lambda2` closes over variable `i` -fail_compilation/test21912.d(28): `i` declared here -fail_compilation/test21912.d(33): Error: function `test21912.escapeAssign` is `@nogc` yet allocates closure for `escapeAssign()` with the GC -fail_compilation/test21912.d(35): delegate `test21912.escapeAssign.__lambda3` closes over variable `i` -fail_compilation/test21912.d(33): `i` declared here -fail_compilation/test21912.d(44): Error: function `test21912.escapeAssignRef` is `@nogc` yet allocates closure for `escapeAssignRef()` with the GC -fail_compilation/test21912.d(46): delegate `test21912.escapeAssignRef.__lambda3` closes over variable `i` -fail_compilation/test21912.d(44): `i` declared here -fail_compilation/test21912.d(55): Error: function `test21912.escapeParamInferred` is `@nogc` yet allocates closure for `escapeParamInferred()` with the GC -fail_compilation/test21912.d(57): delegate `test21912.escapeParamInferred.__lambda2` closes over variable `i` -fail_compilation/test21912.d(55): `i` declared here +fail_compilation/test21912.d(52): Error: function `test21912.escapeParam` is `@nogc` yet allocates closure for `escapeParam()` with the GC +Dg escapeParam(int i) + ^ +fail_compilation/test21912.d(54): delegate `test21912.escapeParam.__lambda2` closes over variable `i` + return identity(() => i); + ^ +fail_compilation/test21912.d(52): `i` declared here +Dg escapeParam(int i) + ^ +fail_compilation/test21912.d(57): Error: function `test21912.escapeAssign` is `@nogc` yet allocates closure for `escapeAssign()` with the GC +Dg escapeAssign(int i, return scope Dg dg) + ^ +fail_compilation/test21912.d(59): delegate `test21912.escapeAssign.__lambda3` closes over variable `i` + dg = () => i; + ^ +fail_compilation/test21912.d(57): `i` declared here +Dg escapeAssign(int i, return scope Dg dg) + ^ +fail_compilation/test21912.d(68): Error: function `test21912.escapeAssignRef` is `@nogc` yet allocates closure for `escapeAssignRef()` with the GC +ref Dg escapeAssignRef(int i, return ref scope Dg dg) + ^ +fail_compilation/test21912.d(70): delegate `test21912.escapeAssignRef.__lambda3` closes over variable `i` + dg = () => i; + ^ +fail_compilation/test21912.d(68): `i` declared here +ref Dg escapeAssignRef(int i, return ref scope Dg dg) + ^ +fail_compilation/test21912.d(79): Error: function `test21912.escapeParamInferred` is `@nogc` yet allocates closure for `escapeParamInferred()` with the GC +Dg escapeParamInferred(int i) + ^ +fail_compilation/test21912.d(81): delegate `test21912.escapeParamInferred.__lambda2` closes over variable `i` + return identityInferred(() => i); + ^ +fail_compilation/test21912.d(79): `i` declared here +Dg escapeParamInferred(int i) + ^ --- */ @nogc: diff --git a/compiler/test/fail_compilation/test21927.d b/compiler/test/fail_compilation/test21927.d index 479140979ec3..09c54c1052f3 100644 --- a/compiler/test/fail_compilation/test21927.d +++ b/compiler/test/fail_compilation/test21927.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test21927.d(17): Error: invalid `foreach` aggregate `this.T2(Args2...)` of type `void` -fail_compilation/test21927.d(18): Error: invalid `foreach` aggregate `this.T2!()` of type `void` +fail_compilation/test21927.d(21): Error: invalid `foreach` aggregate `this.T2(Args2...)` of type `void` + static foreach (p; this.T2) {} // ICE + ^ +fail_compilation/test21927.d(22): Error: invalid `foreach` aggregate `this.T2!()` of type `void` + static foreach (p; this.T2!()) {} // ICE + ^ --- */ diff --git a/compiler/test/fail_compilation/test21930.d b/compiler/test/fail_compilation/test21930.d index 6c932435b010..4981c92b3a5e 100644 --- a/compiler/test/fail_compilation/test21930.d +++ b/compiler/test/fail_compilation/test21930.d @@ -2,9 +2,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test21930.d(21): Error: variable `string` is used as a type -fail_compilation/test21930.d(15): variable `string` is declared here -fail_compilation/test21930.d(26): Error: constructor `test21930.R.this(string)` is not callable using argument types `()` +fail_compilation/test21930.d(27): Error: variable `string` is used as a type + this(string) { } // so constructor have errors + ^ +fail_compilation/test21930.d(21): variable `string` is declared here +int string; // 'string' declared as a variable + ^ +fail_compilation/test21930.d(32): Error: constructor `test21930.R.this(string)` is not callable using argument types `()` + new R; + ^ --- */ diff --git a/compiler/test/fail_compilation/test21939.d b/compiler/test/fail_compilation/test21939.d index e513dc248c64..1090090fbb6b 100644 --- a/compiler/test/fail_compilation/test21939.d +++ b/compiler/test/fail_compilation/test21939.d @@ -2,9 +2,11 @@ /* TEST_OUTPUT: --- -fail_compilation/test21939.d(11): Error: invalid `foreach` aggregate `Object` of type `Object` -fail_compilation/test21939.d(11): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property -fail_compilation/test21939.d(11): https://dlang.org/phobos/std_range_primitives.html#isInputRange +fail_compilation/test21939.d(13): Error: invalid `foreach` aggregate `Object` of type `Object` +static foreach (a; Object) {} + ^ +fail_compilation/test21939.d(13): `foreach` works with input ranges (implementing `front` and `popFront`), aggregates implementing `opApply`, or the result of an aggregate's `.tupleof` property +fail_compilation/test21939.d(13): https://dlang.org/phobos/std_range_primitives.html#isInputRange --- */ diff --git a/compiler/test/fail_compilation/test21995.d b/compiler/test/fail_compilation/test21995.d index a1e0b8319194..070349670404 100644 --- a/compiler/test/fail_compilation/test21995.d +++ b/compiler/test/fail_compilation/test21995.d @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test21995.d(10): Error: max object size 4294967295 exceeded from adding field size 3 + alignment adjustment 1 + field offset 4294967292 when placing field in aggregate +fail_compilation/test21995.d(12): Error: max object size 4294967295 exceeded from adding field size 3 + alignment adjustment 1 + field offset 4294967292 when placing field in aggregate + ubyte[3] c; + ^ --- */ struct S diff --git a/compiler/test/fail_compilation/test22048.d b/compiler/test/fail_compilation/test22048.d index 72b91546a2b7..0ab37a2bf348 100644 --- a/compiler/test/fail_compilation/test22048.d +++ b/compiler/test/fail_compilation/test22048.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test22048.d(10): Error: unexpected identifier `p` after `int` +fail_compilation/test22048.d(12): Error: unexpected identifier `p` after `int` +alias a = int p; + ^ --- */ diff --git a/compiler/test/fail_compilation/test22070.c b/compiler/test/fail_compilation/test22070.c index 0aa32b23287d..59a0e5c1404c 100644 --- a/compiler/test/fail_compilation/test22070.c +++ b/compiler/test/fail_compilation/test22070.c @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test22070.c(10): Error: cannot take address of expression `&""` because it is not an lvalue +fail_compilation/test22070.c(12): Error: cannot take address of expression `&""` because it is not an lvalue +char(**s1)[3] = &(&""); + ^ --- */ diff --git a/compiler/test/fail_compilation/test22227.d b/compiler/test/fail_compilation/test22227.d index ecffb692bef3..c370876dd893 100644 --- a/compiler/test/fail_compilation/test22227.d +++ b/compiler/test/fail_compilation/test22227.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test22227.d(12): Error: scope variable `foo` may not be returned -fail_compilation/test22227.d(14): Error: scope variable `foo` may not be returned +fail_compilation/test22227.d(16): Error: scope variable `foo` may not be returned + return foo; + ^ +fail_compilation/test22227.d(18): Error: scope variable `foo` may not be returned + return foo; + ^ --- */ diff --git a/compiler/test/fail_compilation/test22298.d b/compiler/test/fail_compilation/test22298.d index cdb1a3eb5083..243d7a3836cc 100644 --- a/compiler/test/fail_compilation/test22298.d +++ b/compiler/test/fail_compilation/test22298.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test22298.d(18): Error: scope variable `i` assigned to `p` with longer lifetime -fail_compilation/test22298.d(29): Error: scope variable `y` assigned to `x` with longer lifetime +fail_compilation/test22298.d(22): Error: scope variable `i` assigned to `p` with longer lifetime + p = i; + ^ +fail_compilation/test22298.d(33): Error: scope variable `y` assigned to `x` with longer lifetime + x = y; + ^ --- */ diff --git a/compiler/test/fail_compilation/test22329.d b/compiler/test/fail_compilation/test22329.d index 25c83f5142d6..301b4510b353 100644 --- a/compiler/test/fail_compilation/test22329.d +++ b/compiler/test/fail_compilation/test22329.d @@ -4,9 +4,17 @@ TEST_OUTPUT: --- fail_compilation/imports/imp22329.d(3): Error: no property `values` for type `test22329.Foo` -fail_compilation/test22329.d(13): struct `Foo` defined here + auto a = arg + 1; + ^ +fail_compilation/test22329.d(21): struct `Foo` defined here +public struct Foo { + ^ fail_compilation/imports/imp22329.d(3): Error: incompatible types for `(arg) + (1)`: `Foo` and `int` -fail_compilation/test22329.d(21): Error: template instance `imp22329.func!(Foo)` error instantiating + auto a = arg + 1; + ^ +fail_compilation/test22329.d(29): Error: template instance `imp22329.func!(Foo)` error instantiating + func(Foo()); + ^ --- */ diff --git a/compiler/test/fail_compilation/test22686.d b/compiler/test/fail_compilation/test22686.d index ee500bcce14a..a2f9c613a9de 100644 --- a/compiler/test/fail_compilation/test22686.d +++ b/compiler/test/fail_compilation/test22686.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test22686.d(15): Error: `this` is only defined in non-static member functions, not `create` +fail_compilation/test22686.d(17): Error: `this` is only defined in non-static member functions, not `create` + auto self = &this; + ^ --- */ diff --git a/compiler/test/fail_compilation/test22709.d b/compiler/test/fail_compilation/test22709.d index dd5258e0b376..e7c029cd2418 100644 --- a/compiler/test/fail_compilation/test22709.d +++ b/compiler/test/fail_compilation/test22709.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test22709.d(15): Error: address of variable `local` assigned to `arr` with longer lifetime -fail_compilation/test22709.d(20): Error: address of variable `local` assigned to `arr` with longer lifetime +fail_compilation/test22709.d(19): Error: address of variable `local` assigned to `arr` with longer lifetime + arr = local[]; + ^ +fail_compilation/test22709.d(24): Error: address of variable `local` assigned to `arr` with longer lifetime + arr = local[]; + ^ --- */ diff --git a/compiler/test/fail_compilation/test22765.d b/compiler/test/fail_compilation/test22765.d index 0d1b582d5176..e23923278663 100644 --- a/compiler/test/fail_compilation/test22765.d +++ b/compiler/test/fail_compilation/test22765.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test22765.d(14): Error: template instance `test22765.Template!null` internal compiler error: C++ `null` template value parameter is not supported +fail_compilation/test22765.d(16): Error: template instance `test22765.Template!null` internal compiler error: C++ `null` template value parameter is not supported +auto x = Template!(null); + ^ --- */ diff --git a/compiler/test/fail_compilation/test22840.d b/compiler/test/fail_compilation/test22840.d index f7be64afa785..04486f56fcc2 100644 --- a/compiler/test/fail_compilation/test22840.d +++ b/compiler/test/fail_compilation/test22840.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/test22840.d(25): Error: returning `sb.slice()` escapes a reference to local variable `sb` +fail_compilation/test22840.d(27): Error: returning `sb.slice()` escapes a reference to local variable `sb` + return sb.slice(); // should error + ^ --- */ diff --git a/compiler/test/fail_compilation/test22910.d b/compiler/test/fail_compilation/test22910.d index 581c693ccb0c..bf5ba159ff67 100644 --- a/compiler/test/fail_compilation/test22910.d +++ b/compiler/test/fail_compilation/test22910.d @@ -1,8 +1,12 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test22910.d(17): Error: returning `&this.val` escapes a reference to parameter `this` -fail_compilation/test22910.d(15): perhaps change the `return scope` into `scope return` +fail_compilation/test22910.d(21): Error: returning `&this.val` escapes a reference to parameter `this` + return &this.val; + ^ +fail_compilation/test22910.d(19): perhaps change the `return scope` into `scope return` + int* retScope() return scope + ^ --- */ @safe: diff --git a/compiler/test/fail_compilation/test22935.c b/compiler/test/fail_compilation/test22935.c index 1dda203b5bb1..1ded72a981a9 100644 --- a/compiler/test/fail_compilation/test22935.c +++ b/compiler/test/fail_compilation/test22935.c @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test22935.c(18): Error: array index 5 is out of bounds `[0..4]` +fail_compilation/test22935.c(20): Error: array index 5 is out of bounds `[0..4]` +int tmp2 = ((unsigned long)((char *)&((struct S *)0)->text[5] - (char *)0)); + ^ --- */ diff --git a/compiler/test/fail_compilation/test22977.d b/compiler/test/fail_compilation/test22977.d index 9478ec989d87..ab70d89f9823 100644 --- a/compiler/test/fail_compilation/test22977.d +++ b/compiler/test/fail_compilation/test22977.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test22977.d(16): Error: escaping local variable through nested function `scfunc` -fail_compilation/test22977.d(22): Error: escaping local variable through nested function `scfunc2` +fail_compilation/test22977.d(20): Error: escaping local variable through nested function `scfunc` + return scfunc(); + ^ +fail_compilation/test22977.d(26): Error: escaping local variable through nested function `scfunc2` + return scfunc2(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test22999.d b/compiler/test/fail_compilation/test22999.d index 921ab6075c1d..1c722773cf09 100644 --- a/compiler/test/fail_compilation/test22999.d +++ b/compiler/test/fail_compilation/test22999.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test22999.d(17): Error: switch case fallthrough - use 'goto default;' if intended -fail_compilation/test22999.d(24): Error: switch case fallthrough - use 'goto case;' if intended +fail_compilation/test22999.d(21): Error: switch case fallthrough - use 'goto default;' if intended + default: assert(0); + ^ +fail_compilation/test22999.d(28): Error: switch case fallthrough - use 'goto case;' if intended + case 2, 3: i = 30; + ^ --- */ diff --git a/compiler/test/fail_compilation/test23017.d b/compiler/test/fail_compilation/test23017.d index 743789a6b522..a1ab4dbbf95b 100644 --- a/compiler/test/fail_compilation/test23017.d +++ b/compiler/test/fail_compilation/test23017.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test23017.d(16): Error: class `test23017.CppChildA` with C++ linkage cannot inherit from class `DClass` with D linkage +fail_compilation/test23017.d(18): Error: class `test23017.CppChildA` with C++ linkage cannot inherit from class `DClass` with D linkage +extern(C++) class CppChildA : DClass {} // error + ^ --- */ diff --git a/compiler/test/fail_compilation/test23022.d b/compiler/test/fail_compilation/test23022.d index db1f4a712c1d..c579993b67e6 100644 --- a/compiler/test/fail_compilation/test23022.d +++ b/compiler/test/fail_compilation/test23022.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test23022.d(14): Error: returning `p` escapes a reference to variadic parameter `p` +fail_compilation/test23022.d(16): Error: returning `p` escapes a reference to variadic parameter `p` + return p; + ^ --- */ diff --git a/compiler/test/fail_compilation/test23073.d b/compiler/test/fail_compilation/test23073.d index 39106ba572e3..9e71c22cd995 100644 --- a/compiler/test/fail_compilation/test23073.d +++ b/compiler/test/fail_compilation/test23073.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test23073.d(28): Error: scope variable `c` assigned to non-scope parameter `c` calling `assignNext` -fail_compilation/test23073.d(22): which is not `scope` because of `c.next = c` +fail_compilation/test23073.d(32): Error: scope variable `c` assigned to non-scope parameter `c` calling `assignNext` + assignNext(c); + ^ +fail_compilation/test23073.d(26): which is not `scope` because of `c.next = c` + c.next = c; + ^ --- */ diff --git a/compiler/test/fail_compilation/test23159.d b/compiler/test/fail_compilation/test23159.d index cdafc613b59d..0c72f1bc35b6 100644 --- a/compiler/test/fail_compilation/test23159.d +++ b/compiler/test/fail_compilation/test23159.d @@ -4,8 +4,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test23159.d(14): Error: `scope(failure)` cannot be used with -betterC -fail_compilation/test23159.d(18): Error: `scope(success)` cannot be used with -betterC +fail_compilation/test23159.d(18): Error: `scope(failure)` cannot be used with -betterC + scope(failure) + ^ +fail_compilation/test23159.d(22): Error: `scope(success)` cannot be used with -betterC + scope(success) + ^ --- */ diff --git a/compiler/test/fail_compilation/test23170.d b/compiler/test/fail_compilation/test23170.d index eb79cd81565e..74080071f4ed 100644 --- a/compiler/test/fail_compilation/test23170.d +++ b/compiler/test/fail_compilation/test23170.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test23170.d(10): Error: array literal in `@nogc` delegate `test23170.__lambda5` may cause a GC allocation +fail_compilation/test23170.d(12): Error: array literal in `@nogc` delegate `test23170.__lambda5` may cause a GC allocation +enum lambda = () => badAlias([1, 2, 3]); + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=23170 diff --git a/compiler/test/fail_compilation/test23216.d b/compiler/test/fail_compilation/test23216.d index d7c12ed3207d..41e9019d014c 100644 --- a/compiler/test/fail_compilation/test23216.d +++ b/compiler/test/fail_compilation/test23216.d @@ -1,9 +1,11 @@ /* TEST_OUTPUT: --- -fail_compilation/test23216.d(23): Error: invalid `foreach_reverse` aggregate `r` of type `Range` -fail_compilation/test23216.d(23): `foreach_reverse` works with bidirectional ranges (implementing `back` and `popBack`), aggregates implementing `opApplyReverse`, or the result of an aggregate's `.tupleof` property -fail_compilation/test23216.d(23): https://dlang.org/phobos/std_range_primitives.html#isBidirectionalRange +fail_compilation/test23216.d(25): Error: invalid `foreach_reverse` aggregate `r` of type `Range` + foreach_reverse (word; r) { } + ^ +fail_compilation/test23216.d(25): `foreach_reverse` works with bidirectional ranges (implementing `back` and `popBack`), aggregates implementing `opApplyReverse`, or the result of an aggregate's `.tupleof` property +fail_compilation/test23216.d(25): https://dlang.org/phobos/std_range_primitives.html#isBidirectionalRange --- */ diff --git a/compiler/test/fail_compilation/test23279.d b/compiler/test/fail_compilation/test23279.d index 43f2d44a071f..ddb6d53cc7ae 100644 --- a/compiler/test/fail_compilation/test23279.d +++ b/compiler/test/fail_compilation/test23279.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test23279.d(13): Error: undefined identifier `Sth` +fail_compilation/test23279.d(15): Error: undefined identifier `Sth` + void setIt(Sth sth){} + ^ --- */ diff --git a/compiler/test/fail_compilation/test23491.d b/compiler/test/fail_compilation/test23491.d index b66d8a860d0e..2772d2825169 100644 --- a/compiler/test/fail_compilation/test23491.d +++ b/compiler/test/fail_compilation/test23491.d @@ -2,9 +2,15 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test23491.d(16): Error: reference to local variable `buffer` assigned to non-scope anonymous parameter -fail_compilation/test23491.d(17): Error: reference to local variable `buffer` assigned to non-scope anonymous parameter calling `sinkF` -fail_compilation/test23491.d(18): Error: reference to local variable `buffer` assigned to non-scope parameter `buf` +fail_compilation/test23491.d(22): Error: reference to local variable `buffer` assigned to non-scope anonymous parameter + sink(buffer[]); + ^ +fail_compilation/test23491.d(23): Error: reference to local variable `buffer` assigned to non-scope anonymous parameter calling `sinkF` + sinkF(buffer[]); + ^ +fail_compilation/test23491.d(24): Error: reference to local variable `buffer` assigned to non-scope parameter `buf` + sinkNamed(buffer[]); + ^ --- */ diff --git a/compiler/test/fail_compilation/test23552.d b/compiler/test/fail_compilation/test23552.d index bf9e3a663992..49ffcabe6fb2 100644 --- a/compiler/test/fail_compilation/test23552.d +++ b/compiler/test/fail_compilation/test23552.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test23552.d(17): Error: cannot implicitly override base class method `test23552.Base.foo` with `test23552.Derived.foo`; add `override` attribute +fail_compilation/test23552.d(19): Error: cannot implicitly override base class method `test23552.Base.foo` with `test23552.Derived.foo`; add `override` attribute + void foo() { } + ^ --- */ diff --git a/compiler/test/fail_compilation/test23607.d b/compiler/test/fail_compilation/test23607.d index 69b6f39ad779..a9669e060351 100644 --- a/compiler/test/fail_compilation/test23607.d +++ b/compiler/test/fail_compilation/test23607.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test23607.d(15): Error: template `to(T)()` does not have property `bad` -fail_compilation/test23607.d(16): Error: template `to(T)()` does not have property `bad` +fail_compilation/test23607.d(19): Error: template `to(T)()` does not have property `bad` +alias comb = to!int.bad!0; + ^ +fail_compilation/test23607.d(20): Error: template `to(T)()` does not have property `bad` +auto combe = to!int.bad!0; + ^ --- */ diff --git a/compiler/test/fail_compilation/test23674.d b/compiler/test/fail_compilation/test23674.d index 0f11de94d9da..433dd113e920 100644 --- a/compiler/test/fail_compilation/test23674.d +++ b/compiler/test/fail_compilation/test23674.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test23674.d(14): Error: array index 2 is out of bounds `arr[0 .. 2]` -fail_compilation/test23674.d(14): Error: array index 3 is out of bounds `arr[0 .. 2]` +fail_compilation/test23674.d(18): Error: array index 2 is out of bounds `arr[0 .. 2]` + assert(arr[2] == arr[3]); + ^ +fail_compilation/test23674.d(18): Error: array index 3 is out of bounds `arr[0 .. 2]` + assert(arr[2] == arr[3]); + ^ --- */ diff --git a/compiler/test/fail_compilation/test23715.i b/compiler/test/fail_compilation/test23715.i index 5a1a8047ea34..b3e8596065e8 100644 --- a/compiler/test/fail_compilation/test23715.i +++ b/compiler/test/fail_compilation/test23715.i @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test23715.i(11): Error: `_Thread_local` in block scope must be accompanied with `static` or `extern` +fail_compilation/test23715.i(13): Error: `_Thread_local` in block scope must be accompanied with `static` or `extern` + _Thread_local int tli; + ^ --- */ diff --git a/compiler/test/fail_compilation/test23719.c b/compiler/test/fail_compilation/test23719.c index f8675e750b9a..fe299561b3f0 100644 --- a/compiler/test/fail_compilation/test23719.c +++ b/compiler/test/fail_compilation/test23719.c @@ -1,6 +1,8 @@ /* TEST_OUTPUT: --- -fail_compilation/test23719.c(15): Error: since `abc` is a pointer, use `abc->b` instead of `abc.b` +fail_compilation/test23719.c(17): Error: since `abc` is a pointer, use `abc->b` instead of `abc.b` + int j = abc.b; + ^ --- */ diff --git a/compiler/test/fail_compilation/test23786.d b/compiler/test/fail_compilation/test23786.d index 11fe5d4cc178..3f376b66601d 100644 --- a/compiler/test/fail_compilation/test23786.d +++ b/compiler/test/fail_compilation/test23786.d @@ -1,14 +1,26 @@ /* TEST_OUTPUT: --- -fail_compilation/test23786.d(22): Error: function `foo` is not callable using argument types `(double)` -fail_compilation/test23786.d(22): cannot pass argument `1.0` of type `double` to parameter `int i` -fail_compilation/test23786.d(19): `test23786.foo(int i)` declared here -fail_compilation/test23786.d(29): Error: function `bar` is not callable using argument types `(int*)` -fail_compilation/test23786.d(29): cannot pass argument `& i` of type `int*` to parameter `int i` -fail_compilation/test23786.d(26): `test23786.bar(int i)` declared here -fail_compilation/test23786.d(37): Error: function `baz` is not callable using argument types `(int*)` -fail_compilation/test23786.d(37): cannot pass argument `& i` of type `int*` to parameter `int i` -fail_compilation/test23786.d(34): `test23786.baz(int i)` declared here +fail_compilation/test23786.d(34): Error: function `foo` is not callable using argument types `(double)` + __traits(parent, {})(1.0); + ^ +fail_compilation/test23786.d(34): cannot pass argument `1.0` of type `double` to parameter `int i` +fail_compilation/test23786.d(31): `test23786.foo(int i)` declared here +void foo(int i) + ^ +fail_compilation/test23786.d(41): Error: function `bar` is not callable using argument types `(int*)` + __traits(parent, {})(&i); + ^ +fail_compilation/test23786.d(41): cannot pass argument `& i` of type `int*` to parameter `int i` +fail_compilation/test23786.d(38): `test23786.bar(int i)` declared here +void bar(int i) + ^ +fail_compilation/test23786.d(49): Error: function `baz` is not callable using argument types `(int*)` + __traits(parent, {})(&i); + ^ +fail_compilation/test23786.d(49): cannot pass argument `& i` of type `int*` to parameter `int i` +fail_compilation/test23786.d(46): `test23786.baz(int i)` declared here +void baz(int i) + ^ --- */ diff --git a/compiler/test/fail_compilation/test23875.c b/compiler/test/fail_compilation/test23875.c index e54f62ea46ea..11083089cc42 100644 --- a/compiler/test/fail_compilation/test23875.c +++ b/compiler/test/fail_compilation/test23875.c @@ -1,8 +1,12 @@ /* DISABLED: win32 linux32 TEST_OUTPUT: --- -fail_compilation/test23875.c(12): Error: __attribute__((vector_size(10))) must be an integer positive power of 2 and be <= 32,768 -fail_compilation/test23875.c(13): Error: value for vector_size expected, not `x` +fail_compilation/test23875.c(16): Error: __attribute__((vector_size(10))) must be an integer positive power of 2 and be <= 32,768 +int __attribute__((vector_size(10))) neptune(); + ^ +fail_compilation/test23875.c(17): Error: value for vector_size expected, not `x` +int __attribute__((vector_size(x))) saturn(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test23882.d b/compiler/test/fail_compilation/test23882.d index f6b57c4ea04b..191a4c8e3dd0 100644 --- a/compiler/test/fail_compilation/test23882.d +++ b/compiler/test/fail_compilation/test23882.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test23882.d(26): Error: `typeof((*YC).S).init` is used as a type +fail_compilation/test23882.d(28): Error: `typeof((*YC).S).init` is used as a type + this(typeof(CB.S).init); + ^ --- */ diff --git a/compiler/test/fail_compilation/test23905.d b/compiler/test/fail_compilation/test23905.d index 5b30fa855e21..149db68f5471 100644 --- a/compiler/test/fail_compilation/test23905.d +++ b/compiler/test/fail_compilation/test23905.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test23905.d(24): Error: enum `test23905.Foo` is opaque and has no default initializer +fail_compilation/test23905.d(26): Error: enum `test23905.Foo` is opaque and has no default initializer + SumType!Foo data = Foo.init; + ^ --- */ diff --git a/compiler/test/fail_compilation/test23968.d b/compiler/test/fail_compilation/test23968.d index 4456e75c7075..0fbe04455823 100644 --- a/compiler/test/fail_compilation/test23968.d +++ b/compiler/test/fail_compilation/test23968.d @@ -5,7 +5,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test23968.d(22): Deprecation: alias `test23968.a` is deprecated +fail_compilation/test23968.d(24): Deprecation: alias `test23968.a` is deprecated + int y = v.a!(); // No deprecation? + ^ --- */ diff --git a/compiler/test/fail_compilation/test23982.d b/compiler/test/fail_compilation/test23982.d index f8eee238ed85..5e27bb5a219d 100644 --- a/compiler/test/fail_compilation/test23982.d +++ b/compiler/test/fail_compilation/test23982.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test23982.d(35): Error: scope variable `a` assigned to non-scope parameter `a` calling `foo2` -fail_compilation/test23982.d(26): which is not `scope` because of `b = a` +fail_compilation/test23982.d(39): Error: scope variable `a` assigned to non-scope parameter `a` calling `foo2` + c.foo2(a); + ^ +fail_compilation/test23982.d(30): which is not `scope` because of `b = a` + auto b = B!()(a); + ^ --- */ // https://issues.dlang.org/show_bug.cgi?id=23982 diff --git a/compiler/test/fail_compilation/test24015.d b/compiler/test/fail_compilation/test24015.d index c9bc42e055e1..2f4818540836 100644 --- a/compiler/test/fail_compilation/test24015.d +++ b/compiler/test/fail_compilation/test24015.d @@ -1,7 +1,9 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/test24015.d(19): Error: scope variable `v` assigned to non-scope parameter `...` calling `jer` +fail_compilation/test24015.d(21): Error: scope variable `v` assigned to non-scope parameter `...` calling `jer` + jer(3, v); + ^ --- */ diff --git a/compiler/test/fail_compilation/test24036.d b/compiler/test/fail_compilation/test24036.d index da529f90ee9a..090d0227ee2a 100644 --- a/compiler/test/fail_compilation/test24036.d +++ b/compiler/test/fail_compilation/test24036.d @@ -4,8 +4,12 @@ Issue 24036 - assert message in CTFE becomes `['m', 'e', 's', 's', 'a', 'g', 'e' TEST_OUTPUT: --- -fail_compilation/test24036.d(19): Error: message -fail_compilation/test24036.d(21): called from here: `(*function () pure nothrow @safe => 42)()` +fail_compilation/test24036.d(23): Error: message + assert(0, format()); + ^ +fail_compilation/test24036.d(25): called from here: `(*function () pure nothrow @safe => 42)()` +}(); + ^ --- */ diff --git a/compiler/test/fail_compilation/test24065.d b/compiler/test/fail_compilation/test24065.d index 9e4ebbf4d163..04838ea44923 100644 --- a/compiler/test/fail_compilation/test24065.d +++ b/compiler/test/fail_compilation/test24065.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test24065.d(12): Error: string expected as argument of __traits `getTargetInfo` instead of `int` -fail_compilation/test24065.d(15): Error: string expected as argument of __traits `getTargetInfo` instead of `foo` -fail_compilation/test24065.d(18): Error: string expected as argument of __traits `getTargetInfo` instead of `e` +fail_compilation/test24065.d(18): Error: string expected as argument of __traits `getTargetInfo` instead of `int` +auto s1 = __traits(getTargetInfo, int); + ^ +fail_compilation/test24065.d(21): Error: string expected as argument of __traits `getTargetInfo` instead of `foo` +auto s2 = __traits(getTargetInfo, foo); + ^ +fail_compilation/test24065.d(24): Error: string expected as argument of __traits `getTargetInfo` instead of `e` +auto s3 = __traits(getTargetInfo, e); + ^ --- */ diff --git a/compiler/test/fail_compilation/test24110.d b/compiler/test/fail_compilation/test24110.d index acf7788c6e0d..e0116cd64ed7 100644 --- a/compiler/test/fail_compilation/test24110.d +++ b/compiler/test/fail_compilation/test24110.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test24110.d(12): Error: static assert: `__traits(compiles, __error)` is false +fail_compilation/test24110.d(14): Error: static assert: `__traits(compiles, __error)` is false +static assert(__traits(compiles, (T[] a, T[] b) => a < b)); +^ --- */ diff --git a/compiler/test/fail_compilation/test24157.d b/compiler/test/fail_compilation/test24157.d index d78c9b628ef1..e3fd3ccb6b61 100644 --- a/compiler/test/fail_compilation/test24157.d +++ b/compiler/test/fail_compilation/test24157.d @@ -3,8 +3,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test24157.d(23): Error: cannot take address of expression `p.self()` because it is not an lvalue -fail_compilation/test24157.d(27): Error: cannot take address of expression `p.unshared()` because it is not an lvalue +fail_compilation/test24157.d(27): Error: cannot take address of expression `p.self()` because it is not an lvalue + auto ptr = &p.self(); // must not return a ref to the Promise class ref + ^ +fail_compilation/test24157.d(31): Error: cannot take address of expression `p.unshared()` because it is not an lvalue + auto ptr = &p.unshared(); // ditto + ^ --- */ diff --git a/compiler/test/fail_compilation/test24159.d b/compiler/test/fail_compilation/test24159.d index 35c7f364168b..418678d93367 100644 --- a/compiler/test/fail_compilation/test24159.d +++ b/compiler/test/fail_compilation/test24159.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test24159.d(13): Error: appending to array in `x ~= 3` requires the GC which is not available with -betterC +fail_compilation/test24159.d(15): Error: appending to array in `x ~= 3` requires the GC which is not available with -betterC + x ~= 3; + ^ --- */ diff --git a/compiler/test/fail_compilation/test24353.d b/compiler/test/fail_compilation/test24353.d index 76174aee62dd..c6f8480f4f15 100644 --- a/compiler/test/fail_compilation/test24353.d +++ b/compiler/test/fail_compilation/test24353.d @@ -3,8 +3,12 @@ /** TEST_OUTPUT: --- -fail_compilation/test24353.d(23): Error: mutable method `test24353.S.opApply` is not callable using a `const` object -fail_compilation/test24353.d(14): Consider adding `const` or `inout` here +fail_compilation/test24353.d(27): Error: mutable method `test24353.S.opApply` is not callable using a `const` object + foreach (e; s) {} // Error expected here + ^ +fail_compilation/test24353.d(18): Consider adding `const` or `inout` here + int opApply(int delegate(int) dg) + ^ --- */ diff --git a/compiler/test/fail_compilation/test24365.d b/compiler/test/fail_compilation/test24365.d index 9ec1e2ac3a97..8ebf46d8b7e8 100644 --- a/compiler/test/fail_compilation/test24365.d +++ b/compiler/test/fail_compilation/test24365.d @@ -3,9 +3,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test24365.d(16): Error: `f` cannot be interpreted at compile time, because it has no available source code -fail_compilation/test24365.d(14): compile time context created here -fail_compilation/test24365.d(19): while evaluating: `static assert(r == 2)` +fail_compilation/test24365.d(22): Error: `f` cannot be interpreted at compile time, because it has no available source code + f(); + ^ +fail_compilation/test24365.d(20): compile time context created here + enum r = () { + ^ +fail_compilation/test24365.d(25): while evaluating: `static assert(r == 2)` + static assert(r == 2); + ^ --- */ diff --git a/compiler/test/fail_compilation/test24680.d b/compiler/test/fail_compilation/test24680.d index 50efba41344e..4ef55d2a97bd 100644 --- a/compiler/test/fail_compilation/test24680.d +++ b/compiler/test/fail_compilation/test24680.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test24680.d(19): Error: returning `c.peek(buf[])` escapes a reference to local variable `buf` +fail_compilation/test24680.d(21): Error: returning `c.peek(buf[])` escapes a reference to local variable `buf` + return c.peek(buf[]); + ^ --- */ diff --git a/compiler/test/fail_compilation/test24694.d b/compiler/test/fail_compilation/test24694.d index cec9635dbf19..91e4e2232812 100644 --- a/compiler/test/fail_compilation/test24694.d +++ b/compiler/test/fail_compilation/test24694.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test24694.d(25): Error: reference to local variable `x` assigned to non-scope `b.c.p` +fail_compilation/test24694.d(27): Error: reference to local variable `x` assigned to non-scope `b.c.p` + b.c.p = &x; + ^ --- */ diff --git a/compiler/test/fail_compilation/test24745.d b/compiler/test/fail_compilation/test24745.d index 6d9c335bb4af..6cb2d93e47a8 100644 --- a/compiler/test/fail_compilation/test24745.d +++ b/compiler/test/fail_compilation/test24745.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test24745.d(12): Error: incorrect syntax for associative array, expected `[]`, found `{}` +fail_compilation/test24745.d(14): Error: incorrect syntax for associative array, expected `[]`, found `{}` + int[int] f = {1: 1, 2: 2}; + ^ --- */ diff --git a/compiler/test/fail_compilation/test314.d b/compiler/test/fail_compilation/test314.d index 26de73731459..f09969be4189 100644 --- a/compiler/test/fail_compilation/test314.d +++ b/compiler/test/fail_compilation/test314.d @@ -2,10 +2,18 @@ EXTRA_FILES: imports/a314.d imports/b314.d imports/c314.d TEST_OUTPUT: --- -fail_compilation/test314.d(19): Error: undefined identifier `renamed` -fail_compilation/test314.d(20): Error: undefined identifier `bug` -fail_compilation/test314.d(22): Error: undefined identifier `renamedpkg` -fail_compilation/test314.d(23): Error: undefined identifier `bugpkg` +fail_compilation/test314.d(27): Error: undefined identifier `renamed` + renamed.bug("This should not work.\n"); + ^ +fail_compilation/test314.d(28): Error: undefined identifier `bug` + bug("This should not work.\n"); + ^ +fail_compilation/test314.d(30): Error: undefined identifier `renamedpkg` + renamedpkg.bug("This should not work.\n"); + ^ +fail_compilation/test314.d(31): Error: undefined identifier `bugpkg` + bugpkg("This should not work.\n"); + ^ --- */ diff --git a/compiler/test/fail_compilation/test4682.d b/compiler/test/fail_compilation/test4682.d index 18d2108957f1..1160a4b5269e 100644 --- a/compiler/test/fail_compilation/test4682.d +++ b/compiler/test/fail_compilation/test4682.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: ---- -fail_compilation/test4682.d(10): Error: integer overflow: `int.min / -1` -fail_compilation/test4682.d(11): Error: integer overflow: `long.min / -1L` -fail_compilation/test4682.d(12): Error: integer overflow: `int.min % -1` -fail_compilation/test4682.d(13): Error: integer overflow: `long.min % -1L` +fail_compilation/test4682.d(18): Error: integer overflow: `int.min / -1` +auto a = int.min / -1; + ^ +fail_compilation/test4682.d(19): Error: integer overflow: `long.min / -1L` +auto b = long.min / -1; + ^ +fail_compilation/test4682.d(20): Error: integer overflow: `int.min % -1` +auto c = int.min % -1; + ^ +fail_compilation/test4682.d(21): Error: integer overflow: `long.min % -1L` +auto d = long.min % -1; + ^ ---- */ auto a = int.min / -1; diff --git a/compiler/test/fail_compilation/test4682a.d b/compiler/test/fail_compilation/test4682a.d index 40446869bd9b..e9433290f7e5 100644 --- a/compiler/test/fail_compilation/test4682a.d +++ b/compiler/test/fail_compilation/test4682a.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: ---- -fail_compilation/test4682a.d(10): Error: divide by 0 -fail_compilation/test4682a.d(11): Error: divide by 0 -fail_compilation/test4682a.d(12): Error: divide by 0 -fail_compilation/test4682a.d(13): Error: divide by 0 +fail_compilation/test4682a.d(18): Error: divide by 0 +auto a = int.min / 0; + ^ +fail_compilation/test4682a.d(19): Error: divide by 0 +auto b = long.min / 0; + ^ +fail_compilation/test4682a.d(20): Error: divide by 0 +auto c = int.min % 0; + ^ +fail_compilation/test4682a.d(21): Error: divide by 0 +auto d = long.min % 0; + ^ ---- */ auto a = int.min / 0; diff --git a/compiler/test/fail_compilation/test4838.d b/compiler/test/fail_compilation/test4838.d index a135c79f6a06..981ceff3e3da 100644 --- a/compiler/test/fail_compilation/test4838.d +++ b/compiler/test/fail_compilation/test4838.d @@ -1,12 +1,24 @@ /* TEST_OUTPUT: --- -fail_compilation/test4838.d(13): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions -fail_compilation/test4838.d(14): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions -fail_compilation/test4838.d(15): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions -fail_compilation/test4838.d(16): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions -fail_compilation/test4838.d(17): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions -fail_compilation/test4838.d(18): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions +fail_compilation/test4838.d(25): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions +void function() const fpc; + ^ +fail_compilation/test4838.d(26): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions +void function() immutable fpi; + ^ +fail_compilation/test4838.d(27): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions +void function() shared fps; + ^ +fail_compilation/test4838.d(28): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions +void function() shared const fpsc; + ^ +fail_compilation/test4838.d(29): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions +void function() inout fpw; + ^ +fail_compilation/test4838.d(30): Error: `const`/`immutable`/`shared`/`inout`/`return` attributes are only valid for non-static member functions +void function() shared inout fpsw; + ^ --- */ diff --git a/compiler/test/fail_compilation/test4946.d b/compiler/test/fail_compilation/test4946.d index e19932b03715..676b402b4426 100644 --- a/compiler/test/fail_compilation/test4946.d +++ b/compiler/test/fail_compilation/test4946.d @@ -1,12 +1,26 @@ /* TEST_OUTPUT: --- -fail_compilation/test4946.d(13): Error: 'pure' cannot be placed after a template constraint -fail_compilation/test4946.d(14): Error: 'const' cannot be placed after a template constraint -fail_compilation/test4946.d(15): Error: 'immutable' cannot be placed after a template constraint -fail_compilation/test4946.d(16): Error: 'inout' cannot be placed after a template constraint -fail_compilation/test4946.d(17): Error: 'shared' cannot be placed after a template constraint -fail_compilation/test4946.d(18): Error: 'nothrow' cannot be placed after a template constraint -fail_compilation/test4946.d(19): Error: attributes cannot be placed after a template constraint +fail_compilation/test4946.d(27): Error: 'pure' cannot be placed after a template constraint +void bar1(int x)() if (x > 0) pure { int a;} + ^ +fail_compilation/test4946.d(28): Error: 'const' cannot be placed after a template constraint +void bar2(int x)() if (x > 0) const { int a;} + ^ +fail_compilation/test4946.d(29): Error: 'immutable' cannot be placed after a template constraint +void bar3(int x)() if (x > 0) immutable { int a;} + ^ +fail_compilation/test4946.d(30): Error: 'inout' cannot be placed after a template constraint +void bar4(int x)() if (x > 0) inout { int a;} + ^ +fail_compilation/test4946.d(31): Error: 'shared' cannot be placed after a template constraint +void bar5(int x)() if (x > 0) shared { int a;} + ^ +fail_compilation/test4946.d(32): Error: 'nothrow' cannot be placed after a template constraint +void bar6(int x)() if (x > 0) nothrow { int a;} + ^ +fail_compilation/test4946.d(33): Error: attributes cannot be placed after a template constraint +void bar7(int x)() if (x > 0) @safe { int a;} + ^ --- */ diff --git a/compiler/test/fail_compilation/test5412a.d b/compiler/test/fail_compilation/test5412a.d index 35778343cc90..a14ed607b49e 100644 --- a/compiler/test/fail_compilation/test5412a.d +++ b/compiler/test/fail_compilation/test5412a.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/test5412a.d imports/test5412b.d TEST_OUTPUT: --- -fail_compilation/test5412a.d(11): Error: import `test5412a.A` conflicts with import `test5412a.A` at fail_compilation/test5412a.d(10) +fail_compilation/test5412a.d(13): Error: import `test5412a.A` conflicts with import `test5412a.A` at fail_compilation/test5412a.d(12) +import A = imports.test5412b; + ^ --- */ module test5412a; diff --git a/compiler/test/fail_compilation/test5412b.d b/compiler/test/fail_compilation/test5412b.d index 8f06b52658cf..b88ad9b8bc7f 100644 --- a/compiler/test/fail_compilation/test5412b.d +++ b/compiler/test/fail_compilation/test5412b.d @@ -2,7 +2,9 @@ EXTRA_FILES: imports/test5412a.d imports/test5412b.d TEST_OUTPUT: --- -fail_compilation/test5412b.d(11): Error: static import `test5412b.A` conflicts with import `test5412b.A` at fail_compilation/test5412b.d(10) +fail_compilation/test5412b.d(13): Error: static import `test5412b.A` conflicts with import `test5412b.A` at fail_compilation/test5412b.d(12) +static import A = imports.test5412b; + ^ --- */ module test5412b; diff --git a/compiler/test/fail_compilation/test5412c.d b/compiler/test/fail_compilation/test5412c.d index b3073ee63a17..540dca6bffb5 100644 --- a/compiler/test/fail_compilation/test5412c.d +++ b/compiler/test/fail_compilation/test5412c.d @@ -2,7 +2,9 @@ EXTRA_FILES: test5412c2.di imports/test5412a.d TEST_OUTPUT: --- -fail_compilation/test5412c.d(11): Error: import `test5412c.test5412c2` conflicts with import `test5412c.test5412c2` at fail_compilation/test5412c.d(10) +fail_compilation/test5412c.d(13): Error: import `test5412c.test5412c2` conflicts with import `test5412c.test5412c2` at fail_compilation/test5412c.d(12) +import test5412c2; + ^ --- */ module test5412c; diff --git a/compiler/test/fail_compilation/test64.d b/compiler/test/fail_compilation/test64.d index 35f85a2faeb7..e400408a78f9 100644 --- a/compiler/test/fail_compilation/test64.d +++ b/compiler/test/fail_compilation/test64.d @@ -3,6 +3,8 @@ EXTRA_FILES: imports/test64a.d TEST_OUTPUT: --- fail_compilation/imports/test64a.d(1): Error: module `imports` from file fail_compilation/imports/test64a.d conflicts with package name imports +module imports; +^ --- */ diff --git a/compiler/test/fail_compilation/test6883.d b/compiler/test/fail_compilation/test6883.d index b379f1b6a629..64a986ad4792 100644 --- a/compiler/test/fail_compilation/test6883.d +++ b/compiler/test/fail_compilation/test6883.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/test6883.d(15): Error: array index 5 is out of bounds `x[0 .. 5]` -fail_compilation/test6883.d(17): Error: array index 7 is out of bounds `x[0 .. 5]` -fail_compilation/test6883.d(21): Error: array index 5 is out of bounds `x[0 .. 5]` -fail_compilation/test6883.d(23): Error: array index 7 is out of bounds `x[0 .. 5]` +fail_compilation/test6883.d(23): Error: array index 5 is out of bounds `x[0 .. 5]` + x[x.length] = 1; + ^ +fail_compilation/test6883.d(25): Error: array index 7 is out of bounds `x[0 .. 5]` + x[x.length + n] = 2; + ^ +fail_compilation/test6883.d(29): Error: array index 5 is out of bounds `x[0 .. 5]` + x[$] = 1; + ^ +fail_compilation/test6883.d(31): Error: array index 7 is out of bounds `x[0 .. 5]` + x[$ + n] = 2; + ^ --- */ diff --git a/compiler/test/fail_compilation/test8509.d b/compiler/test/fail_compilation/test8509.d index b39c00f964f7..e2041dcb8c61 100644 --- a/compiler/test/fail_compilation/test8509.d +++ b/compiler/test/fail_compilation/test8509.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test8509.d(13): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E` -fail_compilation/test8509.d(14): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E` +fail_compilation/test8509.d(17): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E` + E e1 = E.a ~ " world"; + ^ +fail_compilation/test8509.d(18): Error: cannot implicitly convert expression `"hello world"` of type `string` to `E` + E e2 = "hello " ~ E.b; + ^ --- */ module test8509; diff --git a/compiler/test/fail_compilation/test8556.d b/compiler/test/fail_compilation/test8556.d index 75c5c593eead..2004dd8d33a0 100644 --- a/compiler/test/fail_compilation/test8556.d +++ b/compiler/test/fail_compilation/test8556.d @@ -1,11 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/test8556.d(24): Error: template instance `test8556.Grab!(Circle!(uint[]))` does not match template declaration `Grab(Range)` +fail_compilation/test8556.d(28): Error: template instance `test8556.Grab!(Circle!(uint[]))` does not match template declaration `Grab(Range)` with `Range = Circle!(uint[])` must satisfy the following constraint: ` !isSliceable!Range` -fail_compilation/test8556.d(55): Error: template instance `test8556.grab!(Circle!(uint[]))` error instantiating +Grab!R grab(R)(R input) +^ +fail_compilation/test8556.d(59): Error: template instance `test8556.grab!(Circle!(uint[]))` error instantiating + auto t = grab(circle!(uint[])()); + ^ --- */ diff --git a/compiler/test/fail_compilation/test8662.d b/compiler/test/fail_compilation/test8662.d index 18fcf7e7c08c..2f56fae45241 100644 --- a/compiler/test/fail_compilation/test8662.d +++ b/compiler/test/fail_compilation/test8662.d @@ -1,14 +1,26 @@ /* TEST_OUTPUT: --- -fail_compilation/test8662.d(22): Error: label `Label` is already defined -fail_compilation/test8662.d(21): first definition is here -fail_compilation/test8662.d(25): Error: label `Label` is already defined -fail_compilation/test8662.d(21): first definition is here -fail_compilation/test8662.d(31): Error: label `Label2` is duplicated -fail_compilation/test8662.d(31): labels cannot be used in a static foreach with more than 1 iteration -fail_compilation/test8662.d(36): Error: label `Label3` is duplicated -fail_compilation/test8662.d(36): labels cannot be used in a static foreach with more than 1 iteration +fail_compilation/test8662.d(34): Error: label `Label` is already defined + Label: + ^ +fail_compilation/test8662.d(33): first definition is here + Label: + ^ +fail_compilation/test8662.d(37): Error: label `Label` is already defined + Label: + ^ +fail_compilation/test8662.d(33): first definition is here + Label: + ^ +fail_compilation/test8662.d(43): Error: label `Label2` is duplicated + Label2: + ^ +fail_compilation/test8662.d(43): labels cannot be used in a static foreach with more than 1 iteration +fail_compilation/test8662.d(48): Error: label `Label3` is duplicated + Label3: + ^ +fail_compilation/test8662.d(48): labels cannot be used in a static foreach with more than 1 iteration --- */ // Issue 8662 - Labels rejected in static foreach loop diff --git a/compiler/test/fail_compilation/test8751.d b/compiler/test/fail_compilation/test8751.d index d7057b89fc47..6d87ee944fac 100644 --- a/compiler/test/fail_compilation/test8751.d +++ b/compiler/test/fail_compilation/test8751.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test8751.d(7): Error: undefined identifier `Bar` +fail_compilation/test8751.d(9): Error: undefined identifier `Bar` +Bar foo3(ref const int x) pure { + ^ --- */ Bar foo3(ref const int x) pure { diff --git a/compiler/test/fail_compilation/test9150.d b/compiler/test/fail_compilation/test9150.d index 5f66b360fec1..65a750db9607 100644 --- a/compiler/test/fail_compilation/test9150.d +++ b/compiler/test/fail_compilation/test9150.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/test9150.d(14): Error: mismatched array lengths 5 and 3 for assignment `row[] = __r2[__key3]` +fail_compilation/test9150.d(16): Error: mismatched array lengths 5 and 3 for assignment `row[] = __r2[__key3]` + foreach (int[5] row; matrix) //if int[3], there is no error. + ^ --- */ diff --git a/compiler/test/fail_compilation/test9176.d b/compiler/test/fail_compilation/test9176.d index 62ae5c048d57..68b347279ee0 100644 --- a/compiler/test/fail_compilation/test9176.d +++ b/compiler/test/fail_compilation/test9176.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/test9176.d(14): Error: forward reference to inferred return type of function call `get()` -fail_compilation/test9176.d(10): while evaluating: `static assert(!is(typeof(foo(S()))))` +fail_compilation/test9176.d(18): Error: forward reference to inferred return type of function call `get()` + auto get() { return get(); } + ^ +fail_compilation/test9176.d(14): while evaluating: `static assert(!is(typeof(foo(S()))))` +static assert(!is(typeof(foo(S())))); +^ --- */ diff --git a/compiler/test/fail_compilation/test9701.d b/compiler/test/fail_compilation/test9701.d index 67f38fcafbb0..a51079b7dd6d 100644 --- a/compiler/test/fail_compilation/test9701.d +++ b/compiler/test/fail_compilation/test9701.d @@ -1,31 +1,81 @@ /* TEST_OUTPUT: --- -fail_compilation/test9701.d(38): Error: `@safe` is not a valid attribute for enum members -fail_compilation/test9701.d(39): Error: `@system` is not a valid attribute for enum members -fail_compilation/test9701.d(40): Error: `@trusted` is not a valid attribute for enum members -fail_compilation/test9701.d(41): Error: `@nogc` is not a valid attribute for enum members -fail_compilation/test9701.d(42): Error: found `pure` when expecting `identifier` -fail_compilation/test9701.d(43): Error: found `shared` when expecting `identifier` -fail_compilation/test9701.d(44): Error: found `inout` when expecting `identifier` -fail_compilation/test9701.d(45): Error: found `immutable` when expecting `identifier` -fail_compilation/test9701.d(46): Error: found `const` when expecting `identifier` -fail_compilation/test9701.d(47): Error: found `synchronized` when expecting `identifier` -fail_compilation/test9701.d(48): Error: found `scope` when expecting `identifier` -fail_compilation/test9701.d(49): Error: found `auto` when expecting `identifier` -fail_compilation/test9701.d(50): Error: found `ref` when expecting `identifier` -fail_compilation/test9701.d(51): Error: found `__gshared` when expecting `identifier` -fail_compilation/test9701.d(52): Error: found `final` when expecting `identifier` -fail_compilation/test9701.d(53): Error: found `extern` when expecting `identifier` -fail_compilation/test9701.d(54): Error: found `export` when expecting `identifier` -fail_compilation/test9701.d(55): Error: found `nothrow` when expecting `identifier` -fail_compilation/test9701.d(56): Error: found `public` when expecting `identifier` -fail_compilation/test9701.d(57): Error: found `private` when expecting `identifier` -fail_compilation/test9701.d(58): Error: found `package` when expecting `identifier` -fail_compilation/test9701.d(59): Error: found `static` when expecting `identifier` -fail_compilation/test9701.d(60): Error: found `static` when expecting `identifier` -fail_compilation/test9701.d(61): Error: found `static` when expecting `identifier` -fail_compilation/test9701.d(62): Error: found `static` when expecting `identifier` +fail_compilation/test9701.d(88): Error: `@safe` is not a valid attribute for enum members + @safe safe, + ^ +fail_compilation/test9701.d(89): Error: `@system` is not a valid attribute for enum members + @system system, + ^ +fail_compilation/test9701.d(90): Error: `@trusted` is not a valid attribute for enum members + @trusted trusted, + ^ +fail_compilation/test9701.d(91): Error: `@nogc` is not a valid attribute for enum members + @nogc nogc, + ^ +fail_compilation/test9701.d(92): Error: found `pure` when expecting `identifier` + pure pure_, + ^ +fail_compilation/test9701.d(93): Error: found `shared` when expecting `identifier` + shared shared_, + ^ +fail_compilation/test9701.d(94): Error: found `inout` when expecting `identifier` + inout inout_, + ^ +fail_compilation/test9701.d(95): Error: found `immutable` when expecting `identifier` + immutable immutable_, + ^ +fail_compilation/test9701.d(96): Error: found `const` when expecting `identifier` + const const_, + ^ +fail_compilation/test9701.d(97): Error: found `synchronized` when expecting `identifier` + synchronized synchronized_, + ^ +fail_compilation/test9701.d(98): Error: found `scope` when expecting `identifier` + scope scope_, + ^ +fail_compilation/test9701.d(99): Error: found `auto` when expecting `identifier` + auto auto_, + ^ +fail_compilation/test9701.d(100): Error: found `ref` when expecting `identifier` + ref ref_, + ^ +fail_compilation/test9701.d(101): Error: found `__gshared` when expecting `identifier` + __gshared __gshared_, + ^ +fail_compilation/test9701.d(102): Error: found `final` when expecting `identifier` + final final_, + ^ +fail_compilation/test9701.d(103): Error: found `extern` when expecting `identifier` + extern extern_, + ^ +fail_compilation/test9701.d(104): Error: found `export` when expecting `identifier` + export export_, + ^ +fail_compilation/test9701.d(105): Error: found `nothrow` when expecting `identifier` + nothrow nothrow_, + ^ +fail_compilation/test9701.d(106): Error: found `public` when expecting `identifier` + public public_, + ^ +fail_compilation/test9701.d(107): Error: found `private` when expecting `identifier` + private private_, + ^ +fail_compilation/test9701.d(108): Error: found `package` when expecting `identifier` + package package_, + ^ +fail_compilation/test9701.d(109): Error: found `static` when expecting `identifier` + static static1, + ^ +fail_compilation/test9701.d(110): Error: found `static` when expecting `identifier` + @("a") static static2, + ^ +fail_compilation/test9701.d(111): Error: found `static` when expecting `identifier` + static @("a") static3, + ^ +fail_compilation/test9701.d(112): Error: found `static` when expecting `identifier` + @("a") static @("b") static3, + ^ --- */ diff --git a/compiler/test/fail_compilation/test9701b.d b/compiler/test/fail_compilation/test9701b.d index 725a4cd0ea6a..f8e56798c187 100644 --- a/compiler/test/fail_compilation/test9701b.d +++ b/compiler/test/fail_compilation/test9701b.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -de TEST_OUTPUT: --- -fail_compilation/test9701b.d(20): Deprecation: enum member `test9701b.Enum.e0` is deprecated -fail_compilation/test9701b.d(21): Deprecation: enum member `test9701b.Enum.e1` is deprecated - message +fail_compilation/test9701b.d(24): Deprecation: enum member `test9701b.Enum.e0` is deprecated + auto value = Enum.e0; + ^ +fail_compilation/test9701b.d(25): Deprecation: enum member `test9701b.Enum.e1` is deprecated - message + auto value2 = Enum.e1; + ^ --- */ diff --git a/compiler/test/fail_compilation/testCols.d b/compiler/test/fail_compilation/testCols.d index e5bff1809b41..75481a4da1fb 100644 --- a/compiler/test/fail_compilation/testCols.d +++ b/compiler/test/fail_compilation/testCols.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/testCols.d(12,5): Error: undefined identifier `nonexistent` +fail_compilation/testCols.d(14,5): Error: undefined identifier `nonexistent` + nonexistent(); + ^ --- */ diff --git a/compiler/test/fail_compilation/testTypeof.c b/compiler/test/fail_compilation/testTypeof.c index dd7781fca5f6..4d21f814b2b7 100644 --- a/compiler/test/fail_compilation/testTypeof.c +++ b/compiler/test/fail_compilation/testTypeof.c @@ -1,9 +1,13 @@ /* TEST_OUTPUT: --- -fail_compilation/testTypeof.c(10): Error: `typeof` operator expects an expression or type name in parentheses -fail_compilation/testTypeof.c(10): Error: identifier or `(` expected -fail_compilation/testTypeof.c(10): Error: expected identifier for declarator -fail_compilation/testTypeof.c(10): Error: expected identifier for declaration +fail_compilation/testTypeof.c(14): Error: `typeof` operator expects an expression or type name in parentheses +typeof(1;2) x; + ^ +fail_compilation/testTypeof.c(14): Error: identifier or `(` expected +typeof(1;2) x; + ^ +fail_compilation/testTypeof.c(14): Error: expected identifier for declarator +fail_compilation/testTypeof.c(14): Error: expected identifier for declaration --- */ diff --git a/compiler/test/fail_compilation/testscopestatic.d b/compiler/test/fail_compilation/testscopestatic.d index cc7b0125953f..b9c318386177 100644 --- a/compiler/test/fail_compilation/testscopestatic.d +++ b/compiler/test/fail_compilation/testscopestatic.d @@ -1,10 +1,18 @@ /* TEST_OUTPUT: --- -fail_compilation/testscopestatic.d(15): Error: variable `testscopestatic.foo.p` cannot be `scope` and `static` -fail_compilation/testscopestatic.d(16): Error: variable `testscopestatic.foo.b` cannot be `scope` and `extern` -fail_compilation/testscopestatic.d(17): Error: variable `testscopestatic.foo.c` cannot be `scope` and `__gshared` -fail_compilation/testscopestatic.d(21): Error: field `x` cannot be `scope` +fail_compilation/testscopestatic.d(23): Error: variable `testscopestatic.foo.p` cannot be `scope` and `static` + static scope int* p; + ^ +fail_compilation/testscopestatic.d(24): Error: variable `testscopestatic.foo.b` cannot be `scope` and `extern` + extern scope int b; + ^ +fail_compilation/testscopestatic.d(25): Error: variable `testscopestatic.foo.c` cannot be `scope` and `__gshared` + scope __gshared int c; + ^ +fail_compilation/testscopestatic.d(29): Error: field `x` cannot be `scope` + scope int x; + ^ --- */ diff --git a/compiler/test/fail_compilation/throwexp.d b/compiler/test/fail_compilation/throwexp.d index b1216ce682f9..95f8c3621b00 100644 --- a/compiler/test/fail_compilation/throwexp.d +++ b/compiler/test/fail_compilation/throwexp.d @@ -1,7 +1,11 @@ /+ TEST_OUTPUT: --- -fail_compilation/throwexp.d(11): Error: to be thrown `ret()` must be non-null -fail_compilation/throwexp.d(12): Error: to be thrown `null` must be non-null +fail_compilation/throwexp.d(15): Error: to be thrown `ret()` must be non-null +enum y = throw ret(); + ^ +fail_compilation/throwexp.d(16): Error: to be thrown `null` must be non-null +enum x = throw Exception.init; + ^ --- +/ auto ret() diff --git a/compiler/test/fail_compilation/tolvalue.d b/compiler/test/fail_compilation/tolvalue.d index e911dff77296..6317783467ab 100644 --- a/compiler/test/fail_compilation/tolvalue.d +++ b/compiler/test/fail_compilation/tolvalue.d @@ -1,18 +1,42 @@ /** TEST_OUTPUT: --- -fail_compilation/tolvalue.d(28): Error: cannot take address of template `templateFunc(T)()`, perhaps instantiate it first -fail_compilation/tolvalue.d(29): Error: cannot take address of type `int` -fail_compilation/tolvalue.d(30): Error: cannot take address of constant `3` -fail_compilation/tolvalue.d(31): Error: cannot take address of operator `$` -fail_compilation/tolvalue.d(32): Error: cannot take address of compiler-generated variable `__ctfe` -fail_compilation/tolvalue.d(33): Error: cannot take address of manifest constant `f` -fail_compilation/tolvalue.d(38): Error: cannot create default argument for `ref` / `out` parameter from constant `3` -fail_compilation/tolvalue.d(39): Error: cannot create default argument for `ref` / `out` parameter from compiler-generated variable `__ctfe` -fail_compilation/tolvalue.d(40): Error: cannot create default argument for `ref` / `out` parameter from manifest constant `f` -fail_compilation/tolvalue.d(45): Error: cannot modify constant `3` -fail_compilation/tolvalue.d(46): Error: cannot modify compiler-generated variable `__ctfe` -fail_compilation/tolvalue.d(47): Error: cannot modify manifest constant `f` +fail_compilation/tolvalue.d(52): Error: cannot take address of template `templateFunc(T)()`, perhaps instantiate it first + auto x0 = &templateFunc; + ^ +fail_compilation/tolvalue.d(53): Error: cannot take address of type `int` + auto x1 = &intAlias; + ^ +fail_compilation/tolvalue.d(54): Error: cannot take address of constant `3` + auto x2 = &3; + ^ +fail_compilation/tolvalue.d(55): Error: cannot take address of operator `$` + auto x3 = a[&$]; + ^ +fail_compilation/tolvalue.d(56): Error: cannot take address of compiler-generated variable `__ctfe` + auto x4 = &__ctfe; + ^ +fail_compilation/tolvalue.d(57): Error: cannot take address of manifest constant `f` + auto x6 = &E.f; + ^ +fail_compilation/tolvalue.d(62): Error: cannot create default argument for `ref` / `out` parameter from constant `3` + void f0(ref int = 3) {} + ^ +fail_compilation/tolvalue.d(63): Error: cannot create default argument for `ref` / `out` parameter from compiler-generated variable `__ctfe` + void f1(ref bool = __ctfe) {} + ^ +fail_compilation/tolvalue.d(64): Error: cannot create default argument for `ref` / `out` parameter from manifest constant `f` + void f3(ref E = E.f) {} + ^ +fail_compilation/tolvalue.d(69): Error: cannot modify constant `3` + 3++; + ^ +fail_compilation/tolvalue.d(70): Error: cannot modify compiler-generated variable `__ctfe` + __ctfe++; + ^ +fail_compilation/tolvalue.d(71): Error: cannot modify manifest constant `f` + E.f++; + ^ --- */ diff --git a/compiler/test/fail_compilation/trait_loc_err.d b/compiler/test/fail_compilation/trait_loc_err.d index 29162144110b..8fdb13174706 100644 --- a/compiler/test/fail_compilation/trait_loc_err.d +++ b/compiler/test/fail_compilation/trait_loc_err.d @@ -1,9 +1,15 @@ /* TEST_OUTPUT: --- -fail_compilation/trait_loc_err.d(14): Error: can only get the location of a symbol, not `trait_loc_err` -fail_compilation/trait_loc_err.d(15): Error: can only get the location of a symbol, not `core.stdc` -fail_compilation/trait_loc_err.d(16): Error: can only get the location of a symbol, not `core.stdc.stdio` +fail_compilation/trait_loc_err.d(20): Error: can only get the location of a symbol, not `trait_loc_err` + __traits(getLocation, __traits(parent, main)); + ^ +fail_compilation/trait_loc_err.d(21): Error: can only get the location of a symbol, not `core.stdc` + __traits(getLocation, __traits(parent, core.stdc.stdio)); + ^ +fail_compilation/trait_loc_err.d(22): Error: can only get the location of a symbol, not `core.stdc.stdio` + __traits(getLocation, core.stdc.stdio); + ^ --- */ module trait_loc_err; diff --git a/compiler/test/fail_compilation/trait_loc_ov_err.d b/compiler/test/fail_compilation/trait_loc_ov_err.d index 313e57da4c9e..75b972181ae9 100644 --- a/compiler/test/fail_compilation/trait_loc_ov_err.d +++ b/compiler/test/fail_compilation/trait_loc_ov_err.d @@ -2,8 +2,12 @@ module trait_loc_ov_err; /* TEST_OUTPUT: --- -fail_compilation/trait_loc_ov_err.d(24): Error: cannot get location of an overload set, use `__traits(getOverloads, ..., "ov1")[N]` to get the Nth overload -fail_compilation/trait_loc_ov_err.d(25): Error: cannot get location of an overload set, use `__traits(getOverloads, ..., "ov2")[N]` to get the Nth overload +fail_compilation/trait_loc_ov_err.d(28): Error: cannot get location of an overload set, use `__traits(getOverloads, ..., "ov1")[N]` to get the Nth overload +enum e1 = __traits(getLocation, ov1); + ^ +fail_compilation/trait_loc_ov_err.d(29): Error: cannot get location of an overload set, use `__traits(getOverloads, ..., "ov2")[N]` to get the Nth overload +enum e2 = __traits(getLocation, ov2); + ^ --- */ diff --git a/compiler/test/fail_compilation/traits.d b/compiler/test/fail_compilation/traits.d index 21f3f57edd52..603e3d87df15 100644 --- a/compiler/test/fail_compilation/traits.d +++ b/compiler/test/fail_compilation/traits.d @@ -3,34 +3,104 @@ /* TEST_OUTPUT: --- -fail_compilation/traits.d(100): Error: `getTargetInfo` key `"not_a_target_info"` not supported by this implementation -fail_compilation/traits.d(101): Error: string expected as argument of __traits `getTargetInfo` instead of `100` -fail_compilation/traits.d(102): Error: expected 1 arguments for `getTargetInfo` but had 2 -fail_compilation/traits.d(103): Error: expected 1 arguments for `getTargetInfo` but had 0 -fail_compilation/traits.d(200): Error: undefined identifier `imports.nonexistent` -fail_compilation/traits.d(201): Error: undefined identifier `imports.nonexistent` -fail_compilation/traits.d(202): Error: expected 1 arguments for `isPackage` but had 0 -fail_compilation/traits.d(203): Error: expected 1 arguments for `isModule` but had 0 -fail_compilation/traits.d(300): Error: in expression `__traits(allMembers, float)` `float` can't have members -fail_compilation/traits.d(300): `float` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation -fail_compilation/traits.d(306): Error: in expression `__traits(allMembers, TemplatedStruct)` struct `TemplatedStruct(T)` has no members -fail_compilation/traits.d(306): `TemplatedStruct(T)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation -fail_compilation/traits.d(309): Error: in expression `__traits(derivedMembers, float)` `float` can't have members -fail_compilation/traits.d(309): `float` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation -fail_compilation/traits.d(316): Error: in expression `__traits(derivedMembers, TemplatedStruct)` struct `TemplatedStruct(T)` has no members -fail_compilation/traits.d(316): `TemplatedStruct(T)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation -fail_compilation/traits.d(404): Error: function `traits.func1` circular reference in `__traits(GetCppNamespaces,...)` -fail_compilation/traits.d(413): Error: function `traits.foo1.func1` circular reference in `__traits(GetCppNamespaces,...)` +fail_compilation/traits.d(98): Error: `getTargetInfo` key `"not_a_target_info"` not supported by this implementation +enum A1 = __traits(getTargetInfo, "not_a_target_info"); + ^ +fail_compilation/traits.d(99): Error: string expected as argument of __traits `getTargetInfo` instead of `100` +enum B1 = __traits(getTargetInfo, 100); + ^ +fail_compilation/traits.d(100): Error: expected 1 arguments for `getTargetInfo` but had 2 +enum C1 = __traits(getTargetInfo, "cppRuntimeLibrary", "bits"); + ^ +fail_compilation/traits.d(101): Error: expected 1 arguments for `getTargetInfo` but had 0 +enum D1 = __traits(getTargetInfo); + ^ +fail_compilation/traits.d(104): Error: undefined identifier `imports.nonexistent` +enum A2 = __traits(isPackage, imports.nonexistent); + ^ +fail_compilation/traits.d(105): Error: undefined identifier `imports.nonexistent` +enum B2 = __traits(isModule, imports.nonexistent); + ^ +fail_compilation/traits.d(106): Error: expected 1 arguments for `isPackage` but had 0 +enum C2 = __traits(isPackage); + ^ +fail_compilation/traits.d(107): Error: expected 1 arguments for `isModule` but had 0 +enum D2 = __traits(isModule); + ^ +fail_compilation/traits.d(116): Error: in expression `__traits(allMembers, float)` `float` can't have members +enum AM0 = __traits(allMembers, float); // compile error + ^ +fail_compilation/traits.d(116): `float` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation +fail_compilation/traits.d(122): Error: in expression `__traits(allMembers, TemplatedStruct)` struct `TemplatedStruct(T)` has no members +enum AM6 = __traits(allMembers, TemplatedStruct); // compile error + ^ +fail_compilation/traits.d(122): `TemplatedStruct(T)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation +fail_compilation/traits.d(125): Error: in expression `__traits(derivedMembers, float)` `float` can't have members +enum DM0 = __traits(derivedMembers, float); // compile error + ^ +fail_compilation/traits.d(125): `float` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation +fail_compilation/traits.d(132): Error: in expression `__traits(derivedMembers, TemplatedStruct)` struct `TemplatedStruct(T)` has no members +enum DM7 = __traits(derivedMembers, TemplatedStruct); // compile error + ^ +fail_compilation/traits.d(132): `TemplatedStruct(T)` must evaluate to either a module, a struct, an union, a class, an interface or a template instantiation +fail_compilation/traits.d(140): Error: function `traits.func1` circular reference in `__traits(GetCppNamespaces,...)` +extern(C++, __traits(getCppNamespaces, func2)) void func1 () {} + ^ +fail_compilation/traits.d(149): Error: function `traits.foo1.func1` circular reference in `__traits(GetCppNamespaces,...)` +extern(C++, __traits(getCppNamespaces, foobar1.func2)) void func1 () {} + ^ +fail_compilation/traits.d(156): Error: undefined identifier `T` +auto yip(int f) {return T[];} + ^ +fail_compilation/traits.d(157): while evaluating `pragma(msg, __traits(getParameterStorageClasses, yip, 0))` +pragma(msg, __traits(getParameterStorageClasses, yip, 0)); +^ +fail_compilation/traits.d(163): Error: expected 1 arguments for `hasCopyConstructor` but had 0 +pragma(msg, __traits(hasCopyConstructor)); + ^ +fail_compilation/traits.d(163): while evaluating `pragma(msg, __traits(hasCopyConstructor))` +pragma(msg, __traits(hasCopyConstructor)); +^ +fail_compilation/traits.d(164): Error: type expected as second argument of __traits `hasCopyConstructor` instead of `S()` +pragma(msg, __traits(hasCopyConstructor, S())); + ^ +fail_compilation/traits.d(164): while evaluating `pragma(msg, __traits(hasCopyConstructor, S()))` +pragma(msg, __traits(hasCopyConstructor, S())); +^ +fail_compilation/traits.d(165): Error: expected 1 arguments for `hasPostblit` but had 0 +pragma(msg, __traits(hasPostblit)); + ^ +fail_compilation/traits.d(165): while evaluating `pragma(msg, __traits(hasPostblit))` +pragma(msg, __traits(hasPostblit)); +^ +fail_compilation/traits.d(166): Error: type expected as second argument of __traits `hasPostblit` instead of `S()` +pragma(msg, __traits(hasPostblit, S())); + ^ +fail_compilation/traits.d(166): while evaluating `pragma(msg, __traits(hasPostblit, S()))` +pragma(msg, __traits(hasPostblit, S())); +^ +fail_compilation/traits.d(170): Error: alias `traits.a` cannot alias an expression `true` +alias a = __traits(compiles, 1); +^ +fail_compilation/traits.d(171): Error: alias `traits.b` cannot alias an expression `false` +alias b = __traits(isIntegral, 1.1); +^ +fail_compilation/traits.d(172): Error: alias `traits.c` cannot alias an expression `"Object"` +alias c = __traits(identifier, Object); +^ +fail_compilation/traits.d(173): while evaluating `pragma(msg, a)` +pragma(msg, a, b, c); +^ --- */ -#line 100 +// Line 100 starts here enum A1 = __traits(getTargetInfo, "not_a_target_info"); enum B1 = __traits(getTargetInfo, 100); enum C1 = __traits(getTargetInfo, "cppRuntimeLibrary", "bits"); enum D1 = __traits(getTargetInfo); -#line 200 +// Line 200 starts here enum A2 = __traits(isPackage, imports.nonexistent); enum B2 = __traits(isModule, imports.nonexistent); enum C2 = __traits(isPackage); @@ -42,7 +112,7 @@ struct Struct {} union Union {} class Class {} -#line 300 +// Line 300 starts here enum AM0 = __traits(allMembers, float); // compile error enum AM1 = __traits(allMembers, Struct); // no error enum AM2 = __traits(allMembers, Union); // no error @@ -62,7 +132,7 @@ enum DM6 = __traits(derivedMembers, TemplatedStruct!float); // no error enum DM7 = __traits(derivedMembers, TemplatedStruct); // compile error enum DM8 = __traits(derivedMembers, mixin(__MODULE__)); // no error -#line 400 +// Line 400 starts here extern(C++, "bar") extern(C++, __traits(getCppNamespaces, func1)) void func () {} @@ -81,35 +151,13 @@ extern(C++, __traits(getCppNamespaces, foobar1.func2)) void func1 () {} extern(C++, foobar1) extern(C++, __traits(getCppNamespaces, bar1.func)) void func2 () {} -/******************************************** -https://issues.dlang.org/show_bug.cgi?id=21918 - -TEST_OUTPUT: ---- -fail_compilation/traits.d(501): Error: undefined identifier `T` -fail_compilation/traits.d(502): while evaluating `pragma(msg, __traits(getParameterStorageClasses, yip, 0))` ---- -*/ -#line 500 +// Line 500 starts here auto yip(int f) {return T[];} pragma(msg, __traits(getParameterStorageClasses, yip, 0)); -/******************************************** -TEST_OUTPUT: ---- -fail_compilation/traits.d(602): Error: expected 1 arguments for `hasCopyConstructor` but had 0 -fail_compilation/traits.d(602): while evaluating `pragma(msg, __traits(hasCopyConstructor))` -fail_compilation/traits.d(603): Error: type expected as second argument of __traits `hasCopyConstructor` instead of `S()` -fail_compilation/traits.d(603): while evaluating `pragma(msg, __traits(hasCopyConstructor, S()))` -fail_compilation/traits.d(604): Error: expected 1 arguments for `hasPostblit` but had 0 -fail_compilation/traits.d(604): while evaluating `pragma(msg, __traits(hasPostblit))` -fail_compilation/traits.d(605): Error: type expected as second argument of __traits `hasPostblit` instead of `S()` -fail_compilation/traits.d(605): while evaluating `pragma(msg, __traits(hasPostblit, S()))` ---- -*/ -#line 600 +// Line 600 starts here struct S { this (ref S rhs) {} } pragma(msg, __traits(hasCopyConstructor)); @@ -117,18 +165,7 @@ pragma(msg, __traits(hasCopyConstructor, S())); pragma(msg, __traits(hasPostblit)); pragma(msg, __traits(hasPostblit, S())); -/******************************************** -https://issues.dlang.org/show_bug.cgi?id=23178 - -TEST_OUTPUT: ---- -fail_compilation/traits.d(701): Error: alias `traits.a` cannot alias an expression `true` -fail_compilation/traits.d(702): Error: alias `traits.b` cannot alias an expression `false` -fail_compilation/traits.d(703): Error: alias `traits.c` cannot alias an expression `"Object"` -fail_compilation/traits.d(704): while evaluating `pragma(msg, a)` ---- -*/ -#line 700 +// Line 700 starts here alias a = __traits(compiles, 1); alias b = __traits(isIntegral, 1.1); diff --git a/compiler/test/fail_compilation/traits_parameters.d b/compiler/test/fail_compilation/traits_parameters.d index 5021c540b298..e9b6f3d95e4a 100644 --- a/compiler/test/fail_compilation/traits_parameters.d +++ b/compiler/test/fail_compilation/traits_parameters.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -fail_compilation/traits_parameters.d(9): Error: `__traits(parameters)` cannot have arguments, but `234` was supplied -fail_compilation/traits_parameters.d(10): Error: `__traits(parameters)` may only be used inside a function +fail_compilation/traits_parameters.d(13): Error: `__traits(parameters)` cannot have arguments, but `234` was supplied +typeof(__traits(parameters, 234)) xyz; + ^ +fail_compilation/traits_parameters.d(14): Error: `__traits(parameters)` may only be used inside a function +typeof(__traits(parameters)) x; + ^ --- */ diff --git a/compiler/test/fail_compilation/typeerrors.d b/compiler/test/fail_compilation/typeerrors.d index ea929bcc45cd..ed147fc139ad 100644 --- a/compiler/test/fail_compilation/typeerrors.d +++ b/compiler/test/fail_compilation/typeerrors.d @@ -1,26 +1,66 @@ /* TEST_OUTPUT: --- -fail_compilation/typeerrors.d(37): Error: sequence index `4` out of bounds `[0 .. 4]` -fail_compilation/typeerrors.d(39): Error: variable `x` cannot be read at compile time -fail_compilation/typeerrors.d(40): Error: cannot have array of `void()` -fail_compilation/typeerrors.d(41): Error: cannot have array of scope `typeerrors.C` -fail_compilation/typeerrors.d(42): Error: cannot have array of scope `typeerrors.C` -fail_compilation/typeerrors.d(45): Error: `int[5]` is not an expression -fail_compilation/typeerrors.d(47): Error: variable `x` is used as a type -fail_compilation/typeerrors.d(38): variable `x` is declared here -fail_compilation/typeerrors.d(48): Error: cannot have associative array key of `void()` -fail_compilation/typeerrors.d(49): Error: cannot have associative array key of `void` -fail_compilation/typeerrors.d(50): Error: cannot have array of scope `typeerrors.C` -fail_compilation/typeerrors.d(51): Error: cannot have associative array of `void` -fail_compilation/typeerrors.d(52): Error: cannot have associative array of `void()` -fail_compilation/typeerrors.d(54): Error: cannot have parameter of type `void` -fail_compilation/typeerrors.d(56): Error: slice `[1..5]` is out of range of [0..4] -fail_compilation/typeerrors.d(57): Error: slice `[2..1]` is out of range of [0..4] -fail_compilation/typeerrors.d(59): Error: variable `typeerrors.foo.globalC` globals, statics, fields, manifest constants, ref and out parameters cannot be `scope` -fail_compilation/typeerrors.d(59): Error: variable `typeerrors.foo.globalC` reference to `scope class` must be `scope` -fail_compilation/typeerrors.d(60): Error: variable `typeerrors.foo.manifestC` globals, statics, fields, manifest constants, ref and out parameters cannot be `scope` -fail_compilation/typeerrors.d(60): Error: variable `typeerrors.foo.manifestC` reference to `scope class` must be `scope` +fail_compilation/typeerrors.d(77): Error: sequence index `4` out of bounds `[0 .. 4]` + T[4] a; + ^ +fail_compilation/typeerrors.d(79): Error: variable `x` cannot be read at compile time + T[x] b; + ^ +fail_compilation/typeerrors.d(80): Error: cannot have array of `void()` + typeof(bar)[5] c; + ^ +fail_compilation/typeerrors.d(81): Error: cannot have array of scope `typeerrors.C` + C[6] d; + ^ +fail_compilation/typeerrors.d(82): Error: cannot have array of scope `typeerrors.C` + C[] e; + ^ +fail_compilation/typeerrors.d(85): Error: `int[5]` is not an expression + auto f = AI.ptr; + ^ +fail_compilation/typeerrors.d(87): Error: variable `x` is used as a type + int[x*] g; + ^ +fail_compilation/typeerrors.d(78): variable `x` is declared here + int x; + ^ +fail_compilation/typeerrors.d(88): Error: cannot have associative array key of `void()` + int[typeof(bar)] h; + ^ +fail_compilation/typeerrors.d(89): Error: cannot have associative array key of `void` + int[void] i; + ^ +fail_compilation/typeerrors.d(90): Error: cannot have array of scope `typeerrors.C` + C[int] j; + ^ +fail_compilation/typeerrors.d(91): Error: cannot have associative array of `void` + void[int] k; + ^ +fail_compilation/typeerrors.d(92): Error: cannot have associative array of `void()` + typeof(bar)[int] l; + ^ +fail_compilation/typeerrors.d(94): Error: cannot have parameter of type `void` + void abc(void) { } + ^ +fail_compilation/typeerrors.d(96): Error: slice `[1..5]` is out of range of [0..4] + alias T2 = T[1 .. 5]; + ^ +fail_compilation/typeerrors.d(97): Error: slice `[2..1]` is out of range of [0..4] + alias T3 = T[2 .. 1]; + ^ +fail_compilation/typeerrors.d(99): Error: variable `typeerrors.foo.globalC` globals, statics, fields, manifest constants, ref and out parameters cannot be `scope` + static C globalC; + ^ +fail_compilation/typeerrors.d(99): Error: variable `typeerrors.foo.globalC` reference to `scope class` must be `scope` + static C globalC; + ^ +fail_compilation/typeerrors.d(100): Error: variable `typeerrors.foo.manifestC` globals, statics, fields, manifest constants, ref and out parameters cannot be `scope` + enum C manifestC = new C(); + ^ +fail_compilation/typeerrors.d(100): Error: variable `typeerrors.foo.manifestC` reference to `scope class` must be `scope` + enum C manifestC = new C(); + ^ --- */ diff --git a/compiler/test/fail_compilation/udaparams.d b/compiler/test/fail_compilation/udaparams.d index 76df55fcfd72..33415eb26d42 100644 --- a/compiler/test/fail_compilation/udaparams.d +++ b/compiler/test/fail_compilation/udaparams.d @@ -1,30 +1,74 @@ /* TEST_OUTPUT: --- -fail_compilation/udaparams.d(31): Error: variadic parameter cannot have user-defined attributes -fail_compilation/udaparams.d(32): Error: variadic parameter cannot have user-defined attributes -fail_compilation/udaparams.d(34): Error: user-defined attributes cannot appear as postfixes -fail_compilation/udaparams.d(35): Error: user-defined attributes cannot appear as postfixes -fail_compilation/udaparams.d(36): Error: user-defined attributes cannot appear as postfixes -fail_compilation/udaparams.d(38): Error: `@safe` attribute for function parameter is not supported -fail_compilation/udaparams.d(39): Error: `@safe` attribute for function parameter is not supported -fail_compilation/udaparams.d(40): Error: `@safe` attribute for function parameter is not supported -fail_compilation/udaparams.d(43): Error: `@system` attribute for function parameter is not supported -fail_compilation/udaparams.d(44): Error: `@trusted` attribute for function parameter is not supported -fail_compilation/udaparams.d(45): Error: `@nogc` attribute for function parameter is not supported -fail_compilation/udaparams.d(51): Error: cannot put a storage-class in an `alias` declaration. -fail_compilation/udaparams.d(52): Error: cannot put a storage-class in an `alias` declaration. -fail_compilation/udaparams.d(53): Error: semicolon expected to close `alias` declaration, not `=>` -fail_compilation/udaparams.d(53): Error: declaration expected, not `=>` -fail_compilation/udaparams.d(54): Error: semicolon expected to close `alias` declaration, not `=>` -fail_compilation/udaparams.d(54): Error: declaration expected, not `=>` -fail_compilation/udaparams.d(57): Error: basic type expected, not `@` -fail_compilation/udaparams.d(57): Error: identifier expected for template value parameter -fail_compilation/udaparams.d(57): Error: found `@` when expecting `)` -fail_compilation/udaparams.d(57): Error: basic type expected, not `3` -fail_compilation/udaparams.d(57): Error: found `3` when expecting `)` -fail_compilation/udaparams.d(57): Error: semicolon expected following function declaration, not `)` -fail_compilation/udaparams.d(57): Error: declaration expected, not `)` +fail_compilation/udaparams.d(75): Error: variadic parameter cannot have user-defined attributes +void vararg1(int a, @(10) ...); + ^ +fail_compilation/udaparams.d(76): Error: variadic parameter cannot have user-defined attributes +extern(C) void vararg2(int a, @(10) ...); + ^ +fail_compilation/udaparams.d(78): Error: user-defined attributes cannot appear as postfixes +void rhsuda(int a @(10)); + ^ +fail_compilation/udaparams.d(79): Error: user-defined attributes cannot appear as postfixes +void rhsuda2(int @(10)); + ^ +fail_compilation/udaparams.d(80): Error: user-defined attributes cannot appear as postfixes +void rhsuda3(int[] arr @(10) ...); + ^ +fail_compilation/udaparams.d(82): Error: `@safe` attribute for function parameter is not supported +void wrongAttr1(@safe int); + ^ +fail_compilation/udaparams.d(83): Error: `@safe` attribute for function parameter is not supported +void wrongAttr2(@safe void function()); + ^ +fail_compilation/udaparams.d(84): Error: `@safe` attribute for function parameter is not supported +void wrongAttr3(@safe void delegate()); + ^ +fail_compilation/udaparams.d(87): Error: `@system` attribute for function parameter is not supported +void test16(A)(A a @system); + ^ +fail_compilation/udaparams.d(88): Error: `@trusted` attribute for function parameter is not supported +void test16(A)(A a @trusted); + ^ +fail_compilation/udaparams.d(89): Error: `@nogc` attribute for function parameter is not supported +void test16(A)(A a @nogc); + ^ +fail_compilation/udaparams.d(95): Error: cannot put a storage-class in an `alias` declaration. +fail_compilation/udaparams.d(96): Error: cannot put a storage-class in an `alias` declaration. +fail_compilation/udaparams.d(97): Error: semicolon expected to close `alias` declaration, not `=>` +alias test19f = extern(C++) b => 1 + 2; + ^ +fail_compilation/udaparams.d(97): Error: declaration expected, not `=>` +alias test19f = extern(C++) b => 1 + 2; + ^ +fail_compilation/udaparams.d(98): Error: semicolon expected to close `alias` declaration, not `=>` +alias test19g = align(2) b => 1 + 2; + ^ +fail_compilation/udaparams.d(98): Error: declaration expected, not `=>` +alias test19g = align(2) b => 1 + 2; + ^ +fail_compilation/udaparams.d(101): Error: basic type expected, not `@` +void test21(@(3) T)(T t) {} + ^ +fail_compilation/udaparams.d(101): Error: identifier expected for template value parameter +void test21(@(3) T)(T t) {} + ^ +fail_compilation/udaparams.d(101): Error: found `@` when expecting `)` +void test21(@(3) T)(T t) {} + ^ +fail_compilation/udaparams.d(101): Error: basic type expected, not `3` +void test21(@(3) T)(T t) {} + ^ +fail_compilation/udaparams.d(101): Error: found `3` when expecting `)` +void test21(@(3) T)(T t) {} + ^ +fail_compilation/udaparams.d(101): Error: semicolon expected following function declaration, not `)` +void test21(@(3) T)(T t) {} + ^ +fail_compilation/udaparams.d(101): Error: declaration expected, not `)` +void test21(@(3) T)(T t) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/udatypes.d b/compiler/test/fail_compilation/udatypes.d index a7f2bfc521f7..58ffdb754b5d 100644 --- a/compiler/test/fail_compilation/udatypes.d +++ b/compiler/test/fail_compilation/udatypes.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/udatypes.d(8): Error: user-defined attributes not allowed for `alias` declarations +fail_compilation/udatypes.d(10): Error: user-defined attributes not allowed for `alias` declarations +alias c_typedef = extern(C) @(1) void* function(size_t); + ^ --- */ diff --git a/compiler/test/fail_compilation/ufcs.d b/compiler/test/fail_compilation/ufcs.d index 3a92a691e2f4..7cc1c50fe5d9 100644 --- a/compiler/test/fail_compilation/ufcs.d +++ b/compiler/test/fail_compilation/ufcs.d @@ -1,20 +1,40 @@ /* TEST_OUTPUT: --- -fail_compilation/ufcs.d(26): Error: no property `regularF` for `s` of type `S` -fail_compilation/ufcs.d(26): the following error occured while looking for a UFCS match -fail_compilation/ufcs.d(26): Error: function `regularF` is not callable using argument types `(S)` -fail_compilation/ufcs.d(26): expected 0 argument(s), not 1 -fail_compilation/ufcs.d(31): `ufcs.regularF()` declared here -fail_compilation/ufcs.d(27): Error: no property `templateF` for `s` of type `S` -fail_compilation/ufcs.d(27): the following error occured while looking for a UFCS match -fail_compilation/ufcs.d(27): Error: template `templateF` is not callable using argument types `!()(S)` -fail_compilation/ufcs.d(32): Candidate is: `templateF()()` -fail_compilation/ufcs.d(28): Error: no property `templateO` for `s` of type `S` -fail_compilation/ufcs.d(28): the following error occured while looking for a UFCS match -fail_compilation/ufcs.d(28): Error: none of the overloads of template `ufcs.templateO` are callable using argument types `!()(S)` -fail_compilation/ufcs.d(34): Candidates are: `templateO()(int x)` -fail_compilation/ufcs.d(35): `templateO()(float y)` +fail_compilation/ufcs.d(46): Error: no property `regularF` for `s` of type `S` + s.regularF(); + ^ +fail_compilation/ufcs.d(46): the following error occured while looking for a UFCS match +fail_compilation/ufcs.d(46): Error: function `regularF` is not callable using argument types `(S)` + s.regularF(); + ^ +fail_compilation/ufcs.d(46): expected 0 argument(s), not 1 +fail_compilation/ufcs.d(51): `ufcs.regularF()` declared here +void regularF(); + ^ +fail_compilation/ufcs.d(47): Error: no property `templateF` for `s` of type `S` + s.templateF(); + ^ +fail_compilation/ufcs.d(47): the following error occured while looking for a UFCS match +fail_compilation/ufcs.d(47): Error: template `templateF` is not callable using argument types `!()(S)` + s.templateF(); + ^ +fail_compilation/ufcs.d(52): Candidate is: `templateF()()` +void templateF()(); + ^ +fail_compilation/ufcs.d(48): Error: no property `templateO` for `s` of type `S` + s.templateO(); + ^ +fail_compilation/ufcs.d(48): the following error occured while looking for a UFCS match +fail_compilation/ufcs.d(48): Error: none of the overloads of template `ufcs.templateO` are callable using argument types `!()(S)` + s.templateO(); + ^ +fail_compilation/ufcs.d(54): Candidates are: `templateO()(int x)` +void templateO()(int x); + ^ +fail_compilation/ufcs.d(55): `templateO()(float y)` +void templateO()(float y); + ^ --- */ diff --git a/compiler/test/fail_compilation/union_conv.d b/compiler/test/fail_compilation/union_conv.d index f08809c48500..13bb72f7c0f4 100644 --- a/compiler/test/fail_compilation/union_conv.d +++ b/compiler/test/fail_compilation/union_conv.d @@ -2,7 +2,9 @@ REQUIRED_ARGS: -preview=fixImmutableConv TEST_OUTPUT: --- -fail_compilation/union_conv.d(18): Error: cannot implicitly convert expression `c` of type `const(U)` to `U` +fail_compilation/union_conv.d(20): Error: cannot implicitly convert expression `c` of type `const(U)` to `U` + U m = c; + ^ --- */ diff --git a/compiler/test/fail_compilation/var_func_attr.d b/compiler/test/fail_compilation/var_func_attr.d index 8609d29b58cb..82bd3e8a3341 100644 --- a/compiler/test/fail_compilation/var_func_attr.d +++ b/compiler/test/fail_compilation/var_func_attr.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -fail_compilation/var_func_attr.d(19): Error: cannot implicitly convert expression `__lambda8` of type `void function() nothrow @nogc @safe` to `void function() pure` +fail_compilation/var_func_attr.d(21): Error: cannot implicitly convert expression `__lambda8` of type `void function() nothrow @nogc @safe` to `void function() pure` +pure void function() pf = () { + ^ --- */ diff --git a/compiler/test/fail_compilation/vector_cast.d b/compiler/test/fail_compilation/vector_cast.d index e8a8d48c7905..cf1237f966bb 100644 --- a/compiler/test/fail_compilation/vector_cast.d +++ b/compiler/test/fail_compilation/vector_cast.d @@ -2,8 +2,12 @@ REQUIRED_ARGS: -m64 TEST_OUTPUT: --- -fail_compilation/vector_cast.d(11): Error: cannot cast expression `a` of type `int[3]` to `__vector(int[4])` -fail_compilation/vector_cast.d(13): Error: cannot cast expression `a` of type `int[5]` to `__vector(int[4])` +fail_compilation/vector_cast.d(15): Error: cannot cast expression `a` of type `int[3]` to `__vector(int[4])` +int4 convtest3(int[3] a) { return cast(int4) a; } + ^ +fail_compilation/vector_cast.d(17): Error: cannot cast expression `a` of type `int[5]` to `__vector(int[4])` +int4 convtest5(int[5] a) { return cast(int4) a; } + ^ --- */ diff --git a/compiler/test/fail_compilation/vector_types.d b/compiler/test/fail_compilation/vector_types.d index 322bbc66cb52..3bd753d99ec6 100644 --- a/compiler/test/fail_compilation/vector_types.d +++ b/compiler/test/fail_compilation/vector_types.d @@ -3,12 +3,24 @@ REQUIRED_ARGS: -o- TEST_OUTPUT: DISABLED: freebsd32 openbsd32 linux32 osx32 win32 --- -fail_compilation/vector_types.d(15): Error: 32 byte vector type `__vector(double[4])` is not supported on this platform -fail_compilation/vector_types.d(16): Error: 32 byte vector type `__vector(float[8])` is not supported on this platform -fail_compilation/vector_types.d(17): Error: 32 byte vector type `__vector(ulong[4])` is not supported on this platform -fail_compilation/vector_types.d(18): Error: 32 byte vector type `__vector(uint[8])` is not supported on this platform -fail_compilation/vector_types.d(19): Error: 32 byte vector type `__vector(ushort[16])` is not supported on this platform -fail_compilation/vector_types.d(20): Error: 32 byte vector type `__vector(ubyte[32])` is not supported on this platform +fail_compilation/vector_types.d(27): Error: 32 byte vector type `__vector(double[4])` is not supported on this platform +alias a = __vector(double[4]); +^ +fail_compilation/vector_types.d(28): Error: 32 byte vector type `__vector(float[8])` is not supported on this platform +alias b = __vector(float[8]); +^ +fail_compilation/vector_types.d(29): Error: 32 byte vector type `__vector(ulong[4])` is not supported on this platform +alias c = __vector(ulong[4]); +^ +fail_compilation/vector_types.d(30): Error: 32 byte vector type `__vector(uint[8])` is not supported on this platform +alias d = __vector(uint[8]); +^ +fail_compilation/vector_types.d(31): Error: 32 byte vector type `__vector(ushort[16])` is not supported on this platform +alias e = __vector(ushort[16]); +^ +fail_compilation/vector_types.d(32): Error: 32 byte vector type `__vector(ubyte[32])` is not supported on this platform +alias f = __vector(ubyte[32]); +^ --- */ diff --git a/compiler/test/fail_compilation/verifyhookexist.d b/compiler/test/fail_compilation/verifyhookexist.d index d7b8f6646c3b..ab9e83545ea2 100644 --- a/compiler/test/fail_compilation/verifyhookexist.d +++ b/compiler/test/fail_compilation/verifyhookexist.d @@ -8,12 +8,24 @@ EXTRA_SOURCES: extra-files/minimal/object.d /* TEST_OUTPUT: --- -fail_compilation/verifyhookexist.d(22): Error: `object.__ArrayCast` not found. The current runtime does not support casting array of structs, or the runtime is corrupt. -fail_compilation/verifyhookexist.d(28): Error: `object.__equals` not found. The current runtime does not support equal checks on arrays, or the runtime is corrupt. -fail_compilation/verifyhookexist.d(29): Error: `object.__cmp` not found. The current runtime does not support comparing arrays, or the runtime is corrupt. -fail_compilation/verifyhookexist.d(33): Error: `object._d_assert_fail` not found. The current runtime does not support generating assert messages, or the runtime is corrupt. -fail_compilation/verifyhookexist.d(36): Error: `object.__switch` not found. The current runtime does not support switch cases on strings, or the runtime is corrupt. -fail_compilation/verifyhookexist.d(41): Error: `object.__switch_error` not found. The current runtime does not support generating assert messages, or the runtime is corrupt. +fail_compilation/verifyhookexist.d(34): Error: `object.__ArrayCast` not found. The current runtime does not support casting array of structs, or the runtime is corrupt. + return cast(MyStruct[])arr; + ^ +fail_compilation/verifyhookexist.d(40): Error: `object.__equals` not found. The current runtime does not support equal checks on arrays, or the runtime is corrupt. + bool a = arrA[] == arrB[]; + ^ +fail_compilation/verifyhookexist.d(41): Error: `object.__cmp` not found. The current runtime does not support comparing arrays, or the runtime is corrupt. + bool b = arrA < arrB; + ^ +fail_compilation/verifyhookexist.d(45): Error: `object._d_assert_fail` not found. The current runtime does not support generating assert messages, or the runtime is corrupt. + assert(x == y); + ^ +fail_compilation/verifyhookexist.d(48): Error: `object.__switch` not found. The current runtime does not support switch cases on strings, or the runtime is corrupt. + switch ("") { + ^ +fail_compilation/verifyhookexist.d(53): Error: `object.__switch_error` not found. The current runtime does not support generating assert messages, or the runtime is corrupt. + final switch (0) { + ^ --- */ diff --git a/compiler/test/fail_compilation/verrors0.d b/compiler/test/fail_compilation/verrors0.d index 23cd7acb234f..0cd182065ee6 100644 --- a/compiler/test/fail_compilation/verrors0.d +++ b/compiler/test/fail_compilation/verrors0.d @@ -32,29 +32,79 @@ void main() TEST_OUTPUT: --- fail_compilation/verrors0.d(5): Error: undefined identifier `T` + { T a; } // 1 + ^ fail_compilation/verrors0.d(6): Error: undefined identifier `T` + { T a; } // 2 + ^ fail_compilation/verrors0.d(7): Error: undefined identifier `T` + { T a; } // 3 + ^ fail_compilation/verrors0.d(8): Error: undefined identifier `T` + { T a; } // 4 + ^ fail_compilation/verrors0.d(9): Error: undefined identifier `T` + { T a; } // 5 + ^ fail_compilation/verrors0.d(10): Error: undefined identifier `T` + { T a; } // 6 + ^ fail_compilation/verrors0.d(11): Error: undefined identifier `T` + { T a; } // 7 + ^ fail_compilation/verrors0.d(12): Error: undefined identifier `T` + { T a; } // 8 + ^ fail_compilation/verrors0.d(13): Error: undefined identifier `T` + { T a; } // 9 + ^ fail_compilation/verrors0.d(14): Error: undefined identifier `T` + { T a; } // 10 + ^ fail_compilation/verrors0.d(15): Error: undefined identifier `T` + { T a; } // 11 + ^ fail_compilation/verrors0.d(16): Error: undefined identifier `T` + { T a; } // 12 + ^ fail_compilation/verrors0.d(17): Error: undefined identifier `T` + { T a; } // 13 + ^ fail_compilation/verrors0.d(18): Error: undefined identifier `T` + { T a; } // 14 + ^ fail_compilation/verrors0.d(19): Error: undefined identifier `T` + { T a; } // 15 + ^ fail_compilation/verrors0.d(20): Error: undefined identifier `T` + { T a; } // 16 + ^ fail_compilation/verrors0.d(21): Error: undefined identifier `T` + { T a; } // 17 + ^ fail_compilation/verrors0.d(22): Error: undefined identifier `T` + { T a; } // 18 + ^ fail_compilation/verrors0.d(23): Error: undefined identifier `T` + { T a; } // 19 + ^ fail_compilation/verrors0.d(24): Error: undefined identifier `T` + { T a; } // 20 (default limit) + ^ fail_compilation/verrors0.d(25): Error: undefined identifier `T` + { T a; } // 21 + ^ fail_compilation/verrors0.d(26): Error: undefined identifier `T` + { T a; } // 22 + ^ fail_compilation/verrors0.d(27): Error: undefined identifier `T` + { T a; } // 23 + ^ fail_compilation/verrors0.d(28): Error: undefined identifier `T` + { T a; } // 24 + ^ fail_compilation/verrors0.d(29): Error: undefined identifier `T` + { T a; } // 25 + ^ --- */ diff --git a/compiler/test/fail_compilation/verrors5.d b/compiler/test/fail_compilation/verrors5.d index 74068610add8..5e44da69625f 100644 --- a/compiler/test/fail_compilation/verrors5.d +++ b/compiler/test/fail_compilation/verrors5.d @@ -32,10 +32,20 @@ void main() TEST_OUTPUT: --- fail_compilation/verrors5.d(5): Error: undefined identifier `T` + { T a; } // 1 + ^ fail_compilation/verrors5.d(6): Error: undefined identifier `T` + { T a; } // 2 + ^ fail_compilation/verrors5.d(7): Error: undefined identifier `T` + { T a; } // 3 + ^ fail_compilation/verrors5.d(8): Error: undefined identifier `T` + { T a; } // 4 + ^ fail_compilation/verrors5.d(9): Error: undefined identifier `T` + { T a; } // 5 + ^ error limit (5) reached, use `-verrors=0` to show all --- */ diff --git a/compiler/test/fail_compilation/void_cat.d b/compiler/test/fail_compilation/void_cat.d index da92d3b75b4c..ab68d9063f03 100644 --- a/compiler/test/fail_compilation/void_cat.d +++ b/compiler/test/fail_compilation/void_cat.d @@ -2,10 +2,14 @@ REQUIRED_ARGS: -preview=fixImmutableConv TEST_OUTPUT: --- -fail_compilation/void_cat.d(15): Error: cannot copy `const(void)[]` to `void[]` -fail_compilation/void_cat.d(15): Source data has incompatible type qualifier(s) -fail_compilation/void_cat.d(15): Use `cast(void[])` to force copy -fail_compilation/void_cat.d(19): Error: cannot append type `const(void)[]` to type `void[]` +fail_compilation/void_cat.d(19): Error: cannot copy `const(void)[]` to `void[]` + va[] = va.init ~ b; // a now contains b's data + ^ +fail_compilation/void_cat.d(19): Source data has incompatible type qualifier(s) +fail_compilation/void_cat.d(19): Use `cast(void[])` to force copy +fail_compilation/void_cat.d(23): Error: cannot append type `const(void)[]` to type `void[]` + va ~= vb; // also leaks const pointers into void[] + ^ --- */ diff --git a/compiler/test/fail_compilation/warn13679.d b/compiler/test/fail_compilation/warn13679.d index 229103904978..fba7407d750b 100644 --- a/compiler/test/fail_compilation/warn13679.d +++ b/compiler/test/fail_compilation/warn13679.d @@ -3,7 +3,9 @@ /* TEST_OUTPUT: --- -fail_compilation/warn13679.d(13): Error: cannot use `foreach_reverse` with an associative array +fail_compilation/warn13679.d(15): Error: cannot use `foreach_reverse` with an associative array + foreach_reverse(k, v; aa) {} + ^ --- */ diff --git a/compiler/test/fail_compilation/widechars.d b/compiler/test/fail_compilation/widechars.d index ccfc47aa817f..792188fa3612 100644 --- a/compiler/test/fail_compilation/widechars.d +++ b/compiler/test/fail_compilation/widechars.d @@ -3,7 +3,9 @@ DISABLED: win32 win64 TEST_OUTPUT: --- -fail_compilation/widechars.d(10): Error: undefined identifier `wchar_t`, did you mean `dchar`? +fail_compilation/widechars.d(12): Error: undefined identifier `wchar_t`, did you mean `dchar`? +wchar_t x; + ^ --- */ diff --git a/compiler/test/runnable/future.d b/compiler/test/runnable/future.d index e0ef46639540..bc14e06da810 100644 --- a/compiler/test/runnable/future.d +++ b/compiler/test/runnable/future.d @@ -1,8 +1,12 @@ /* PERMUTE_ARGS: TEST_OUTPUT: --- -runnable/future.d(16): Deprecation: method `future.B.msg` implicitly overrides `@__future` base class method; rename the former -runnable/future.d(11): base method `future.A.msg` defined here +runnable/future.d(20): Deprecation: method `future.B.msg` implicitly overrides `@__future` base class method; rename the former + char msg() { return 'b'; } + ^ +runnable/future.d(15): base method `future.A.msg` defined here + @__future char msg() { return 'a'; } + ^ --- */ diff --git a/compiler/test/runnable/implicit.d b/compiler/test/runnable/implicit.d index 75b992c5c1c2..8abc2cd0f629 100644 --- a/compiler/test/runnable/implicit.d +++ b/compiler/test/runnable/implicit.d @@ -1,8 +1,12 @@ /* TEST_OUTPUT: --- -runnable/implicit.d(162): Deprecation: slice of static array temporary returned by `pureMaker3c()` assigned to longer lived variable `z1` -runnable/implicit.d(163): Deprecation: slice of static array temporary returned by `pureMaker3c()` assigned to longer lived variable `z2` +runnable/implicit.d(166): Deprecation: slice of static array temporary returned by `pureMaker3c()` assigned to longer lived variable `z1` + immutable z1 = pureMaker3c()[]; + ^ +runnable/implicit.d(167): Deprecation: slice of static array temporary returned by `pureMaker3c()` assigned to longer lived variable `z2` + immutable z2 = pureMaker3c()[0..2]; + ^ --- RUN_OUTPUT: diff --git a/compiler/test/runnable/lexer.d b/compiler/test/runnable/lexer.d index c6ca550011ba..89e0d2083040 100644 --- a/compiler/test/runnable/lexer.d +++ b/compiler/test/runnable/lexer.d @@ -2,8 +2,12 @@ /* TEST_OUTPUT: --- -runnable/lexer.d(86): Deprecation: `version( )` is deprecated, use version identifiers instead -runnable/lexer.d(87): Deprecation: `debug( )` is deprecated, use debug identifiers instead +runnable/lexer.d(90): Deprecation: `version( )` is deprecated, use version identifiers instead +version(9223372036854775807){} + ^ +runnable/lexer.d(91): Deprecation: `debug( )` is deprecated, use debug identifiers instead +debug(9223372036854775807){} + ^ --- */ diff --git a/compiler/test/runnable/template10.d b/compiler/test/runnable/template10.d index e0bec9be7817..a4560189bebe 100644 --- a/compiler/test/runnable/template10.d +++ b/compiler/test/runnable/template10.d @@ -2,59 +2,165 @@ // REQUIRED_ARGS: -verrors=0 /* TEST_OUTPUT: --- -runnable/template10.d(89): Deprecation: function `template10.test1b.f0.f!(a).f` function requires a dual-context, which is deprecated -runnable/template10.d(94): instantiated from here: `f!(a)` -runnable/template10.d(105): Deprecation: function `template10.test1c.f0.f1.v!(c).sum` function requires a dual-context, which is deprecated -runnable/template10.d(122): instantiated from here: `v!(c)` -runnable/template10.d(170): Deprecation: function `template10.test3.exec!(set).exec` function requires a dual-context, which is deprecated -runnable/template10.d(182): instantiated from here: `exec!(set)` -runnable/template10.d(201): Deprecation: function `template10.get4i.inner!(a).inner` function requires a dual-context, which is deprecated -runnable/template10.d(238): instantiated from here: `inner!(a)` -runnable/template10.d(196): Deprecation: function `template10.test4.add!(a).add` function requires a dual-context, which is deprecated -runnable/template10.d(245): instantiated from here: `add!(a)` -runnable/template10.d(211): Deprecation: function `template10.test4i!(I).test4i.add2!(b).add2` function requires a dual-context, which is deprecated -runnable/template10.d(231): instantiated from here: `add2!(b)` -runnable/template10.d(251): instantiated from here: `test4i!(I)` -runnable/template10.d(201): Deprecation: function `template10.test4.inner!(a).inner` function requires a dual-context, which is deprecated -runnable/template10.d(256): instantiated from here: `inner!(a)` -runnable/template10.d(266): Deprecation: function `template10.test5.add!(fun).add` function requires a dual-context, which is deprecated -runnable/template10.d(282): instantiated from here: `add!(fun)` -runnable/template10.d(271): Deprecation: function `template10.test5.add!(fun).add.exec2!(fun, add).exec2` function requires a dual-context, which is deprecated -runnable/template10.d(269): instantiated from here: `exec2!(fun, add)` -runnable/template10.d(282): instantiated from here: `add!(fun)` -runnable/template10.d(299): Deprecation: function `template10.test6a.makeR!(j).makeR` function requires a dual-context, which is deprecated -runnable/template10.d(321): instantiated from here: `makeR!(j)` -runnable/template10.d(307): Deprecation: function `template10.test6a.inc!(k).inc` function requires a dual-context, which is deprecated -runnable/template10.d(322): instantiated from here: `inc!(k)` -runnable/template10.d(333): Deprecation: function `template10.test6b.f0!(a).f0` function requires a dual-context, which is deprecated -runnable/template10.d(358): instantiated from here: `f0!(a)` -runnable/template10.d(366): Deprecation: function `template10.test6c.f0.exec!(f).exec` function requires a dual-context, which is deprecated -runnable/template10.d(385): instantiated from here: `exec!(f)` -runnable/template10.d(410): Deprecation: function `template10.test7.C!(c).sum` function requires a dual-context, which is deprecated -runnable/template10.d(437): instantiated from here: `C!(c)` -runnable/template10.d(464): Deprecation: constructor `template10.test8.__ctor!(a).this` function requires a dual-context, which is deprecated -runnable/template10.d(484): instantiated from here: `__ctor!(a)` -runnable/template10.d(468): Deprecation: function `template10.test8.add!(b).add` function requires a dual-context, which is deprecated -runnable/template10.d(486): instantiated from here: `add!(b)` -runnable/template10.d(446): Deprecation: function `template10.test8.sub!(b).sub` function requires a dual-context, which is deprecated -runnable/template10.d(487): instantiated from here: `sub!(b)` -runnable/template10.d(528): Deprecation: function `template10.test10.add!(fun).add` function requires a dual-context, which is deprecated -runnable/template10.d(544): instantiated from here: `add!(fun)` -runnable/template10.d(533): Deprecation: function `template10.test10.add!(fun).add.exec2!(fun, add).exec2` function requires a dual-context, which is deprecated -runnable/template10.d(531): instantiated from here: `exec2!(fun, add)` -runnable/template10.d(544): instantiated from here: `add!(fun)` -runnable/template10.d(552): Deprecation: function `template10.test11.getVal!(a).getVal` function requires a dual-context, which is deprecated -runnable/template10.d(574): instantiated from here: `getVal!(a)` -runnable/template10.d(556): Deprecation: function `template10.test11.getRef!(a).getRef` function requires a dual-context, which is deprecated -runnable/template10.d(578): instantiated from here: `getRef!(a)` -runnable/template10.d(588): Deprecation: function `template10.N12.sum!(n).sum` function requires a dual-context, which is deprecated -runnable/template10.d(624): instantiated from here: `sum!(n)` -runnable/template10.d(593): Deprecation: function `template10.N12.inner!(n).inner` function requires a dual-context, which is deprecated -runnable/template10.d(630): instantiated from here: `inner!(n)` -runnable/template10.d(692): Deprecation: function `template10.test13a.getI!(a).getI` function requires a dual-context, which is deprecated -runnable/template10.d(719): instantiated from here: `getI!(a)` -runnable/template10.d(731): Deprecation: function `template10.test13b.getC.C.fun!(n).fun` function requires a dual-context, which is deprecated -runnable/template10.d(741): instantiated from here: `fun!(n)` +runnable/template10.d(195): Deprecation: function `template10.test1b.f0.f!(a).f` function requires a dual-context, which is deprecated + auto f(alias a)() { return a; } + ^ +runnable/template10.d(200): instantiated from here: `f!(a)` + return f!a(); + ^ +runnable/template10.d(211): Deprecation: function `template10.test1c.f0.f1.v!(c).sum` function requires a dual-context, which is deprecated + auto sum() + ^ +runnable/template10.d(228): instantiated from here: `v!(c)` + auto r = t1c!a.u!b.v!c.sum(); + ^ +runnable/template10.d(276): Deprecation: function `template10.test3.exec!(set).exec` function requires a dual-context, which is deprecated + auto exec(alias f)() + ^ +runnable/template10.d(288): instantiated from here: `exec!(set)` + S3(10).exec!(set!a)(); + ^ +runnable/template10.d(307): Deprecation: function `template10.get4i.inner!(a).inner` function requires a dual-context, which is deprecated + auto inner(alias a)(int i) + ^ +runnable/template10.d(344): instantiated from here: `inner!(a)` + return new S4(5).inner!a(6); + ^ +runnable/template10.d(302): Deprecation: function `template10.test4.add!(a).add` function requires a dual-context, which is deprecated + auto add(alias a)(int b) + ^ +runnable/template10.d(351): instantiated from here: `add!(a)` + assert(S4(4).add!a(10) == 4+1+10); + ^ +runnable/template10.d(317): Deprecation: function `template10.test4i!(I).test4i.add2!(b).add2` function requires a dual-context, which is deprecated + auto add2(alias c)(int b) + ^ +runnable/template10.d(337): instantiated from here: `add2!(b)` + assert(i.add2!b(7) == 5+1+6+7+2); + ^ +runnable/template10.d(357): instantiated from here: `test4i!(I)` + test4i(i); + ^ +runnable/template10.d(307): Deprecation: function `template10.test4.inner!(a).inner` function requires a dual-context, which is deprecated + auto inner(alias a)(int i) + ^ +runnable/template10.d(362): instantiated from here: `inner!(a)` + alias T0 = typeof(o0.inner!a(1)); + ^ +runnable/template10.d(372): Deprecation: function `template10.test5.add!(fun).add` function requires a dual-context, which is deprecated + auto add(alias f)(int a) + ^ +runnable/template10.d(388): instantiated from here: `add!(fun)` + assert(o.add!fun(20) == 1+10+20); + ^ +runnable/template10.d(377): Deprecation: function `template10.test5.add!(fun).add.exec2!(fun, add).exec2` function requires a dual-context, which is deprecated + auto exec2(alias f, alias g)() + ^ +runnable/template10.d(375): instantiated from here: `exec2!(fun, add)` + return exec2!(f, add)(); + ^ +runnable/template10.d(388): instantiated from here: `add!(fun)` + assert(o.add!fun(20) == 1+10+20); + ^ +runnable/template10.d(405): Deprecation: function `template10.test6a.makeR!(j).makeR` function requires a dual-context, which is deprecated + auto makeR(alias a)() + ^ +runnable/template10.d(427): instantiated from here: `makeR!(j)` + auto r = a.makeR!j(); + ^ +runnable/template10.d(413): Deprecation: function `template10.test6a.inc!(k).inc` function requires a dual-context, which is deprecated + final auto inc(alias v)() + ^ +runnable/template10.d(428): instantiated from here: `inc!(k)` + r.inc!k(); // inlined + ^ +runnable/template10.d(439): Deprecation: function `template10.test6b.f0!(a).f0` function requires a dual-context, which is deprecated + auto f0(alias a)() + ^ +runnable/template10.d(464): instantiated from here: `f0!(a)` + auto t = s.f0!a(); + ^ +runnable/template10.d(472): Deprecation: function `template10.test6c.f0.exec!(f).exec` function requires a dual-context, which is deprecated + auto exec(alias f)() + ^ +runnable/template10.d(491): instantiated from here: `exec!(f)` + s.exec!f(); + ^ +runnable/template10.d(516): Deprecation: function `template10.test7.C!(c).sum` function requires a dual-context, which is deprecated + auto sum() + ^ +runnable/template10.d(543): instantiated from here: `C!(c)` + assert(new C7().A!a.B!b.C!c.sum() == 1+2+3+10); + ^ +runnable/template10.d(570): Deprecation: constructor `template10.test8.__ctor!(a).this` function requires a dual-context, which is deprecated + this(alias i)() + ^ +runnable/template10.d(590): instantiated from here: `__ctor!(a)` + o.__ctor!a; + ^ +runnable/template10.d(574): Deprecation: function `template10.test8.add!(b).add` function requires a dual-context, which is deprecated + auto add(alias v)() + ^ +runnable/template10.d(592): instantiated from here: `add!(b)` + assert(o.add!b == 4+2); + ^ +runnable/template10.d(552): Deprecation: function `template10.test8.sub!(b).sub` function requires a dual-context, which is deprecated + int sub(alias v)() + ^ +runnable/template10.d(593): instantiated from here: `sub!(b)` + assert(o.sub!b == 4-2); + ^ +runnable/template10.d(634): Deprecation: function `template10.test10.add!(fun).add` function requires a dual-context, which is deprecated + auto add(alias f)(int a) + ^ +runnable/template10.d(650): instantiated from here: `add!(fun)` + assert(o.add!fun(20) == 1+10+20); + ^ +runnable/template10.d(639): Deprecation: function `template10.test10.add!(fun).add.exec2!(fun, add).exec2` function requires a dual-context, which is deprecated + auto exec2(alias f, alias g)() + ^ +runnable/template10.d(637): instantiated from here: `exec2!(fun, add)` + return exec2!(f, add)(); + ^ +runnable/template10.d(650): instantiated from here: `add!(fun)` + assert(o.add!fun(20) == 1+10+20); + ^ +runnable/template10.d(658): Deprecation: function `template10.test11.getVal!(a).getVal` function requires a dual-context, which is deprecated + S11 getVal(alias a)() + ^ +runnable/template10.d(680): instantiated from here: `getVal!(a)` + ++s.getVal!a().m; + ^ +runnable/template10.d(662): Deprecation: function `template10.test11.getRef!(a).getRef` function requires a dual-context, which is deprecated + ref getRef(alias a)() + ^ +runnable/template10.d(684): instantiated from here: `getRef!(a)` + ++s.getRef!a().m; + ^ +runnable/template10.d(694): Deprecation: function `template10.N12.sum!(n).sum` function requires a dual-context, which is deprecated + auto sum(alias a)() + ^ +runnable/template10.d(730): instantiated from here: `sum!(n)` + return o.sum!n(); + ^ +runnable/template10.d(699): Deprecation: function `template10.N12.inner!(n).inner` function requires a dual-context, which is deprecated + auto inner(alias a)() + ^ +runnable/template10.d(736): instantiated from here: `inner!(n)` + return o.inner!n().sum(); + ^ +runnable/template10.d(798): Deprecation: function `template10.test13a.getI!(a).getI` function requires a dual-context, which is deprecated + auto getI(alias a)() + ^ +runnable/template10.d(825): instantiated from here: `getI!(a)` + auto i = c.getI!a(); // segfault + ^ +runnable/template10.d(837): Deprecation: function `template10.test13b.getC.C.fun!(n).fun` function requires a dual-context, which is deprecated + auto fun(alias a)() + ^ +runnable/template10.d(847): instantiated from here: `fun!(n)` + return fun!n(); + ^ --- */ diff --git a/compiler/test/runnable/test8.d b/compiler/test/runnable/test8.d index f10076223d59..c058308bafb1 100644 --- a/compiler/test/runnable/test8.d +++ b/compiler/test/runnable/test8.d @@ -1,7 +1,9 @@ /* TEST_OUTPUT: --- -runnable/test8.d(261): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference +runnable/test8.d(263): Deprecation: identity comparison of static arrays implicitly coerces them to slices, which are compared by reference + assert(a !is b); + ^ --- */