From 609756301c6967358a0505e0321a643bab3df807 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 17 Dec 2019 16:49:56 -0800 Subject: [PATCH] go/types: updated NOTES Change-Id: I65cbbb3aaeb1c364932b7e9ee8bdc7635ac41160 --- src/go/types/NOTES | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go/types/NOTES b/src/go/types/NOTES index 9257dca3df..a0c78bd383 100644 --- a/src/go/types/NOTES +++ b/src/go/types/NOTES @@ -3,13 +3,14 @@ TODO - implement contract embedding - interface embedding doesn't take care of literal type constraints yet (need an allTypes list, like we have an allMethods list?) +- type assertions on/against parameterized types OPEN ISSUES - using a contract and enumerating type arguments currently leads to an error (e.g. func f(type T C(T)) (x T) ... ) - contracts slip through in places where only types are permitted - parameterized interface methods (of type bounds) need to be customized (subst) for context -DESIGN DECISIONS +DESIGN/IMPLEMENTATION DECISIONS - 12/4/2019: do not allow parenthesized generic uninstantiated types (unless instantiated implicitly) In other words: generic types must always be instantiated before they can be used in any form More generally: Only permit type instantiation T(x) in type context, when the type is a named type.