Skip to content

x ~/ y should allow doubles in compile time constants #1781

Closed
@floitschG

Description

@floitschG

Example of a program dartc rejects, but that should be allowed:
===
final x = 5.5;
final y = 2.2;
final z = x ~/ y;
main() => print(z);
===
file:bug.dart:3: Expected constant expression of type int, got double
     2: final y = 2.2;
     3: final z = x ~/ y;
Compilation failed with 1 problem.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions