IronLanguages / IronLanguages/ironpython3
Extensible<T> fails on accessing static properties
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
When accessing static properties of T through Extensible<T> (e.g. BigInteger.Zero), a type error is raised. Accessing instance properties (e.g. String.Length) or static fields (e.g. Int32.MaxValue) works fine.
Example:
import clr, System
clr.AddReference('System.Numerics')
bi = System.Numerics.BigInteger(42)
assert bi.IsEven # OK
assert bi.Zero == 0 # OK
class mybig(System.Numerics.BigInteger): pass
ebi = mybig(42)
assert ebi.IsEven # OK
assert ebi.Zero == 0 # TypeError: Zero() takes no arguments (0 given)
This issue is blocking #52.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied Python repro with System.Numerics.BigInteger and the derived mybig type, then trace the Extensible static-property access path. Done means static properties such as BigInteger.Zero work through Extensible without raising a TypeError, while the existing instance-property and static-field behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100