Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific undefined type exceptions + Support FQCN types in MethodScript code #1379

Merged

Conversation

Pieter12345
Copy link
Contributor

Specific undefined type exceptions

  • Wrap bare strings in __type_ref__() if they are used as a type in syntax.
  • Handle __type_ref__() unknown types in StaticAnalysis typechecking.
  • Handle __type_ref__() unknown types in compile time when StaticAnalysis is disabled (this is possible until custom user types are added, at which point StaticAnalysis would be necessary to determine whether these types exist or not).

Avoids getting a set of cryptic exceptions when using an non-existent types.

Support FQCN types in MethodScript code

Support FQCN in ms.lang.int @a = 1;, try {} catch (ms.lang.Exception @ex) {} and proc _a(ms.lang.int @a) {} syntax.
Note that assign(ms.lang.int, @a, 1) is not supported due to assign.postParseRewrite() running after bare string warning/error generation.

@LadyCailin LadyCailin self-requested a review March 28, 2024 08:51
@Pieter12345 Pieter12345 force-pushed the specific-undefined-type-exceptions branch from 36fc463 to 4bf2efc Compare March 28, 2024 16:48
- Wrap bare strings in `__type_ref__()` if they are used as a type in syntax.
- Handle `__type_ref__()` unknown types in StaticAnalysis typechecking.
- Handle `__type_ref__()` unknown types in runtime when StaticAnalysis is disabled.

Avoids getting a set of cryptic exceptions when using an non-existent types.
Support FQCN in `ms.lang.int @A = 1;`, `try {} catch (ms.lang.Exception @ex) {}` and `proc _a(ms.lang.int @A) {}` syntax. Note that `assign(ms.lang.int, @A, 1)` is not supported due to `assign.postParseRewrite()` running after bare string warning/error generation.
@Pieter12345 Pieter12345 force-pushed the specific-undefined-type-exceptions branch from 4bf2efc to 90e4c53 Compare March 28, 2024 22:32
@Pieter12345 Pieter12345 merged commit 7c6bdd8 into EngineHub:master Mar 28, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants