IronLanguages / IronLanguages/ironpython3
EngineTest.ScenarioInterpreterNestedVariables is failing on .NET Core
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
This is passing on .NET Framework but failing on .NET Core.
ParameterExpression tmp = Expression.Parameter(typeof(object), "tmp");
var body = Expression.Lambda<Func<object>>(
Expression.Block(
Expression.Block(
new[] { tmp },
Expression.Assign(tmp, Expression.Constant(42, typeof(object)))
),
Expression.Block(
new[] { tmp },
tmp
)
)
);
Debug.Assert(body.Compile()() is null);
I'm not sure which runtime is correct. If .NET Framework has the correct behavior then an issue should probably be filed for .NET Core (and Mono?). Note that CompilerHelpers.LightCompile(body)() is null so if .NET Core is correct should we "fix" the light compiler?
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 with EngineTest.ScenarioInterpreterNestedVariables and run the provided expression-tree example on .NET Framework, .NET Core, and Mono if available. Compare those results with CompilerHelpers.LightCompile(body)() and determine which behavior is expected; done means the runtime behavior is resolved and any required follow-up is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100