Open xiaxinmeng opened 1 year ago
I can confirm this bug in gpython master.
This is due to an unchecked type assertion here
https://github.com/go-python/gpython/blob/6f8e06a4660709ab44398d8b1a18738aa407b1c3/vm/eval.go#L1445
Looks easy to fix if you want to have a go @xiaxinmeng ?
In the following, we define a class, in this class, we define a decorated function with annotated types "str" that is not consistent with "None. Then gpython crashes. We test the example on the online gpython Go/wasm and Gopherjs provided online.
test.py
Output on GO/wasm(https://gpython.org/?wasm):
Output on Gopherjs (https://gpython.org/)