Closed JakeShirley closed 8 months ago
Thanks! Fixed.
That was Cpp2's on-by-default general subscript bounds checking catching a bug in self-hosted Cpp2 code that was indexing [0]
on an empty container. I really like having bounds and null-deref checking on by default... I'm pretty careful about defensive checking, but seeing these bounds checks still catch bugs in my own code is a bit of an eye-opener.
Describe the bug I am still cludging my way around enums and typed in some nonsense. I got a really unhelpful message that doesn't help narrow down where the problem is.
To Reproduce
Compile this example:
See the following output:
Additional context Ideally cppfront would not crash. Or it would give a hint at where it was crashing.