Closed JSAbrahams closed 4 years ago
This has been partially rectified by fixing how class arguments are constructed in the Context (and by modifying some application logic for consistency as well).
However, we run into the issue that the desugar stage has no way of knowing when we have a constructor, which is troublesome when we attempt to use the Complex
constructor as this should be desugared to complex
, whereas a function which is not a constructor should remain untouched.
Therefore, we need a mechanism for modifying our AST during the type-checking phase so we can desugar functions as either constructor invocations or as normal functions. So we need to implement #165 first.
Once merged, this fixes #186
Description of Bug
Complex is not recognized.
How to Reproduce
Complex(2,3)
Expected behaviour
The above should be treated as a constructor for the
Complex
class