| [#296] | project: compiler | priority: low | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Michel | Martin | fixed | 2004-02-13 10:30:13.0 | |
| subject | Literal floating point values not as in Java | |||
| code |
object bug {
val v1 = 2.f;
val v2 = 2.d;
}
|
|||
| what happened | The compiler complains
|
|||
| what expected | No complaints. The Scala reference claims that floating point literals are "like in Java", but here it's not the case. Both "2.f" and "2.d" are valid Java literals. | |||
| [back to overview] | ||||
| Stephane edited on 2004-03-01 17:02:05.0 |
| Changed scanner to also accept literals like "2." or "2.f" (as specified in the JLS) |