[Nice-commit] Nice/src/bossa/syntax NiceClass.java,1.84,1.85
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-09-20 10:24:53
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25363/src/bossa/syntax Modified Files: NiceClass.java Log Message: Do not create custom constructors based on unaccessible parent constructors. Correct access checking for default (non-protected) visibility. Index: NiceClass.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** NiceClass.java 19 Sep 2004 12:42:28 -0000 1.84 --- NiceClass.java 20 Sep 2004 10:24:41 -0000 1.85 *************** *** 674,678 **** on the type parameters. */ ! private static List getNativeConstructorParameters (TypeConstructor tc, List constraints) { --- 674,678 ---- on the type parameters. */ ! private List getNativeConstructorParameters (TypeConstructor tc, List constraints) { *************** *** 691,699 **** for (Iterator i = constructors.iterator(); i.hasNext();) { ! MethodDeclaration.Symbol m = (MethodDeclaration.Symbol) i.next(); List params = new ArrayList(10); ! params.add(m.getMethodDeclaration()); res.add(params); ! mlsub.typing.Monotype[] args = m.getMethodDeclaration().getArgTypes(); for (int j = 0; j < args.length; j++) params.add(new FormalParameters.Parameter(Monotype.create(args[j]))); --- 691,712 ---- for (Iterator i = constructors.iterator(); i.hasNext();) { ! MethodDeclaration m = ! ((MethodDeclaration.Symbol) i.next()).getMethodDeclaration(); ! ! // Only consider parent methods for which a call from this class ! // is legal. ! if (m instanceof JavaMethod) ! { ! gnu.bytecode.ClassType thisClass = classe.getClassType(); ! if (! gnu.bytecode.Access.legal(thisClass, ! ((JavaMethod) m).reflectMethod, ! thisClass)) ! continue; ! } ! List params = new ArrayList(10); ! params.add(m); res.add(params); ! mlsub.typing.Monotype[] args = m.getArgTypes(); for (int j = 0; j < args.length; j++) params.add(new FormalParameters.Parameter(Monotype.create(args[j]))); |