Class ExactSingleParameter
java.lang.Object
org.ek9lang.compiler.support.ExactSingleParameter
THE test "this method or operator takes exactly ONE parameter, and its type is EXACTLY this type" - by
isExactSameType, never by assignability. The question a copy constructor (CopyConstructor), a
copy operator :=: taking exactly its owner (PolymorphicCopy) and the nearest-operator lookup
(InheritedOperators) each asked in their own words (front-end rationalisation X-3).
Deliberately NOT DefaultedComparisonDelegate's takesItself, which asks "is the owner ASSIGNABLE
to the parameter type" - a comparison against a trait or a super is still a comparison with itself there. And not
Sameness.isSelfComparison(IAggregateSymbol, MethodSymbol), which is the same assignable rule. Two questions, two answers; never a third.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleantakes(MethodSymbol method, ISymbol type) True whenmethodtakes exactly one parameter whose type is exactlytype.
-
Method Details
-
takes
True whenmethodtakes exactly one parameter whose type is exactlytype.
-