-
Notifications
You must be signed in to change notification settings - Fork 98
Inline-assigned property has no displayed type #138
Comments
@a2 This is a limitation of using a syntactic parse (see #31). Without more information, it's impossible to know whether For declarations with an implicit type like this, would showing the default value be acceptable in your opinion? (e.g. |
…sonable declaration code blocks. Resolves #138
This is a regression caused by 93b33c1#diff-4082294eb6d0c0415becf026802c8cfcR188. To fix the immediate problem, I have a patch in #150 that only omits initializer clause if its a closure or function call expression. conventional literal expressions (boolean, integer, floating-point, string, array, dictionary, etc.) will now be shown. After |
I manged to ommit the initializer clause from the generated document by adding if let value = binding.initializer?.value,
value.is(ClosureExprSyntax.self) || value.is(FunctionCallExprSyntax.self) || value.is(MemberAccessExprSyntax.self) || value.is(IdentifierExprSyntax.self)
{
return binding.withInitializer(nil)
.withAccessor(nil)
} else {
return binding.withAccessor(nil)
} I don't know what side-effect this change may have. I'm looking into it. |
The following renders as above without the
Bool
type displayed:The text was updated successfully, but these errors were encountered: