declex icon indicating copy to clipboard operation
declex copied to clipboard

Using same variable name generates an error in Action Syntax

Open smaugho opened this issue 6 years ago • 0 comments

If the same name it is used for a variable with different types, this generates an error in DecleX, for instance

if (isTablet) {
            GridLayoutManager layoutManager = new AnswersLayoutManager(getActivity().getBaseContext());
            answers.setLayoutManager(layoutManager);
        } else {
            LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
            layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
            answers.setLayoutManager(layoutManager);
        }

If this is processed by an Action, layoutManager will be done a field in the Action Runnable and this will generate errors.

smaugho avatar Jul 25 '17 14:07 smaugho