diff options
author | jfrijters <jfrijters> | 2011-12-08 17:48:04 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-12-08 17:48:04 +0400 |
commit | c5d56fff09f32b3c8d1f01567f9a8b360750e609 (patch) | |
tree | dc4353c759c3121b54c6ad110342e655576788d6 | |
parent | ceba3c78344984406216fa04bae704b927b9c1cc (diff) |
Unloadable types can't violate loader constraints.
-rw-r--r-- | runtime/verifier.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/verifier.cs b/runtime/verifier.cs index 5b07e1cb..f8d80238 100644 --- a/runtime/verifier.cs +++ b/runtime/verifier.cs @@ -3792,7 +3792,7 @@ sealed class MethodAnalyzer private string CheckLoaderConstraints(ClassFile.ConstantPoolItemMI cpi, MethodWrapper mw) { - if(cpi.GetRetType() != mw.ReturnType && !mw.ReturnType.IsUnloadable) + if(cpi.GetRetType() != mw.ReturnType && !cpi.GetRetType().IsUnloadable && !mw.ReturnType.IsUnloadable) { #if STATIC_COMPILER StaticCompiler.LinkageError("Method \"{2}.{3}{4}\" has a return type \"{0}\" instead of type \"{1}\" as expected by \"{5}\"", mw.ReturnType, cpi.GetRetType(), cpi.GetClassType().Name, cpi.Name, cpi.Signature, classFile.Name); @@ -3803,7 +3803,7 @@ sealed class MethodAnalyzer TypeWrapper[] there = mw.GetParameters(); for(int i = 0; i < here.Length; i++) { - if(here[i] != there[i] && !there[i].IsUnloadable) + if(here[i] != there[i] && !here[i].IsUnloadable && !there[i].IsUnloadable) { #if STATIC_COMPILER StaticCompiler.LinkageError("Method \"{2}.{3}{4}\" has a argument type \"{0}\" instead of type \"{1}\" as expected by \"{5}\"", there[i], here[i], cpi.GetClassType().Name, cpi.Name, cpi.Signature, classFile.Name); |