JET-65 Identifier in initializer block resolves to constructor parameter instead of property
+ Scopes for secondary constructors fixed
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class A(~a~val a : Int) {
|
||||
this() {`$a`a}
|
||||
~b~val b = `a`a
|
||||
~b~val b = `$a`a
|
||||
~f~fun f() = `$a`a
|
||||
}
|
||||
|
||||
@@ -10,3 +10,20 @@ fun test() {
|
||||
a.`b`b`:std::Int`
|
||||
a.`f`f()`:std::Int`
|
||||
}
|
||||
|
||||
namespace Jet65 {
|
||||
|
||||
class Foo(~bar~var bar : Int, ~barr~barr : Int, ~barrr~val barrr : Int) {
|
||||
{
|
||||
`$bar`bar = 1
|
||||
`barr`barr = 1
|
||||
`$barrr`barrr = 1
|
||||
}
|
||||
|
||||
this(~s.bar~val bar : Int) : this(1, 1, 1) {
|
||||
`s.bar`bar = 1
|
||||
this.`$bar`bar
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user