Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Empty Array Initialisers #692
The following fails to compile:
function f() -> int: return ""
The problem is here is twofold:
This is pretty unsatisfactory. For string constants, we can at least resolve the issue by introducing a special kind of string constant. For general array constants, it's not clear what the right solution is.
Empty strings now work fine. The only problem is empty array initialisers:
But, it does make me wonder whether we can revisit the issue of typing them as
We can type items in the false branch as