TRAIT_Method is underspecified.

NEW
Unassigned

Status

Tamarin
Documentation
6 years ago
6 years ago

People

(Reporter: Edwin Smith, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
Future

Details

(Reporter)

Description

6 years ago
A toplevel function in AS3 source is compiled to a TRAIT_Method of the ABC script object, if it's in a package, but not otherwise.

In a script traits, TRAIT_Method is a toplevel function.  In a class traits, its a static method.  In an instance traits, its either a concrete method or an interface method signature, depending on whether the instance traits is an interface or not.

What is it, in an activation traits?  is that allowed?

Does the use of TRAIT_Method for toplevel functions need more AVM spec coverage, or is this an AS3 language spec issue?
(Reporter)

Updated

6 years ago
Blocks: 416391
Target Milestone: --- → Future
(Reporter)

Comment 1

6 years ago
From avm2overview.doc

[Trait_Method, Trait_Getter, and Trait_Setter] imply fixture methods, not writable properties.  For ES3 compliance Trait_Method should not be used for any function unless the compiler can prove that the function is constant.

It does appear that Trait_Method can be used arbitrarily, it’s not restricted to traits on class instances, but this is not documented.
You need to log in before you can comment on or make changes to this bug.