Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2205] Android regression: typeof returns "object" instead of "function" for native functions

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:58:24.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, function, kroll, object, typeof
ReporterBrion Vibber
AssigneeMarshall Culpepper
Created2011-04-15T03:13:28.000+0000
Updated2011-04-17T01:58:24.000+0000

Description

Functions on native proxies and modules are being reported as 'object' by the typeof operator on Android in current 1.5 code from git; they should probably return 'function' to keep from confusing code.

This source:

Ti.API.info('typeof Ti.API.info is: ' + typeof Ti.API.info);

On iOS gives the expected "function":

[INFO] typeof Ti.API.info is: function

On Android with git trunk we get unexpected "object":

[INFO] [4,427] typeof Ti.API.info is: object

Whereas under 1.4.1.1 we got "function" as we expected:

[INFO] [2,364] typeof Ti.API.info is: function

Comments

  1. Marshall Culpepper 2011-04-15

    This was recently resolved, marking as duplicate of #2288

  2. Matt Schmulen 2011-04-15

    Pass Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8), Android 1.6/2.1 custom app.

JSON Source