提交 73c60ead 编写于 作者: C Charles Stoner

Misc.

上级 06fce402
......@@ -1623,8 +1623,11 @@ internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, r
{
base.AddSynthesizedAttributes(moduleBuilder, ref attributes);
AddSynthesizedNonNullTypesAttributeForMember(ref attributes);
bool isAsync = this.IsAsync;
bool isIterator = this.IsIterator;
if (!isAsync && !isIterator)
{
return;
......@@ -1661,8 +1664,6 @@ internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, r
// to have correct stepping behavior during debugging.
AddSynthesizedAttribute(ref attributes, compilation.SynthesizeDebuggerStepThroughAttribute());
}
AddSynthesizedNonNullTypesAttributeForMember(ref attributes);
}
/// <summary>
......
......@@ -39479,18 +39479,20 @@ public void TypeInference_LowerBounds_NestedNullability_Pointers()
static void G(object?* x, object* y)
{
var z = CreatePointer(A.F)/*T:object**/;
F(x, x)/*T:object?*!*/;
F(x, y)/*T:object*!*/;
F(x, z)/*T:object*!*/;
F(y, x)/*T:object*!*/;
F(y, y)/*T:object!*!*/;
F(y, z)/*T:object*!*/;
F(z, x)/*T:object*!*/;
F(z, y)/*T:object*!*/;
F(z, z)/*T:object*!*/;
F(x, x)/*T:object**/;
F(x, y)/*T:object**/;
F(x, z)/*T:object**/;
F(y, x)/*T:object**/;
F(y, y)/*T:object**/;
F(y, z)/*T:object**/;
F(z, x)/*T:object**/;
F(z, y)/*T:object**/;
F(z, z)/*T:object**/;
}
}";
var comp = CreateCompilation(new[] { source }, options: WithNonNullTypesTrue(TestOptions.UnsafeDebugDll), references: new[] { ref0 });
// NullableWalker.VisitCall is currently skipping F(x, y), etc. because
// each BoundCall has errors.
comp.VerifyTypes();
comp.VerifyDiagnostics(
// (4,12): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('T')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册