Skip to content

'string' does not contain a definition for 'Parse' when UnitOf(typeof(string), UnitGenerateOptions.ParseMethod) #13

@makp0

Description

@makp0

Nuget Package Version: 1.4.8
IDE: JetBrains Rider 2022.2.2
.NET Core: 6.0.400
OS: Mac OS 12.5.1

This

[UnitOf(typeof(string), UnitGenerateOptions.ImplicitOperator | UnitGenerateOptions.ParseMethod)]
public readonly partial struct Id

gives

  'string' does not contain a definition for 'Parse'
  'string' does not contain a definition for 'TryParse'

because template needs to take into account that string doesn't have Parse and TryParse methods
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions