-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgen, checker: fix array fixed return type for interface methods (vla…
- Loading branch information
Showing
4 changed files
with
52 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module main | ||
|
||
pub type Mat4 = [16]f32 | ||
|
||
interface IGameObject { | ||
world_transform() Mat4 | ||
} | ||
|
||
struct Foo implements IGameObject { | ||
} | ||
|
||
fn (f Foo) world_transform() Mat4 { | ||
return Mat4{} | ||
} | ||
|
||
fn test_main() { | ||
t := Foo{} | ||
a := t.world_transform() | ||
b := Mat4{} | ||
assert a == b | ||
} |