src/share/vm/opto/doCall.cpp

changeset 4447
f1de9dbc914e
parent 4414
5698813d45eb
child 5110
6f3fd5150b67
     1.1 --- a/src/share/vm/opto/doCall.cpp	Mon Jan 14 08:22:32 2013 -0800
     1.2 +++ b/src/share/vm/opto/doCall.cpp	Tue Jan 15 12:06:18 2013 -0800
     1.3 @@ -553,7 +553,13 @@
     1.4          rtype = ctype;
     1.5        }
     1.6      } else {
     1.7 -      assert(rtype == ctype, "mismatched return types");  // symbolic resolution enforces this
     1.8 +      // Symbolic resolution enforces the types to be the same.
     1.9 +      // NOTE: We must relax the assert for unloaded types because two
    1.10 +      // different ciType instances of the same unloaded class type
    1.11 +      // can appear to be "loaded" by different loaders (depending on
    1.12 +      // the accessing class).
    1.13 +      assert(!rtype->is_loaded() || !ctype->is_loaded() || rtype == ctype,
    1.14 +             err_msg_res("mismatched return types: rtype=%s, ctype=%s", rtype->name(), ctype->name()));
    1.15      }
    1.16  
    1.17      // If the return type of the method is not loaded, assert that the

mercurial