tracker issue : CF-3940947

select a category, or use search below
(searches all categories and all time range)
Title:

Dependency inject mixin to fulfil interface

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 02/17/2015

Components: Language, CF Component

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Few users will encounter

Locale/System: English / Platforms All

Vote Count: 0

See: http://blog.adamcameron.me/2015/02/cfml-interface-fulfilment-via-mixin.html

Given this:

// I.cfc

interface {
	function f(required numeric x);
}

and this:

// functions.cfm

function f(required numeric x){
	return x;
}

And this:

// UsingRuntimeMixin.cfc

component implements="I" {

	function init(required string mixinFile){
		include mixinFile;
	}
}

Then this should work:

// usingRuntimeMixin.cfm

o = new UsingRuntimeMixin("functions.cfm");
writeOutput(o.f(1));

It doesn't.

The logic is fine, because if one takes the implements="I" out of UsingRuntimeMixin, it works fine.

-- 
Adam

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3940947

External Customer Info:
External Company:  
External Customer Name: Adam
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Can you please confirm in what version of ColdFusion this is going to be implemented in. It says "to fix" but does not say which version.
Comment by External U.
8443 | January 25, 2016 08:21:13 AM GMT