Code review comment: Worked without them. Updated in https://github.com/ballerina-platform/ballerina-lang/pull/34427/commits/df432790bb0b85bdac8fd890f881cf4296966849.

Code under review:
private BLangSimpleVariable createSimpleVariable(BField field) {
        BLangSimpleVariable manualField = new BLangSimpleVariable();
        BLangIdentifier name = new BLangIdentifier();

        name.setValue(field.name.value);
        name.pos = field.pos;
        manualField.setName(name);

        manualField.flagSet = new HashSet<>();
        manualField.flagSet.add(Flag.PUBLIC);
        manualField.flagSet.add(Flag.REQUIRED);
        manualField.flagSet.add(Flag.FIELD);
        manualField.setBType(field.type);
        manualField.pos = field.pos;
        manualField.setDeterminedType(field.type);
        manualField.symbol = field.symbol;

        if (field.type.tag == TypeTags.RECORD) {
            BLangUserDefinedType userDefinedTypeNode = (BLangUserDefinedType) TreeBuilder.createUserDefinedTypeNode();
            userDefinedTypeNode.pos = field.pos;
            userDefinedTypeNode.setBType(field.type);
            userDefinedTypeNode.setDeterminedType(field.type);
            userDefinedTypeNode.pkgAlias = new BLangIdentifier();
            if (createdTypeDefinitions.containsKey(field.type.tsymbol)) {
                BLangTypeDefinition createdType = createdTypeDefinitions.get(field.type.tsymbol);
                userDefinedTypeNode.symbol = createdType.symbol;
                userDefinedTypeNode.typeName = createdType.name;
            }

            manualField.typeNode = userDefinedTypeNode;
            return manualField;
        }

        BLangFiniteTypeNode finiteTypeNode = (BLangFiniteTypeNode) TreeBuilder.createFiniteTypeNode();
        finiteTypeNode.pos = field.pos;
        finiteTypeNode.setBType(field.type);
        finiteTypeNode.setDeterminedType(field.type);
        finiteTypeNode.valueSpace = new ArrayList<>();
        for (BLangExpression value : ((BFiniteType) field.type).getValueSpace()) {
            if (value.getKind() == NodeKind.NUMERIC_LITERAL) {
                ((BLangNumericLiteral) value).originalValue = ((BLangNumericLiteral) value).value.toString();
            }
            finiteTypeNode.valueSpace.add(value);
        }
        manualField.typeNode = finiteTypeNode;
        return manualField;
    }

Line commented on: manualField.typeNode = userDefinedTypeNode;

Revised code:
private BLangSimpleVariable createSimpleVariable(BField field) {
        BLangSimpleVariable manualField = new BLangSimpleVariable();
        BLangIdentifier name = new BLangIdentifier();
        name.setValue(field.name.value);
        name.pos = field.pos;

        manualField.setName(name);
        manualField.flagSet = new HashSet<>();
        manualField.flagSet.add(Flag.PUBLIC);
        manualField.flagSet.add(Flag.REQUIRED);
        manualField.flagSet.add(Flag.FIELD);
        manualField.setBType(field.type);
        manualField.pos = field.pos;
        manualField.setDeterminedType(field.type);
        manualField.symbol = field.symbol;

        if (field.type.tag == TypeTags.RECORD) {
            BLangUserDefinedType userDefinedTypeNode = (BLangUserDefinedType) TreeBuilder.createUserDefinedTypeNode();
            userDefinedTypeNode.pos = field.pos;
            userDefinedTypeNode.setBType(field.type);
            userDefinedTypeNode.setDeterminedType(field.type);
            userDefinedTypeNode.pkgAlias = new BLangIdentifier();
            if (createdTypeDefinitions.containsKey(field.type.tsymbol)) {
                BLangTypeDefinition createdType = createdTypeDefinitions.get(field.type.tsymbol);
                userDefinedTypeNode.symbol = createdType.symbol;
                userDefinedTypeNode.typeName = createdType.name;
            }

            manualField.typeNode = userDefinedTypeNode;
            return manualField;
        }

        BLangFiniteTypeNode finiteTypeNode = (BLangFiniteTypeNode) TreeBuilder.createFiniteTypeNode();
        finiteTypeNode.pos = field.pos;
        finiteTypeNode.setBType(field.type);
        finiteTypeNode.setDeterminedType(field.type);
        finiteTypeNode.valueSpace = new ArrayList<>();
        for (BLangExpression value : ((BFiniteType) field.type).getValueSpace()) {
            if (value.getKind() == NodeKind.NUMERIC_LITERAL) {
                ((BLangNumericLiteral) value).originalValue = ((BLangNumericLiteral) value).value.toString();
            }
            finiteTypeNode.valueSpace.add(value);
        }
        manualField.typeNode = finiteTypeNode;
        return manualField;
    }