This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 237828
Collapse All | Expand All

(-)a/src/share/classes/com/sun/tools/javac/comp/Attr.java (-2 / +17 lines)
Lines 4891-4897 Link Here
4891
         */
4891
         */
4892
        private Type dummyMethodType(JCMethodDecl md) {
4892
        private Type dummyMethodType(JCMethodDecl md) {
4893
            Type restype = syms.unknownType;
4893
            Type restype = syms.unknownType;
4894
            if (md != null && md.restype.hasTag(TYPEIDENT)) {
4894
            if (md != null && md.restype != null && md.restype.hasTag(TYPEIDENT)) {
4895
                JCPrimitiveTypeTree prim = (JCPrimitiveTypeTree)md.restype;
4895
                JCPrimitiveTypeTree prim = (JCPrimitiveTypeTree)md.restype;
4896
                if (prim.typetag == VOID)
4896
                if (prim.typetag == VOID)
4897
                    restype = syms.voidType;
4897
                    restype = syms.voidType;
Lines 4935-4940 Link Here
4935
            }
4935
            }
4936
            super.visitClassDef(that);
4936
            super.visitClassDef(that);
4937
        }
4937
        }
4938
        
4939
        private boolean inMethodHeader;
4938
4940
4939
        @Override
4941
        @Override
4940
        public void visitMethodDef(JCMethodDecl that) {
4942
        public void visitMethodDef(JCMethodDecl that) {
Lines 4942-4947 Link Here
4942
            if (that.sym == null) {
4944
            if (that.sym == null) {
4943
                that.sym = new MethodSymbol(0, that.name, that.type, syms.noSymbol);
4945
                that.sym = new MethodSymbol(0, that.name, that.type, syms.noSymbol);
4944
            }
4946
            }
4947
            scan(that.mods);
4948
            scan(that.restype);
4949
            scan(that.typarams);
4950
            try {
4951
                inMethodHeader = true;
4952
                scan(that.recvparam);
4953
                scan(that.params);
4954
            } finally {
4955
                inMethodHeader = false;
4956
            }
4957
            scan(that.thrown);
4958
            scan(that.defaultValue);
4959
            scan(that.body);
4945
            super.visitMethodDef(that);
4960
            super.visitMethodDef(that);
4946
        }
4961
        }
4947
4962
Lines 4949-4955 Link Here
4949
        public void visitVarDef(JCVariableDecl that) {
4964
        public void visitVarDef(JCVariableDecl that) {
4950
            initTypeIfNeeded(that);
4965
            initTypeIfNeeded(that);
4951
            if (that.sym == null) {
4966
            if (that.sym == null) {
4952
                that.sym = new VarSymbol(0, that.name, that.type, syms.noSymbol);
4967
                that.sym = new VarSymbol(inMethodHeader ? PARAMETER : 0, that.name, that.type, syms.noSymbol);
4953
                that.sym.adr = 0;
4968
                that.sym.adr = 0;
4954
            }
4969
            }
4955
            super.visitVarDef(that);
4970
            super.visitVarDef(that);
(-)a/src/share/classes/com/sun/tools/javac/comp/Flow.java (-1 / +1 lines)
Lines 1798-1804 Link Here
1798
                for (List<JCVariableDecl> l = tree.params; l.nonEmpty(); l = l.tail) {
1798
                for (List<JCVariableDecl> l = tree.params; l.nonEmpty(); l = l.tail) {
1799
                    JCVariableDecl def = l.head;
1799
                    JCVariableDecl def = l.head;
1800
                    scan(def);
1800
                    scan(def);
1801
                    Assert.check((def.sym.flags() & PARAMETER) != 0, "Method parameter without PARAMETER flag");
1801
                    Assert.check((def.sym.flags() & PARAMETER) != 0 || def.sym.owner == syms.noSymbol, "Method parameter without PARAMETER flag");
1802
                    /*  If we are executing the code from Gen, then there can be
1802
                    /*  If we are executing the code from Gen, then there can be
1803
                     *  synthetic or mandated variables, ignore them.
1803
                     *  synthetic or mandated variables, ignore them.
1804
                     */
1804
                     */

Return to bug 237828