tracker issue : CF-3283249

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

Import ed interface is not resolved correctly on returnTypes

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Walter Seethaler / Walter Seethaler (Walter Seethaler)

Created: 07/10/2012

Components: Language

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9.0.1 / 288680

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Problem Description: An example is attached as a zip. Just extract it to an empty webroot.

import api.IExample;
component
	implements="api.IExample"
	extends="Base"
{
	IExample function init(){
		//doSomething();                 //Uncomment to get the error
		return THIS;
	}
}

In the Example ColdFusion throws an error ("The value returned from the init function is not of type IExample"), when you uncomment the inherited method (doSomething()). CF seems to change its type resolving if you make a call to the superclass. There are no problems, when you don't use import, but code the type "api.IExample" dirctly in the init method.

Steps to Reproduce:
See atached zip.

Actual Result:
Correct type is not resolved correctly.

Expected Result:
No error.

Any Workarounds:
Don't use import.

Imports are a pretty easy concept in oo, but in CF the imports and the type system in general giving me a consistent headache. This is not the only bug, if just didn't figure out the other problems. Maybe people shouldn't use import until it is supported properly.

As a convenience, it should not be necessary to import types, that are already implemented by the class (~ implicit import).

So, thanks for reading this, before you set it to the "not enougth time" state:(

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

Watson Bug ID:	3283249

External Customer Info:
External Company:  
External Customer Name: Walter Seethaler
External Customer Email:  
External Test Config: My Hardware and Environment details: Windows 7, Apache, CF 9.0.1 with latest hotfixes, localhost

Attachments:

  1. July 11, 2012 00:00:00: 1_bugtest.zip

Comments:

Bug verified (Comment added from ex-user id:vnigam)
Comment by Adobe D.
18737 | December 17, 2013 06:23:22 AM GMT
Test case at cfsuite\components\ImportNew\CF-3283249\ (Comment added from ex-user id:vnigam)
Comment by Adobe D.
18738 | February 26, 2014 01:37:42 AM GMT