Skip to content

Commit 3a3aa33

Browse files
committed
Add resource reference tracking
1 parent b358a92 commit 3a3aa33

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

runtime/ft_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ access(all) contract interface FungibleToken {
234234
235235
/// createEmptyVault allows any user to create a new Vault that has a zero balance
236236
///
237-
access(all) fun createEmptyVault(vaultType: Type): @{FungibleToken.Vault} {
237+
access(all) fun createEmptyVault(): @{FungibleToken.Vault} {
238238
post {
239-
result.getType() == vaultType: "The returned vault does not match the desired type"
239+
// result.getType() == vaultType: "The returned vault does not match the desired type"
240240
result.balance == 0.0: "The newly created Vault must have zero balance"
241241
}
242242
}
@@ -388,7 +388,7 @@ access(all) contract FlowToken: FungibleToken {
388388
// and store the returned Vault in their storage in order to allow their
389389
// account to be able to receive deposits of this token type.
390390
//
391-
access(all) fun createEmptyVault(vaultType: Type): @FlowToken.Vault {
391+
access(all) fun createEmptyVault(): @FlowToken.Vault {
392392
return <-create Vault(balance: 0.0)
393393
}
394394

runtime/runtime.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ func (r *interpreterRuntime) Recover(onError func(Error), location Location, cod
227227
return
228228
}
229229

230-
err := getWrappedError(recovered, location, codesAndPrograms)
230+
err := GetWrappedError(recovered, location, codesAndPrograms)
231231
onError(err)
232232
}
233233

234-
func getWrappedError(recovered any, location Location, codesAndPrograms CodesAndPrograms) Error {
234+
func GetWrappedError(recovered any, location Location, codesAndPrograms CodesAndPrograms) Error {
235235
switch recovered := recovered.(type) {
236236

237237
// If the error is already a `runtime.Error`, then avoid redundant wrapping.

0 commit comments

Comments
 (0)