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 <jean@pryen.org>
class G[E]
type V: nullable Object
- fun foo
+ fun foo1
do
bar(1)
+ end
+
+ fun foo2
+ do
baz(2)
end
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
-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