Skip to content

Commit

Permalink
Add test for issue #65 into conv_operators.d.
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour authored and Syniurge committed Mar 12, 2018
1 parent 25edb52 commit 97eecc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/calypso/conv_operators.d
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ void main()

int mul = cast(int) p2i;
p2i = cast(Point!int) p2u;

// Issue #65: https://github.com/Syniurge/Calypso/issues/65
import (C++) B;
B b;
int bx=b.x;
}
7 changes: 7 additions & 0 deletions tests/calypso/conv_operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ Point<_Tp>::operator Point<_Tp2>() const
{
return Point<_Tp2>(_Tp2(x), _Tp2(y));
}

// Issue #65: https://github.com/Syniurge/Calypso/issues/65
struct A { int x; };

struct B : public A {
operator float() const;
};

0 comments on commit 97eecc5

Please sign in to comment.