Skip to content

Commit

Permalink
Fix references to nested types in generic classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrunwald committed Aug 11, 2019
1 parent c151002 commit cdc7a36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions ICSharpCode.Decompiler.Tests/TestCases/Pretty/NullableRefTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,17 @@ public string Property {
}
public event EventHandler Event;
}

public class T04_Dictionary<TKey, TValue> where TKey : notnull
{
private struct Entry
{
public TKey key;
public TValue value;
}

private int[]? _buckets;
private Entry[]? _entries;
private IEqualityComparer<TKey>? _comparer;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ public bool? IsReferenceType {
}

bool IType.IsByRefLike => false;
Nullability IType.Nullability => NullabilityConstraint;
Nullability IType.Nullability => Nullability.Oblivious;

public IType ChangeNullability(Nullability nullability)
{
if (nullability == NullabilityConstraint)
if (nullability == Nullability.Oblivious)
return this;
else
return new NullabilityAnnotatedTypeParameter(this, nullability);
Expand Down

0 comments on commit cdc7a36

Please sign in to comment.