Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ public IMember GetValueFromClassCtor(IPythonClassType cls, CallExpression expr)
var args = ArgumentSet.Empty;
var init = cls.GetMember<IPythonFunctionType>(@"__init__");
if (init != null) {
var a = new ArgumentSet(init, 0, new PythonInstance(cls), expr, Module, this);
if (a.Errors.Count > 0) {
// AddDiagnostics(Module.Uri, a.Errors);
using (OpenScope(cls.DeclaringModule, cls.ClassDefinition, out _)) {
var a = new ArgumentSet(init, 0, new PythonInstance(cls), expr, Module, this);
if (a.Errors.Count > 0) {
// AddDiagnostics(Module.Uri, a.Errors);
}
args = a.Evaluate();
}
args = a.Evaluate();
}
return cls.CreateInstance(cls.Name, args);
}
Expand Down