Segmentation fault is caused with pyext mode when a method takes an object of another class as input
Open
- Dominant language
- Python
- Stars
- 16.8k
- Forks
- 603
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 6
Description
Hi, thank you for maintaining this fantastic software.
I found that the following codon code compiled with `-pyext`:
```python
@dataclass(python=True, repr=True)
class Foo:
a: float
@dataclass(python=True, repr=True)
class Bar:
def func(self, foo: Foo):
print(foo)
def func(foo: Foo):
print(foo)
```
can cause segmentation fault by the following Python code
```python
from codon_module import Foo, Bar
Bar().func(Foo())
```
I also found the following code properly works:
```python
from codon_module import Foo, func
func(Foo())
```
Contributor guide
Assessment
This issue has not been assessed yet.