Hi;
Hopefully I’m not doing something really stupid here; I really don’t want to waste your time
Polymorphic Copy (from Rosetta Code) fails to compile
gcc -c -I./ -I- ./test_polymorphic_copy.adb
test_polymorphic_copy.adb:29:04: error: “end Clone;” expected
gnatmake: “./test_polymorphic_copy.adb” compilation error
Well, this sounds obvious:
change:
29 end Copier;
to
29 end Clone;
But then I got all kinds of errors:
gcc -c -I./ -I- ./test_polymorphic_copy.adb
test_polymorphic_copy.adb:28:25: error: invalid constraint: type has no discriminant
test_polymorphic_copy.adb:28:25: error: if qualified expression was meant, use apostrophe
test_polymorphic_copy.adb:46:30: error: invalid use of subtype mark in expression or call
test_polymorphic_copy.adb:47:30: error: invalid use of subtype mark in expression or call
gnatmake: “./test_polymorphic_copy.adb” compilation error
So, maybe not so obvious what went wrong…
Thanks,
Retired_Build_Engineer