Skip to content

Commit

Permalink
func lit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
deelawn committed Aug 30, 2024
1 parent df764cd commit af12ca1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gnovm/tests/files/addressable_8.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

func main() {
f := func() { println("Hello, World!") }
println(&f)
}

// Output:
// &( func()())
8 changes: 8 additions & 0 deletions gnovm/tests/files/addressable_8a_err.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package main

func main() {
_ = &func() { println("Hello, World!") }
}

// Error:
// main/files/addressable_8a_err.gno:4:6: cannot take address of func func(){ (const (println func(xs ...interface{})()))((const ("Hello, World!" string))) }

0 comments on commit af12ca1

Please sign in to comment.