Skip to content

Ensure SchemaInfo.Schema.Default is non-nil if it is really set#237

Open
magodo wants to merge 1 commit into
bflad:mainfrom
magodo:schemaInfo_default
Open

Ensure SchemaInfo.Schema.Default is non-nil if it is really set#237
magodo wants to merge 1 commit into
bflad:mainfrom
magodo:schemaInfo_default

Conversation

@magodo
Copy link
Copy Markdown
Contributor

@magodo magodo commented Apr 23, 2021

In prior implementation, if the schema type is one of int/bool/string,
the .Schema.Default might not be set if the Default is not set to a
BasicLiteral(for int/string) or a bool Ident (for bool). It is a very
popular case that the default value of a string property is set to an
expression that is to convert the type from another string aliased type.

In prior implementation, if the schema type is one of int/bool/string,
the `.Schema.Default` might not be set if the `Default` is not set to a
BasicLiteral(for int/string) or a bool Ident (for bool). It is a very
popular case that the default value of a string property is set to an
expression that is to convert the type from another string aliased type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant