improved vairable tracking, fixed plugin to wirk with 1.0.10, fixed lambda comparison
This commit is contained in:
1 parent
1e18a162c4
commit
0732202c80
12 files changed
+266
-28
No files matched your search
@@ -81,8 +81,14 @@ statements discussed later, there could be default values, ellipsis, etc.
|
||||
class Point(x=0,y=0)
|
||||
val p = Point()
|
||||
assert( p.x == 0 && p.y == 0 )
|
||||
|
||||
// Named arguments in constructor calls use colon syntax:
|
||||
val p2 = Point(y: 10, x: 5)
|
||||
assert( p2.x == 5 && p2.y == 10 )
|
||||
>>> void
|
||||
|
||||
Note that unlike **Kotlin**, which uses `=` for named arguments, Lyng uses `:` to avoid ambiguity with assignment expressions.
|
||||
|
||||
## Methods
|
||||
|
||||
Functions defined inside a class body are methods, and unless declared
|
||||
|
||||
Reference in new issue
Block a user