Require references from typealiases to be const (#516)

This adds a language change that requires references from typealiases
to the enclosing module to be `const`.

This is required because typealiases are not late-bound.

Rationale is laid out in SPICE-0007.

Also:
* Update documentation to reflect new rules.
* Fix `Project.pkl`; mark method `const` to not break said rule.
This commit is contained in:
Daniel Chao
2024-06-10 09:01:05 -07:00
committed by GitHub
parent 9cc9816440
commit a4c0a271b4
5 changed files with 37 additions and 7 deletions
@@ -439,7 +439,7 @@ public final class SymbolTable {
String qualifiedName,
FrameDescriptor.Builder frameDescriptorBuilder,
List<TypeParameter> typeParameters) {
super(parent, name, qualifiedName, ConstLevel.NONE, frameDescriptorBuilder, typeParameters);
super(parent, name, qualifiedName, ConstLevel.MODULE, frameDescriptorBuilder, typeParameters);
}
}