Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors, invalid casts #2

Open
susnux opened this issue Dec 7, 2015 · 3 comments
Open

Build errors, invalid casts #2

susnux opened this issue Dec 7, 2015 · 3 comments
Labels

Comments

@susnux
Copy link

susnux commented Dec 7, 2015

I try to compile this project for your updated version of abagames-tumiki-fighters.
But when trying to build it I get following error with ldc2 (0.16.1):

/usr/bin/ldc2  -wi -I=/home/abuild/rpmbuild/BUILD/BulletML-20141116/src   -of=CMakeFiles/bulletml.dir/runner.d.o -c /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d
[   50s] /usr/include/d/std/variant.d(2230): Error: cannot implicitly convert expression (variant.peek()) of type const(Bullet)* to Bullet*
[   50s] /usr/include/d/std/variant.d(2230): Error: cannot implicitly convert expression (variant.peek()) of type const(Action)* to Action*
[   50s] /usr/include/d/std/variant.d(2230): Error: cannot implicitly convert expression (variant.peek()) of type const(Fire)* to Fire*
[   50s] /usr/include/d/std/variant.d(2087): Error: template instance bulletml.runner.GroupRunner.this.visitImpl!(false, const(VariantN!(152LU, Bullet, Action, Fire)), delegate (Action action)
[   50s] {
[   50s] this.runners ~= cast(BulletMLRunner)new ActionRunner(manager, orientation, action);
[   50s] }
[   50s] , function ()
[   50s] {
[   50s] }
[   50s] ) error instantiating
[   50s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(93):        instantiated from here: tryVisit!(const(VariantN!(152LU, Bullet, Action, Fire)))
[   50s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(344): Warning: statement is not reachable
[   50s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(344): Warning: statement is not reachable
[   50s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(507): Warning: statement is not reachable
[   50s] src/bulletml/CMakeFiles/bulletml.dir/build.make:87: recipe for target 'src/bulletml/CMakeFiles/bulletml.dir/runner.d.o' failed
@susnux
Copy link
Author

susnux commented Dec 7, 2015

With dmd (2) it looks like this:

/usr/bin/dmd  /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d -wi -I/home/abuild/rpmbuild/BUILD/BulletML-20141116/src    -c -ofCMakeFiles/bulletml.dir/runner.d.o
[   32s] /usr/include/dlang/dmd-2.069.2/phobos/std/variant.d(2256): Error: function literal __lambda3 (Action action) is not callable using argument types (const(Action))
[   32s] /usr/include/dlang/dmd-2.069.2/phobos/std/variant.d(2256): Error: cannot return non-void from void function
[   32s] /usr/include/dlang/dmd-2.069.2/phobos/std/variant.d(2095): Error: template instance bulletml.runner.GroupRunner.this.visitImpl!(false, const(VariantN!(76u, Bullet, Action, Fire)), delegate (Action action)
[   32s] {
[   32s] this.runners ~= cast(BulletMLRunner)new ActionRunner(manager, orientation, action);
[   32s] }
[   32s] , function ()
[   32s] {
[   32s] }
[   32s] ) error instantiating
[   32s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(93):        instantiated from here: tryVisit!(const(VariantN!(76u, Bullet, Action, Fire)))
[   32s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(344): Warning: statement is not reachable
[   32s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(344): Warning: statement is not reachable
[   32s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/runner.d(507): Warning: statement is not reachable
[   32s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/parser.d(7): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD
[   32s] /home/abuild/rpmbuild/BUILD/BulletML-20141116/src/bulletml/parser.d(7): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD

@mathstuf
Copy link
Owner

mathstuf commented Dec 9, 2015

Regression? It works with gdc 2.065, but that line in std.variant hasn't changed. Did things get stricter?

@mathstuf mathstuf added the bug label Dec 9, 2015
@mathstuf
Copy link
Owner

mathstuf commented Dec 9, 2015

Also, Tumiki Fighters needs more work. Help greatly appreciated though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants