FWIW, I ran the compiled code through a decompiler and this is how the same code gets converted as:
*Source*: package { public class A { public var minHeight:Number = 9; public var minHeight2:Number = minHeight; } } *After decompilation*: package { public class A { public function A() { this.minHeight2 = this.minHeight; } public var minHeight2:Number; public var minHeight:Number = 9; } } Next, I tried this (compiles fine): *Source:* package { public class A { public var minHeight:Number = 9; public var minHeight2:Number = this["minHeight"]; } } *After decompilation:* package { public class A { public function A() { this.minHeight2 = this['minHeight']; } public var minHeight2:Number; public var minHeight:Number = 9; } } Not sure if we learned something here, but it just makes it more interesting :-) Om On Mon, Jul 9, 2012 at 11:34 AM, Ryan Frishberg <fri...@gmail.com> wrote: > In ActionScript, it looks like this doesn't work: > > class A > { > > public var minHeight:Number = 9; > > protected var minHeight2:Number = this.minHeight; > > } > > Someone who knows ActionScript in more detail can probably explain why the > compilter/runtime can't figure out what "this" should refer to when > initializing class properties. > > -Ryan > > On Wed, Jul 4, 2012 at 5:53 PM, Justin Mclean <jus...@classsoftware.com > >wrote: > > > Hi, > > > > > BTW, is this an issue in Adobe Flex 4.6 as well? > > Yep issue with both 4.6 and 4.8 and couldn't find an existing JIRA report > > for it. > > > > Justin >