• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Variable declared with interface type does not offer functions of Object in content assist

Explorer ,
Oct 20, 2010 Oct 20, 2010

Copy link to clipboard

Copied

Hi

When I declare a variable such as

var whatever:ISomeInterface;

then FB does not offer functions declared in type Object, such as hasOwnProperty, for that variable.

I have to cast to Object. What's the point of this? Can interfaces be implemented by something else than Objects?

Views

433

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 20, 2010 Oct 20, 2010

Copy link to clipboard

Copied

LATEST

The Compiler itself does not allow you to access hasOwnProperty of Object like that. Only when you implement the interface to a class, then that class becomes an "Object".

I have logged a bug to track this problem. https://bugs.adobe.com/jira/browse/FB-27683

-Radhakrishna

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines