< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java

Print this page
@@ -272,11 +272,11 @@
                      throw new IllegalArgumentException(t.toString());
                  targs.append((Type) t);
              }
              // TODO: Would like a way to check that type args match formals.
  
-             return (DeclaredType) new Type.ClassType(outer, targs.toList(), sym);
+             return (DeclaredType) new Type.ClassType(outer, targs.toList(), sym, TypeMetadata.EMPTY, sym.type.getFlavor());
          }
  
      /**
       * Returns the type of an element when that element is viewed as
       * a member of, or otherwise directly contained by, a given type.

@@ -293,11 +293,11 @@
       */
      @DefinedBy(Api.LANGUAGE_MODEL)
      public TypeMirror asMemberOf(DeclaredType containing, Element element) {
          Type site = (Type)containing;
          Symbol sym = (Symbol)element;
-         if (types.asSuper(site, sym.getEnclosingElement()) == null)
+         if (types.asSuper(site.referenceProjectionOrSelf(), sym.getEnclosingElement()) == null)
              throw new IllegalArgumentException(sym + "@" + site);
          return types.memberType(site, sym);
      }
  
  
< prev index next >