Commit graph

4 commits

Author SHA1 Message Date
Michael Miller
2e5f822e1d
Remove new from reserved keywords
This effectively allows stubs to be placed on the `new` method for types.
A strange issue arose when the keyword was allowed.
The compiler failed to resolve the Stub type from the Double initializer.
The error trace goes through null_double_spec.cr.
Running just that spec file confirms the issue is there, but running other individual files doesn't produce the error.
As a workaround, I've put the full path of Stub in the initializer.
2022-07-12 22:30:04 -06:00
Michael Miller
fb5f44ef10
Add 'new' and 'allocate' to reserved keywords 2022-07-04 20:06:26 -06:00
Michael Miller
0758c19a86
Remove need for nillable argument to cast macro
The `class` method cannot be stubbed as this causes the cast (via `as`) to fail at compile-time.
2022-04-16 16:33:37 -06:00
Michael Miller
04cf211f24
Move reserved keywords to a separate file
Add finalize as a reserved keyword.
2022-03-19 21:56:18 -06:00