Skip to content

Real literals can now longer be parsed #3570

Description

@mattulbrich

Description

Real number literals like 1.0r cannot be used in KeY any more.

Reproducible

always

Steps to reproduce

Load a file containing \problem { 1.0r = 1.0r }

It yields the following error:
The given float literal does not have a suffix. This is essential to determine its exact meaning. You probably want to add 'r' as a suffix. at /tmp/a.key:1:12

Additional information

The code responsible reads:

if(lastChar == 'R' || lastChar == 'r') {
            semanticError(ctx, "The given float literal does not have a suffix. This is essential to determine its exact meaning. You probably want to add 'r' as a suffix.");
}

introduced in ae9fe01


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions