Open waneck opened 11 years ago
[comment from lucadelt...@googlemail.com, published at 2013-05-23T21:14:50.000Z] eg:
@:inlineOnly class Vec2 { var x:Float; var y:Float; public inline function new(x:Float, y:Float) { this.x = x; this.y = y; }
public function add(x:Vec2) {}
}
With proposal, the add function would cause an error/warning as in that instance the Vec2 (which is @:inlineOnly) would not be inlineable.
[comment from si...@haxe.org, published at 2013-05-23T21:38:56.000Z] Declaring a class as extern is supposed to cause errors if inline cannot be done, but that doesn't seem to be the case anymore.
[comment from ncanna...@gmail.com, published at 2013-05-24T09:09:52.000Z] You need @:extern on the inline method for that
[Google Issue #1847 : http://code.google.com/haxe/issues/detail?id=1847] by lucadelt...@googlemail.com, at 2013-05-23T21:08:21.000Z It would be nice, perhaps best with compiler metadata to mark a type having an inline constructor as being an 'inline only' type.
i.e. If the type is used, in such a way that it is not inlineable, then it would generate an error, or at the very least a warning that the type was not inlined (Hopefuly, the reason why not!)