Skip to content

Commit

Permalink
Bump to mono/cecil/master@cb6c1ca (dotnet#462)
Browse files Browse the repository at this point in the history
Commit dotnet/cecil@febbd652 contains an API break, altering the return
type of `AssemblyReader.ReadGenericConstraints()` from a
`Collection<TypeReference>` to a `GenericParameterConstraintCollection`:

	- public Collection<TypeReference> ReadGenericConstraints (GenericParameter generic_parameter)
	+ public GenericParameterConstraintCollection ReadGenericConstraints (GenericParameter generic_parameter)

Bump to mono/cecil/master@cb6c1ca and fix
`AssemblyReader.ReadGenericConstraints()` usage so that the new
`GenericParameterConstraint.ConstraintType` is used instead of
requiring that `ReadGenericConstraints()` return `TypeReference`s.
  • Loading branch information
steveisok authored and jonpryor committed Aug 12, 2019
1 parent fd774a5 commit 807ed48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion external/cecil
Submodule cecil updated from a6c8f5 to cb6c1c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static bool IsParameterCompatibleWith (TypeReference a, TypeReference b)
return true;
var gpa = (GenericParameter) a;
foreach (var c in gpa.Constraints) {
if (!c.IsAssignableFrom (b))
if (!c.ConstraintType.IsAssignableFrom (b))
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static GenericParameterDefinitionList FromMetadata (IEnumerable<GenericPa
ret.Add (new GenericParameterDefinition (
p.FullNameCorrected (),
(from a in p.Constraints
select a.FullNameCorrected ()).ToArray ()));
select a.ConstraintType.FullNameCorrected ()).ToArray ()));
}
return ret;
}
Expand Down

0 comments on commit 807ed48

Please sign in to comment.