From 79785375f89c273a37281d167a2d3ad1030b49cb Mon Sep 17 00:00:00 2001 From: gavinking Date: Thu, 28 Jul 2016 13:53:34 +0200 Subject: [PATCH] add a note clarifying https://github.com/ceylon/ceylon.ast/issues/118 --- typechecker/en/modules/expressions.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/typechecker/en/modules/expressions.xml b/typechecker/en/modules/expressions.xml index b61f67cbb60..648071e7ad1 100644 --- a/typechecker/en/modules/expressions.xml +++ b/typechecker/en/modules/expressions.xml @@ -2631,6 +2631,12 @@ Digit{1,2} ":" Digit{2} ( ":" Digit{2} ( ":" Digit{3} )? )? Operands within brackets in any subrange operator are parsed as if they were operands of the .. or : operators. + Note: an ambiguity exists in interpretation of expressions like + map[n..m] and map[0:l], where the expression + could in principle be interpreted as a lookup operator applied to a range + constructor. This ambiguity is always resolved in favor or interpreting the + expression as a subrange operator. + There are two special cases related to sequences. A type X is a sequence type if X is a subtype of Sequential<Anything>.