-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(go): panic on callback: using *<interface> as <interface>
The callback handling logic was incorrectly handling "pure" interface parameters. The reflection piece would create a new argument value in preparation for the callback, however for interfaces, it would leave the pointer to the interface type (as returned by `reflect.New`) instead of indirecting to the interface itself as appropriate. Fixes #2793
- Loading branch information
1 parent
b40ba5d
commit d0dd009
Showing
3 changed files
with
25 additions
and
1 deletion.
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
13 changes: 13 additions & 0 deletions
13
packages/@jsii/go-runtime-test/project/internal/bellRinger/bellRinger.go
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,13 @@ | ||
package bellRinger | ||
|
||
import "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" | ||
|
||
func New() jsiicalc.IBellRinger { | ||
return &ringer{} | ||
} | ||
|
||
type ringer struct {} | ||
|
||
func (r *ringer) YourTurn(bell jsiicalc.IBell) { | ||
bell.Ring() | ||
} |
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