From 841027f0901599706c8849e1cb063dbe38b762e0 Mon Sep 17 00:00:00 2001 From: Supun Setunga Date: Wed, 16 Oct 2024 14:10:22 -0700 Subject: [PATCH] Explain the reason for support parsing legacy restricted types --- runtime/parser/type.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/parser/type.go b/runtime/parser/type.go index a9df066c64..5a86be1fb6 100644 --- a/runtime/parser/type.go +++ b/runtime/parser/type.go @@ -479,9 +479,9 @@ func defineIntersectionOrDictionaryType() { }, ) - // While restricted types have been removed from Cadence, during the first few months of the - // migration period, leave a special error in place to help developers - // TODO: remove this after Stable Cadence migration period is finished + // Though the restricted types were removed starting with Cadence v1.0, + // still try to parse restricted types if present, and report a proper error. + // This is to give meaningful error messages for anyone trying pre-1.0 codes. setTypeMetaLeftDenotation( lexer.TokenBraceOpen, func(p *parser, rightBindingPower int, left ast.Type) (result ast.Type, err error, done bool) {