From 2c758c54db0eb730af8fc858ddb42604e26b0a5b Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 14 Jun 2024 16:00:48 -0700 Subject: [Parser] Update requirements for implicit type uses (#6665) As an abbreviation, a `typeuse` can be given as just a list of parameters and results, in which case it corresponds to the index of the first function type with the same parameters and results. That function type must also be an MVP function type, i.e. it cannot have a nontrivial rec group, be non-final, or have a declared supertype. The parser did not previously implement all of these rules. --- src/parser/contexts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parser/contexts.h') diff --git a/src/parser/contexts.h b/src/parser/contexts.h index 4acfc981a..6dabfca3d 100644 --- a/src/parser/contexts.h +++ b/src/parser/contexts.h @@ -1119,7 +1119,7 @@ struct ParseImplicitTypeDefsCtx : TypeParserCtx { types(types), implicitTypes(implicitTypes) { for (auto type : types) { if (type.isSignature() && type.getRecGroup().size() == 1 && - !type.isShared()) { + !type.getDeclaredSuperType() && !type.isOpen() && !type.isShared()) { sigTypes.insert({type.getSignature(), type}); } } -- cgit v1.2.3