Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgen: fix regression with unalised naming conflict with C interop (#1…
- Loading branch information
Showing
6 changed files
with
35 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module sub | ||
|
||
import sub.foo.c | ||
|
||
[typedef] | ||
struct C.sub_foo { | ||
a int | ||
} | ||
|
||
pub type Foo = C.sub_foo |
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,5 @@ | ||
typedef struct sub_foo sub_foo; | ||
|
||
struct sub_foo { | ||
int a; | ||
}; |
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,7 @@ | ||
module c | ||
|
||
pub const used_import = 1 | ||
|
||
#flag -I @VMODROOT | ||
|
||
#include "foo.h" |
Empty file.
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,7 @@ | ||
import sub | ||
|
||
fn test_vmain() { | ||
sub_foo := &sub.Foo{} | ||
|
||
dump(sub_foo) | ||
} |