Skip to content
Browse files

Be even more consistent with IOE

  • Loading branch information...
1 parent 630c56c commit 9f3c0f88b4a3d7568c689421bae39318f5d49540 @jbevain committed
Showing with 5 additions and 14 deletions.
  1. +1 −1 Mono.Cecil/FunctionPointerType.cs
  2. +1 −10 Mono.Cecil/GenericParameter.cs
  3. +3 −3 Mono.Cecil/TypeSpecification.cs
View
2 Mono.Cecil/FunctionPointerType.cs
@@ -85,7 +85,7 @@ public sealed class FunctionPointerType : TypeSpecification, IMethodSignature {
public override IMetadataScope Scope {
get { return function.ReturnType.Scope; }
- set { function.ReturnType.Scope = value; }
+ set { throw new InvalidOperationException (); }
}
public override bool IsFunctionPointer {
View
11 Mono.Cecil/GenericParameter.cs
@@ -107,16 +107,7 @@ public sealed class GenericParameter : TypeReference, ICustomAttributeProvider {
? ((MethodReference) owner).DeclaringType.Scope
: ((TypeReference) owner).Scope;
}
- set {
- if (owner == null)
- return;
-
- var owner_type = owner.GenericParameterType == GenericParameterType.Method
- ? ((MethodReference) owner).DeclaringType
- : ((TypeReference) owner);
-
- owner_type.Scope = value;
- }
+ set { throw new InvalidOperationException (); }
}
public override ModuleDefinition Module {
View
6 Mono.Cecil/TypeSpecification.cs
@@ -42,17 +42,17 @@ public abstract class TypeSpecification : TypeReference {
public override string Name {
get { return element_type.Name; }
- set { throw new NotSupportedException (); }
+ set { throw new InvalidOperationException (); }
}
public override string Namespace {
get { return element_type.Namespace; }
- set { throw new NotSupportedException (); }
+ set { throw new InvalidOperationException (); }
}
public override IMetadataScope Scope {
get { return element_type.Scope; }
- set { element_type.Scope = value; }
+ set { throw new InvalidOperationException (); }
}
public override ModuleDefinition Module {

0 comments on commit 9f3c0f8

Please sign in to comment.
Something went wrong with that request. Please try again.