Skip to content

Commit

Permalink
Merge pull request #40281 from dotnet/merges/release/dev16.4-to-relea…
Browse files Browse the repository at this point in the history
…se/dev16.4-vs-deps

Merge release/dev16.4 to release/dev16.4-vs-deps
  • Loading branch information
msftbot[bot] committed Dec 10, 2019
2 parents 52d275c + 97ff81a commit c4e5d13
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3607,7 +3607,7 @@ private ImmutableArray<VisitArgumentResult> VisitArguments(
}
}

if (method is object && (method.FlowAnalysisAnnotations & FlowAnalysisAnnotations.DoesNotReturn) == FlowAnalysisAnnotations.DoesNotReturn)
if (!IsAnalyzingAttribute && method is object && (method.FlowAnalysisAnnotations & FlowAnalysisAnnotations.DoesNotReturn) == FlowAnalysisAnnotations.DoesNotReturn)
{
SetUnreachable();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7235,6 +7235,31 @@ class C { }
);
}

[Fact, WorkItem(40136, "https://github.com/dotnet/roslyn/issues/40136")]
public void SelfReferencingAttribute()
{
var source = @"
using System;

[AttributeUsage(AttributeTargets.All)]
[ExplicitCrossPackageInternal(ExplicitCrossPackageInternalAttribute.s)]
internal sealed class ExplicitCrossPackageInternalAttribute : Attribute
{
internal const string s = """";

[ExplicitCrossPackageInternal(s)]
internal ExplicitCrossPackageInternalAttribute([ExplicitCrossPackageInternal(s)] string prop)
{
}

[return: ExplicitCrossPackageInternal(s)]
[ExplicitCrossPackageInternal(s)]
internal void Method() { }
}";
var comp = CreateNullableCompilation(source);
comp.VerifyDiagnostics();
}

[Fact]
public void NullableAndConditionalOperators()
{
Expand Down

0 comments on commit c4e5d13

Please sign in to comment.