paulk-asert commented on code in PR #75:
URL: https://github.com/apache/groovy-website/pull/75#discussion_r2868109431
##########
site/src/site/releasenotes/groovy-2.0.adoc:
##########
@@ -397,25 +407,24 @@ class B extends A { void bar() {} }
// var is at least an instance of A
// so we are allowed to call method foo()
var.foo()
-}
+}
--------------------------------------------
In the test() method above, var is assigned an instance of A, and then
an instance of B in the closure which is call afterwards, so we can at
-least infer that var is of type A. +
- +
+least infer that var is of type A.
+
All those checks added to the Groovy compiler are done at compile-time,
but the generated bytecode is still the same dynamic code as usual — no
-changes in behavior at all. +
- +
+changes in behavior at all.
+
Since the compiler now knows a lot more about your program in terms of
-types, it opens up some interesting possibilities: what about compiling
+types, it opens up some interesting Possibilities: what about compiling
Review Comment:
Everything else looks good but I'm unsure why the Capital P for
possibilities here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]