Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Design Time CodeGen for DirectiveTokenKind.Type doesn't handle value types #1176

Closed
@rynowak

Description

@rynowak

This code in DesignTimeCSharpRenderer doesn't handle the case where a type used in the directive is a value type:

                    case DirectiveTokenKind.Type:

                        Context.AddLineMappingFor(node);
                        Context.Writer
                            .Write(node.Content)
                            .Write(" ")
                            .WriteStartAssignment(TypeHelper)
                            .WriteLine("null;");
                        break;

This will generate code like:

int __typeHelper = null;

We should use default(node.Content) here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions