From: Jean Privat Date: Mon, 18 Feb 2019 15:29:01 +0000 (-0500) Subject: tests/base_autocast: workaround a gcc bug X-Git-Url: http://nitlanguage.org tests/base_autocast: workaround a gcc bug Versions of gcc between bellow 6.4.1 and 7.3.1 failed to compile correctly the generated C. So this changes the Nit, so the C can be compiled with buggy gcc versions. Cf https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85244 for details Signed-off-by: Jean Privat --- diff --git a/tests/base_autocast.nit b/tests/base_autocast.nit index f733ce1..b3bb748 100644 --- a/tests/base_autocast.nit +++ b/tests/base_autocast.nit @@ -17,9 +17,13 @@ import kernel class G[E] type V: nullable Object - fun foo + fun foo1 do bar(1) + end + + fun foo2 + do baz(2) end @@ -36,6 +40,9 @@ class I redef type V: Char end -(new G[Object]).foo -#alt1#(new H).foo -#alt2#(new I).foo +(new G[Object]).foo1 +(new G[Object]).foo2 +#alt1#(new H).foo1 +#alt1#(new H).foo2 +#alt2#(new I).foo1 +#alt2#(new I).foo2 diff --git a/tests/sav/base_autocast_alt2.res b/tests/sav/base_autocast_alt2.res index 8788ee7..8822457 100644 --- a/tests/sav/base_autocast_alt2.res +++ b/tests/sav/base_autocast_alt2.res @@ -1,4 +1,4 @@ -Runtime error: Cast failed. Expected `V`, got `Int` (alt/base_autocast_alt2.nit:23) +Runtime error: Cast failed. Expected `V`, got `Int` (alt/base_autocast_alt2.nit:27) 1 2 1