Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeCodeGenerator.java @ 18780:f4d78e4a878d
Truffle-DSL: fixed create method should have the same visibility as its originating constructor. (GRAAL-365 #resolve)
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Jan 2015 20:23:22 +0100 |
parents | 674c8a6d5e6c |
children | 4ce856e65728 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeCodeGenerator.java Mon Jan 05 09:58:33 2015 -0800 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeCodeGenerator.java Mon Jan 05 20:23:22 2015 +0100 @@ -101,9 +101,8 @@ } } } - Modifier templateVisibility = ElementUtils.getVisibility(node.getTemplateType().getModifiers()); - new NodeFactoryFactory(context, node, second).createFactoryMethods(first, templateVisibility); - ElementUtils.setVisibility(first.getModifiers(), templateVisibility); + new NodeFactoryFactory(context, node, second).createFactoryMethods(first); + ElementUtils.setVisibility(first.getModifiers(), ElementUtils.getVisibility(node.getTemplateType().getModifiers())); for (ExecutableElement constructor : ElementFilter.constructorsIn(first.getEnclosedElements())) { ElementUtils.setVisibility(((CodeExecutableElement) constructor).getModifiers(), Modifier.PRIVATE); }