Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: doc/GENERIC_METHODS.md

Issue 1541833002: Update strong mode doc (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: git cl land Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « STRONG_MODE.md ('k') | doc/JS_CODEGEN.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: doc/GENERIC_METHODS.md
diff --git a/GENERIC_METHODS.md b/doc/GENERIC_METHODS.md
similarity index 99%
rename from GENERIC_METHODS.md
rename to doc/GENERIC_METHODS.md
index 2b3174360877c0f567c968e3f3f247651e0cc16e..d017fb4353efa1c4ed980960e98c9a8319015dd9 100644
--- a/GENERIC_METHODS.md
+++ b/doc/GENERIC_METHODS.md
@@ -73,7 +73,7 @@ mode tools, but will be interpreted as `T` by strong mode. For example:
// foo is a generic method which takes a single generic method parameter S.
// In strong mode, the parameter x will have type S, and the return type will
// be S
-// In normal mode, the parameter x will have type dynamic, and the return
+// In normal mode, the parameter x will have type dynamic, and the return
// type will be dynamic.
dynamic/*=S*/ foo/*<S>*/(dynamic/*=S*/ x) { return x; }
```
@@ -102,7 +102,7 @@ declaring local variables and parameters, you can also use the `/*=T*/` syntax w
// foo is a generic method that takes a single generic parameter S, and a value
// x of type S
void foo/*<S>*/(var /*=S*/ x) {
- // In strong mode, y will also have type S
+ // In strong mode, y will also have type S
var /*=S*/ y = x;
// In strong mode, z will also have type S
@@ -135,7 +135,7 @@ List<dynamic /*=S*/> foo/*<S>*/(/*=S*/ x) {
// l0 is a list literal whose reified type will be List<S> in strong mode,
// and List<dynamic> in normal mode.
var l0 = <dynamic /*=S*/>[x];
-
+
// as above, but with a regular constructor.
var l1 = new List<dynamic /*=S*/>();
return l1;
@@ -150,7 +150,7 @@ enclosed in parentheses, eliminating the need for explicitly writing `dynamic`.
List/*<S>*/ foo/*<S>*/(/*=S*/ x) {
// The shorthand syntax is not yet supported for list and map literals
var l0 = <dynamic /*=S*/>[x];
-
+
// but with regular constructors you can use it
var l1 = new List/*<S>*/();
return l1;
« no previous file with comments | « STRONG_MODE.md ('k') | doc/JS_CODEGEN.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698