Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Compiler reporting type could not be found

Open jemoo opened this issue 2 years ago • 1 comments

When I tried to compile the following code, the compiler reporting Type could not be found.

static class DigitsOfE
{
	static (int, int) SumTerms(int a, int b)
	{
	    if (b == a + 1)
	    {
	        return (1, b);
	    }
	    let mid = (a + b) / 2;
	    let (pLeft, qLeft) = SumTerms(a, mid);
	    let (pRight, qRight) = SumTerms(mid, b);
	    return (pLeft * qRight + pRight, qLeft * qRight);
	}
}

image

jemoo avatar Jul 26 '23 16:07 jemoo

On latest nightly (https://github.com/beefytech/Beef/commit/ce42dc4fbe5a7387cd81de7379c49f0477d6367d) this is still an issue. Ready-for-testing project: bug.1878.zip

return (pLeft * qRight + pRight, qLeft * qRight); // Does not work
return (pLeft * qRight + pRight, (qLeft * qRight)); // Works
return (pLeft * qRight + pRight, qLeft / qRight); // Works

kallisto56 avatar Jan 28 '25 03:01 kallisto56