-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0a040e
commit 3ec7a2e
Showing
54 changed files
with
6,674 additions
and
169 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
28 changes: 28 additions & 0 deletions
28
examples/gno.land/r/demo/tests/crossrealm/crossrealm_struct.gno
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,28 @@ | ||
package crossrealm | ||
|
||
type Bar struct { | ||
A int | ||
} | ||
|
||
var bar *Bar | ||
|
||
// TODO: deprovision this | ||
var Bar2 *Bar = &Bar{A: 22} // exported | ||
|
||
func (b *Bar) String() { | ||
println("b.A: ", b.A) | ||
} | ||
|
||
func SetBar(b *Bar) *Bar { | ||
bar = b | ||
return bar | ||
} | ||
|
||
func ChangeBar() { | ||
Bar2.A += 1 | ||
//println(Bar2.A) | ||
} | ||
|
||
func (b *Bar) ModifyBar() { | ||
b.A += 1 | ||
} |
File renamed without changes.
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
Oops, something went wrong.