Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix #60, cxx casts + test case
- Loading branch information
Showing
6 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(include <iostream>) | ||
(include <typeinfo>) | ||
(using-namespace std) | ||
|
||
(class A () | ||
(decl ((int a)))) | ||
|
||
(class B ((public A)) | ||
(decl ((int b)))) | ||
|
||
(function main () -> int | ||
(decl ((int foo = 0) | ||
(const int* bar = (const-cast const int* &foo)) | ||
(float foo2 = 3.14) | ||
(B* foo3 = (new B)) | ||
(A* foo4 = (dynamic-cast A* foo3))) | ||
(set (dref (const-cast int* bar)) 1) | ||
(<< cout foo endl) | ||
(<< cout (static-cast int foo2) endl) | ||
(<< cout (oref (typeid foo3) (name)) endl) | ||
(<< cout (oref (typeid foo4) (name)) endl) | ||
(return 0))) | ||
|
||
;;## 1 | ||
;;## 3 | ||
;;## P1B | ||
;;## P1A |
File renamed without changes.