[Next] [Previous] [Up] [Top] [Contents] [Index]

4.1 Explicit Parameterization

4.1.4 Method Lookup

Method lookup is extended to include the number of explicit parameters of candidate methods as part of the method selection process. A message of the form name[type1,...,typeM](expr1,...,exprN), with M and N zero or greater, will only match methods named name with M explicit formal type parameters and N formal arguments. Method lookup does not depend on the constraints placed on legal instantiating types of explicit formal type parameters. For example,

method foo[T <= integer]():void { ... }
does not override

method foo[T <= number]():void { ... }
In fact, these two methods could not legally be defined in the same system, since they have the same name, same number of explicit type parameters, same number of arguments, and same argument specializers.


The Cecil Language: Specification and Rationale, Version 2.1 - 25 MARCH 1997
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker