Skip to content

New compiler error CS1056: Unexpected character '∞' #3157

@PhilippNaused

Description

@PhilippNaused

The generated code no longer compiles after updating to v0.60.15.
It used to work in v0.60.1.

The errors are like error CS1056: Unexpected character '∞'.

This is the generated code:

DataSources = new global::TUnit.Core.IDataSourceAttribute[]
{
    new global::TUnit.Core.ArgumentsAttribute("1.0", 1f),
    new global::TUnit.Core.ArgumentsAttribute("1.0i32", 1f),
    new global::TUnit.Core.ArgumentsAttribute("0.682287216i32", 0.6822872f),
    new global::TUnit.Core.ArgumentsAttribute("0xFFC00000i32", NaNf),
    new global::TUnit.Core.ArgumentsAttribute("inf32",f),
    new global::TUnit.Core.ArgumentsAttribute("inf",f),
    new global::TUnit.Core.ArgumentsAttribute("-inf32", -f),
    new global::TUnit.Core.ArgumentsAttribute("-inf", -f),
},

These are the attributes:

[Arguments("1.0", 1d)]
[Arguments("1.0i64", 1d)]
[Arguments("0.682287216i64", 0.682287216d)]
[Arguments("0xFFF8000000000000", double.NaN)]
[Arguments("0xFFF8000000000000i64", double.NaN)]
[Arguments("inf64", double.PositiveInfinity)]
[Arguments("inf", double.PositiveInfinity)]
[Arguments("-inf64", double.NegativeInfinity)]
[Arguments("-inf", double.NegativeInfinity)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions