Fix setter bypass.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
"license": "MIT",
|
||||
"tags": ["tink", "macro", "utility"],
|
||||
"description": "The macro toolkit ;)",
|
||||
"version": "0.0.3-beta",
|
||||
"releasenote": "Sidestep dce issues.",
|
||||
"version": "0.0.4-beta",
|
||||
"releasenote": "Setter bypass fix.",
|
||||
"contributors": ["back2dos"],
|
||||
"dependencies": {
|
||||
"tink_core": "1.0.0-beta.4"
|
||||
|
||||
@@ -72,9 +72,6 @@ class Constructor {
|
||||
args.push( { name : name, opt : opt || e != null, type : t, value: e } );
|
||||
|
||||
public function init(name:String, pos:Position, with:FieldInit, ?options:{ ?prepend:Bool, ?bypass:Bool }) {
|
||||
@:privateAccess
|
||||
if (owner.memberMap.exists('name'))
|
||||
owner.memberMap.get('name').addMeta(':isVar');
|
||||
if (options == null)
|
||||
options = {};
|
||||
var e =
|
||||
@@ -95,6 +92,11 @@ class Constructor {
|
||||
var tmp = MacroApi.tempName();
|
||||
|
||||
if (options.bypass) {
|
||||
switch @:privateAccess owner.memberMap[name] {
|
||||
case nil if (nil == null):
|
||||
case member: member.addMeta(':isVar');
|
||||
}
|
||||
|
||||
if (Context.defined('dce') && Context.definedValue('dce') == 'full') {
|
||||
if (keepers.length == 0)
|
||||
keepers.push(macro return);
|
||||
|
||||
Reference in New Issue
Block a user