-
Notifications
You must be signed in to change notification settings - Fork 146
[Code Origin] DEBUG-3935 Fix type handle mismatch when resolving attribute type #6994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Datadog ReportAll test runs ✅ 2 Total Test Services: 0 Failed, 2 Passed Test Services
|
06fc728
to
8664e66
Compare
8664e66
to
4642854
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6994) - mean (69ms) : 64, 74
. : milestone, 69,
master - mean (68ms) : 65, 70
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (6994) - mean (1,018ms) : 989, 1047
. : milestone, 1018,
master - mean (1,006ms) : 983, 1029
. : milestone, 1006,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6994) - mean (103ms) : 100, 106
. : milestone, 103,
master - mean (102ms) : 100, 105
. : milestone, 102,
section CallTarget+Inlining+NGEN
This PR (6994) - mean (695ms) : 672, 718
. : milestone, 695,
master - mean (700ms) : 685, 715
. : milestone, 700,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6994) - mean (89ms) : 87, 91
. : milestone, 89,
master - mean (90ms) : 88, 92
. : milestone, 90,
section CallTarget+Inlining+NGEN
This PR (6994) - mean (656ms) : 636, 677
. : milestone, 656,
master - mean (657ms) : 635, 678
. : milestone, 657,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6994) - mean (189ms) : 186, 192
. : milestone, 189,
master - mean (189ms) : 186, 192
. : milestone, 189,
section CallTarget+Inlining+NGEN
This PR (6994) - mean (1,109ms) : 1086, 1132
. : milestone, 1109,
master - mean (1,107ms) : 1070, 1143
. : milestone, 1107,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6994) - mean (268ms) : 264, 272
. : milestone, 268,
master - mean (268ms) : 265, 272
. : milestone, 268,
section CallTarget+Inlining+NGEN
This PR (6994) - mean (875ms) : 850, 900
. : milestone, 875,
master - mean (879ms) : 848, 911
. : milestone, 879,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6994) - mean (262ms) : 259, 265
. : milestone, 262,
master - mean (261ms) : 258, 264
. : milestone, 261,
section CallTarget+Inlining+NGEN
This PR (6994) - mean (869ms) : 838, 900
. : milestone, 869,
master - mean (866ms) : 832, 900
. : milestone, 866,
|
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #6994 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 55.95 KB | 56.46 KB | 511 B | 0.91% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 718μs | 1.19μs | 4.6μs | 0 | 0 | 0 | 41.77 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 698μs | 871ns | 3.37μs | 0 | 0 | 0 | 42.05 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 875μs | 2.73μs | 10.6μs | 8.33 | 0 | 0 | 55.95 KB |
#6994 | WriteAndFlushEnrichedTraces |
net6.0 | 678μs | 2.33μs | 9.02μs | 0 | 0 | 0 | 41.73 KB |
#6994 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 720μs | 5.44μs | 54.1μs | 0 | 0 | 0 | 41.99 KB |
#6994 | WriteAndFlushEnrichedTraces |
net472 | 959μs | 5.42μs | 36.7μs | 8.33 | 0 | 0 | 56.46 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteNonQuery |
net6.0 | 1.91μs | 9.57ns | 43.9ns | 0 | 0 | 0 | 1.03 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 2.48μs | 8.09ns | 30.3ns | 0 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.69μs | 3.74ns | 14.5ns | 0.146 | 0.0133 | 0 | 995 B |
#6994 | ExecuteNonQuery |
net6.0 | 1.92μs | 2.19ns | 7.88ns | 0 | 0 | 0 | 1.03 KB |
#6994 | ExecuteNonQuery |
netcoreapp3.1 | 2.46μs | 8.16ns | 30.5ns | 0 | 0 | 0 | 1.02 KB |
#6994 | ExecuteNonQuery |
net472 | 2.69μs | 2.57ns | 9.96ns | 0.148 | 0.0135 | 0 | 995 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.78μs | 9.55ns | 53.2ns | 0 | 0 | 0 | 1.04 KB |
master | CallElasticsearch |
netcoreapp3.1 | 2.42μs | 3.32ns | 12.8ns | 0 | 0 | 0 | 1.04 KB |
master | CallElasticsearch |
net472 | 3.61μs | 3.68ns | 14.2ns | 0.162 | 0 | 0 | 1.05 KB |
master | CallElasticsearchAsync |
net6.0 | 1.85μs | 9.98ns | 57.3ns | 0 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
netcoreapp3.1 | 2.4μs | 2.85ns | 10.7ns | 0 | 0 | 0 | 1.09 KB |
master | CallElasticsearchAsync |
net472 | 3.61μs | 3.94ns | 15.3ns | 0.163 | 0 | 0 | 1.11 KB |
#6994 | CallElasticsearch |
net6.0 | 1.75μs | 7.49ns | 28ns | 0 | 0 | 0 | 1.04 KB |
#6994 | CallElasticsearch |
netcoreapp3.1 | 2.25μs | 1.25ns | 4.52ns | 0 | 0 | 0 | 1.04 KB |
#6994 | CallElasticsearch |
net472 | 3.49μs | 4.82ns | 18.7ns | 0.157 | 0 | 0 | 1.05 KB |
#6994 | CallElasticsearchAsync |
net6.0 | 1.86μs | 7.58ns | 29.3ns | 0 | 0 | 0 | 1.02 KB |
#6994 | CallElasticsearchAsync |
netcoreapp3.1 | 2.27μs | 8.62ns | 33.4ns | 0 | 0 | 0 | 1.09 KB |
#6994 | CallElasticsearchAsync |
net472 | 3.59μs | 2.09ns | 8.09ns | 0.161 | 0 | 0 | 1.11 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.79μs | 7.43ns | 28.8ns | 0 | 0 | 0 | 960 B |
master | ExecuteAsync |
netcoreapp3.1 | 2.26μs | 10.5ns | 43.2ns | 0 | 0 | 0 | 960 B |
master | ExecuteAsync |
net472 | 2.58μs | 2.42ns | 9.05ns | 0.142 | 0 | 0 | 923 B |
#6994 | ExecuteAsync |
net6.0 | 1.76μs | 0.79ns | 2.96ns | 0 | 0 | 0 | 960 B |
#6994 | ExecuteAsync |
netcoreapp3.1 | 2.4μs | 3.73ns | 14.4ns | 0 | 0 | 0 | 960 B |
#6994 | ExecuteAsync |
net472 | 2.55μs | 2.1ns | 8.12ns | 0.139 | 0 | 0 | 923 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendAsync |
net6.0 | 7μs | 8.25ns | 29.7ns | 0 | 0 | 0 | 2.37 KB |
master | SendAsync |
netcoreapp3.1 | 8.17μs | 19.1ns | 68.8ns | 0 | 0 | 0 | 2.9 KB |
master | SendAsync |
net472 | 12.2μs | 6.39ns | 24.7ns | 0.489 | 0 | 0 | 3.19 KB |
#6994 | SendAsync |
net6.0 | 7.04μs | 12.8ns | 49.4ns | 0 | 0 | 0 | 2.37 KB |
#6994 | SendAsync |
netcoreapp3.1 | 8.47μs | 19.1ns | 73.9ns | 0 | 0 | 0 | 2.9 KB |
#6994 | SendAsync |
net472 | 12.3μs | 10.7ns | 41.3ns | 0.49 | 0 | 0 | 3.19 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #6994
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
256.05 KB
280.58 KB
24.54 KB
9.58%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
258.46 KB
272.78 KB
14.33 KB
5.54%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472
288.02 KB
294.91 KB
6.89 KB
2.39%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 256.05 KB | 280.58 KB | 24.54 KB | 9.58% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 258.46 KB | 272.78 KB | 14.33 KB | 5.54% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 | 288.02 KB | 294.91 KB | 6.89 KB | 2.39% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 44.5μs | 238ns | 1.31μs | 0 | 0 | 0 | 43.78 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 50.3μs | 345ns | 3.28μs | 0 | 0 | 0 | 42.85 KB |
master | StringConcatBenchmark |
net472 | 58.2μs | 249ns | 966ns | 0 | 0 | 0 | 57.34 KB |
master | StringConcatAspectBenchmark |
net6.0 | 449μs | 2.27μs | 10.1μs | 0 | 0 | 0 | 256.05 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 507μs | 2.11μs | 7.61μs | 0 | 0 | 0 | 258.46 KB |
master | StringConcatAspectBenchmark |
net472 | 404μs | 2.11μs | 9.9μs | 0 | 0 | 0 | 288.02 KB |
#6994 | StringConcatBenchmark |
net6.0 | 42.8μs | 243ns | 1.63μs | 0 | 0 | 0 | 43.82 KB |
#6994 | StringConcatBenchmark |
netcoreapp3.1 | 51μs | 364ns | 3.51μs | 0 | 0 | 0 | 42.78 KB |
#6994 | StringConcatBenchmark |
net472 | 57.3μs | 198ns | 714ns | 0 | 0 | 0 | 57.34 KB |
#6994 | StringConcatAspectBenchmark |
net6.0 | 497μs | 1.55μs | 5.6μs | 0 | 0 | 0 | 280.58 KB |
#6994 | StringConcatAspectBenchmark |
netcoreapp3.1 | 482μs | 6.04μs | 59.5μs | 0 | 0 | 0 | 272.78 KB |
#6994 | StringConcatAspectBenchmark |
net472 | 403μs | 2.06μs | 9.66μs | 0 | 0 | 0 | 294.91 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.59μs | 1.61ns | 6.22ns | 0 | 0 | 0 | 1.76 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.45μs | 12.7ns | 49ns | 0 | 0 | 0 | 1.76 KB |
master | EnrichedLog |
net472 | 3.95μs | 5.04ns | 19.5ns | 0.255 | 0 | 0 | 1.69 KB |
#6994 | EnrichedLog |
net6.0 | 2.55μs | 8.93ns | 34.6ns | 0 | 0 | 0 | 1.76 KB |
#6994 | EnrichedLog |
netcoreapp3.1 | 3.61μs | 4.13ns | 14.9ns | 0 | 0 | 0 | 1.76 KB |
#6994 | EnrichedLog |
net472 | 3.86μs | 2.71ns | 10.5ns | 0.251 | 0 | 0 | 1.69 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 123μs | 52ns | 201ns | 0 | 0 | 0 | 4.37 KB |
master | EnrichedLog |
netcoreapp3.1 | 126μs | 180ns | 674ns | 0 | 0 | 0 | 4.37 KB |
master | EnrichedLog |
net472 | 167μs | 107ns | 401ns | 0 | 0 | 0 | 4.57 KB |
#6994 | EnrichedLog |
net6.0 | 123μs | 157ns | 565ns | 0 | 0 | 0 | 4.37 KB |
#6994 | EnrichedLog |
netcoreapp3.1 | 126μs | 28ns | 97.1ns | 0 | 0 | 0 | 4.37 KB |
#6994 | EnrichedLog |
net472 | 167μs | 188ns | 728ns | 0 | 0 | 0 | 4.57 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 5.14μs | 12.9ns | 50.1ns | 0 | 0 | 0 | 2.32 KB |
master | EnrichedLog |
netcoreapp3.1 | 6.57μs | 23.2ns | 89.7ns | 0 | 0 | 0 | 2.32 KB |
master | EnrichedLog |
net472 | 7.33μs | 7.29ns | 28.2ns | 0.328 | 0 | 0 | 2.14 KB |
#6994 | EnrichedLog |
net6.0 | 4.88μs | 23.8ns | 95.1ns | 0 | 0 | 0 | 2.32 KB |
#6994 | EnrichedLog |
netcoreapp3.1 | 6.53μs | 20.8ns | 80.5ns | 0 | 0 | 0 | 2.32 KB |
#6994 | EnrichedLog |
net472 | 7.52μs | 6.89ns | 25.8ns | 0.338 | 0 | 0 | 2.14 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 2.04μs | 10.5ns | 49.2ns | 0 | 0 | 0 | 1.21 KB |
master | SendReceive |
netcoreapp3.1 | 2.54μs | 2.91ns | 11.3ns | 0 | 0 | 0 | 1.21 KB |
master | SendReceive |
net472 | 3.14μs | 5.33ns | 20.6ns | 0.19 | 0 | 0 | 1.21 KB |
#6994 | SendReceive |
net6.0 | 1.98μs | 9.01ns | 42.3ns | 0 | 0 | 0 | 1.21 KB |
#6994 | SendReceive |
netcoreapp3.1 | 2.58μs | 12.7ns | 52.2ns | 0 | 0 | 0 | 1.21 KB |
#6994 | SendReceive |
net472 | 3.07μs | 2.84ns | 11ns | 0.182 | 0 | 0 | 1.21 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 4.3μs | 16.9ns | 65.3ns | 0 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 5.8μs | 18.4ns | 71.1ns | 0 | 0 | 0 | 1.69 KB |
master | EnrichedLog |
net472 | 6.47μs | 2.96ns | 10.7ns | 0.324 | 0 | 0 | 2.08 KB |
#6994 | EnrichedLog |
net6.0 | 4.12μs | 10.5ns | 39.1ns | 0 | 0 | 0 | 1.64 KB |
#6994 | EnrichedLog |
netcoreapp3.1 | 5.7μs | 11.3ns | 43.8ns | 0 | 0 | 0 | 1.69 KB |
#6994 | EnrichedLog |
net472 | 6.53μs | 8.49ns | 32.9ns | 0.323 | 0 | 0 | 2.08 KB |
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 765ns | 3.25ns | 12.6ns | 0 | 0 | 0 | 584 B |
master | StartFinishSpan |
netcoreapp3.1 | 939ns | 0.183ns | 0.632ns | 0 | 0 | 0 | 584 B |
master | StartFinishSpan |
net472 | 905ns | 0.224ns | 0.838ns | 0.0912 | 0 | 0 | 586 B |
master | StartFinishScope |
net6.0 | 910ns | 0.459ns | 1.78ns | 0 | 0 | 0 | 704 B |
master | StartFinishScope |
netcoreapp3.1 | 1.18μs | 1.79ns | 6.93ns | 0 | 0 | 0 | 704 B |
master | StartFinishScope |
net472 | 1.14μs | 0.227ns | 0.881ns | 0.102 | 0 | 0 | 666 B |
#6994 | StartFinishSpan |
net6.0 | 744ns | 3.57ns | 15.2ns | 0 | 0 | 0 | 584 B |
#6994 | StartFinishSpan |
netcoreapp3.1 | 943ns | 4.93ns | 23.7ns | 0 | 0 | 0 | 584 B |
#6994 | StartFinishSpan |
net472 | 910ns | 0.218ns | 0.817ns | 0.0924 | 0 | 0 | 586 B |
#6994 | StartFinishScope |
net6.0 | 883ns | 3.84ns | 15.8ns | 0 | 0 | 0 | 704 B |
#6994 | StartFinishScope |
netcoreapp3.1 | 1.2μs | 5.66ns | 21.9ns | 0 | 0 | 0 | 704 B |
#6994 | StartFinishScope |
net472 | 1.11μs | 0.178ns | 0.689ns | 0.101 | 0 | 0 | 666 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 1.03μs | 5.16ns | 21.3ns | 0 | 0 | 0 | 704 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 1.39μs | 1.02ns | 3.95ns | 0 | 0 | 0 | 704 B |
master | RunOnMethodBegin |
net472 | 1.36μs | 0.592ns | 2.22ns | 0.102 | 0 | 0 | 666 B |
#6994 | RunOnMethodBegin |
net6.0 | 1.04μs | 5.45ns | 25.5ns | 0 | 0 | 0 | 704 B |
#6994 | RunOnMethodBegin |
netcoreapp3.1 | 1.36μs | 7.02ns | 31.4ns | 0 | 0 | 0 | 704 B |
#6994 | RunOnMethodBegin |
net472 | 1.35μs | 0.843ns | 3.26ns | 0.102 | 0 | 0 | 666 B |
Summary of changes
Robust resolution of attribute types in
HasAttributeFromSet
Reason for change
InvliadCastException in case MemberReference.Parent is not TypeDefinition
Implementation details
Checkin for MemberReference.Parent before getting the type