@@ -39,32 +39,28 @@ def foo[T, U][V](x: T): U = ???
39
39
40
40
// add function call to chainedParams
41
41
42
-
43
- // Que faire de TypeDcl ::= id [TypeParamClause] {FunParamClause} TypeBounds [‘=’ Type] //TODO: change to {ParamClauses} ?
44
-
45
-
46
- /* Endroits à changer: (toujour creation et application)
42
+ /* Endroits à changer: (toujour creation et application ?)
47
43
function definition Done
48
44
function application Already works
49
- class definition In Progress
50
- primary constr In Progress
51
- auxiliary constr In Progress
52
- class instantiation Might already work // see new
53
- given definition Todo
54
- given application(?) Doesn't exist ? or add multiple params to usings ?
55
- type declarations To be determined
45
+ class definition Standby
46
+ primary constr Standby
47
+ auxiliary constr Standby
48
+ class instantiation Standby ( Might already work // see new)
49
+ given definition Todo //yes if given alias, Standby otherwise given name[](using ...)[](using ...) : Classe[Params]
50
+ given application(?) Already works ?/standby Doesn't exist ? or add multiple params to usings ? (using name: Class[T]{val x}[U])
51
+ type declarations Standby: because no transformation from F[X,Y] <-> F[X][Y] //is [X,Y] =>> F[X][Y] valid ?
56
52
type instantiation Doesn't exist ?
57
- extension definition Todo
58
- extension application Todo
53
+ extension definition Todo // probably only on right side, since classes do not keep info about params
54
+ extension application Todo: tester
59
55
*/
60
56
61
57
62
58
63
59
// étapes pour "convaincre"
64
- // 1) exemples simples, et exemples d'utilité
65
- // 2) expliquer intuitivement
66
- // 3) update la doc
67
- // 4) PR et tout le tralala
60
+ // 1) exemples simples, et exemples d'utilité TODO
61
+ // 2) expliquer intuitivement TODO
62
+ // 3) update la doc Done
63
+ // 4) PR et tout le tralala TODO
68
64
69
65
70
66
// potentiellement cette feature en experimental
@@ -77,20 +73,85 @@ val f = foo //should work and doesn't preserve type params yet
77
73
78
74
79
75
// new:
80
- // mettre de coté la partie sur les classes
81
- // fork le repo de la doc est faire changements appropriés
76
+ // mettre de coté la partie sur les classes: Done
77
+ // fork le repo de la doc est faire changements appropriés: Done: https://github.com/scala/scala/pull/9792
82
78
// check overloading resolution
83
- // Applications.scala resolveMapped
79
+ // Applications.scala resolveMapped //What to do here?
84
80
// methType
85
81
// ProtoTypes.scala
86
82
87
- // check ne passer aucun arguments à une fonction
88
- // voir fichier overload dans pos/interweaving_
89
- // voir methType
83
+ // check ne passer aucun arguments à une fonction // Je me rappelle pas ce que c'était ...
84
+ // voir fichier overload dans pos/interweaving_ // Done
85
+ // voir methType // Done ?
90
86
// check occurances de PolyType et PolyProto pour être sûr que ça fonctionne bien avec les [T][U]
87
+ // PolyType: Done in Application.scala
88
+ // PolyProto: Done in Application.scala
91
89
// testCompilation
90
+ // Pas eu le temps, mais la PR a lancer des tests, donc 5 qui ont ratés dans une phase
92
91
92
+ // check def foo[T][T]
93
+ //
94
+ // is def foo[T](using T)(x: Int) valid ?
95
+ /*
96
+ * check: done see newline.scala
97
+ * def foo
98
+ * [T]
99
+ * (x: T)
100
+ * [U]
101
+ *
102
+ * and similar
103
+ *
104
+ */
93
105
94
106
95
107
// should we allow fun[L <: List[T]][T] as alias for something like fun[F[_] <: List[]][T][L <: F[T]]
96
- // I'm not sure it's useful
108
+ // I'm not sure it's useful
109
+
110
+
111
+
112
+ // dans docu check "method type" et "poly(morphic) type/method" pour voir si suppositions fausses
113
+ //
114
+
115
+ // tryApply:
116
+ // si f pas fonction, essaie f.apply(...)
117
+
118
+
119
+
120
+ // next:
121
+ // Relire toute docu: Done
122
+ // voir eta expension dans la doc, pour voir comment changer pour polymorphique, ajouter texte qui explique que passe parfois param de type si besoin
123
+ // mettre un peu au propre texte PR -> trouver exemples
124
+ // essayer given def: Paused
125
+
126
+
127
+ /**
128
+ * A few comments:
129
+ Should handle and test for extension definitions as well.
130
+ Should test of overriding and signature check and proper report when signature does not match.
131
+ I suggest opening a thread on https://contributors.scala-lang.org/ to discuss this language change.
132
+ *
133
+ *
134
+ *
135
+ *
136
+ */
137
+
138
+
139
+ // type Z = X =>> F[X]
140
+ // def name: [X] => (X, X) => (U)
141
+
142
+
143
+ // def foo[T](x: T): T
144
+ // val bar = foo
145
+
146
+
147
+ // check overload: (should fail)
148
+ // def foo(x: Int)(y: String)
149
+ // def foo(x: Int)[T](y: String)
150
+ // def foo[T](x: Int)(y: String)
151
+
152
+
153
+
154
+ // next
155
+ // adaptations faitent dans Typer.scala adapt (regarder la fin ou il y a le "vrai" body de la fonction)
156
+ // pour rajouter le cas valId3 qui typecheck (les autres cas ce sera pour après)
157
+ // https://github.com/lampepfl/dotty/pull/4672
0 commit comments