-
-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[struct-init] Ignore non-physical fields. (#11662)
- Loading branch information
1 parent
9d2007b
commit b951d8e
Showing
3 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@:structInit | ||
class Foo { | ||
@:isVar public var real(get, set):String; | ||
public var foo(get, never):String; | ||
public var bar(get, set):String; | ||
|
||
function get_real() | ||
return real; | ||
|
||
function set_real(v) | ||
return real = v; | ||
|
||
function get_foo() | ||
return "foo"; | ||
|
||
function get_bar() | ||
return "bar"; | ||
|
||
function set_bar(v) | ||
return v; | ||
} | ||
|
||
function main() { | ||
var foo:Foo = { | ||
real: "real" | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-m Main | ||
--interp |