Skip to content

Commit

Permalink
fix: unicode-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-jerry-ye committed Apr 3, 2024
1 parent b256b91 commit 561ea90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
23 changes: 14 additions & 9 deletions examples/unicode_demo/main/main.mbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
fn πŸ˜€(self : Int) {
println(self)
type T😯 Int
fn πŸ˜€(self : T😯) -> Int {
self.0
}

pub enum πŸ˜†πŸ˜† {
A
B
}

fn init {
🀣 := 3
🀣.πŸ˜€()
fn to_string(self: πŸ˜†πŸ˜†) -> String {
match self {
A => "A"
B => "B"
}
}

test {
let 🀣 = T😯::T😯(3)
inspect(🀣.πŸ˜€(), ~content="3")?

let πŸ˜† = πŸ˜†πŸ˜†::A
match πŸ˜† {
A => print("A")
B => print("B")
}
inspect(πŸ˜†, ~content="A")?
}
4 changes: 1 addition & 3 deletions examples/unicode_demo/main/moon.pkg.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"name": "main"
}
{}

0 comments on commit 561ea90

Please sign in to comment.