Skip to content

Fix type inferencing for arithmetic operations #1590

@eric-milles

Description

@eric-milles

Consider the following:

int a = 1
int b = 2
def c = a / b

println(c)
println(c.class)

This script prints "0.5" and "java.math.BigDecimal" however the hover for "c" indicates the type "int". https://docs.groovy-lang.org/latest/html/documentation/#_math_operations

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions