-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Here is my function where I got this error:
Millimolar getConcentration(Compound chemical) const {
return (ligandLevels[chemical].inBody / body.bloodVolume);
}
I got the following error:
Error: incompatible types for `(this.ligandLevels[chemical].inBody) / (this.body.bloodVolume)`: `const(Quantity!(PrefixedUnit!(BaseUnit!("mole", "mol"), -3, __T12PrefixSystemVli10S_D12experimental5units2si10__lambda53FNaNbNfZASQBtQBi6PrefixZ), float))` and `const(Quantity!(BaseUnit!("litre", "L"), float))`
Removing the const
attribute of this function results in the error disappearing.
This should be resolved so that arithmetic on Quantity
values can be done in constant functions.
Metadata
Metadata
Assignees
Labels
No labels