forked from vlang/v
-
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.
ast, fmt: fix formatting type decl with anon struct (vlang#19356)
- Loading branch information
1 parent
0f63f92
commit 3f1c601
Showing
3 changed files
with
31 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
pub type Unit1 = struct {} | ||
|
||
pub type Unit2 = struct { | ||
name string | ||
age int | ||
} | ||
|
||
pub const unit1 = Unit1{} | ||
|
||
pub const unit2 = Unit2{'bob', 22} | ||
|
||
fn main() { | ||
println(unit1) | ||
println(unit2) | ||
} |