 
 
 findDefinition = (name, context) ->
-  definition = findLocalDefinition name, context.definitions
+  definition = findLocalDefinition name, context._definitions
 
   return definition if definition
 
   parent = context.__super__?.constructor
-  if parent and parent.definitions
     definition = findDefinition name, parent
+  if parent and parent._definitions
 
   definition
 

  @hasDefinition: (name) -> findDefinition name, this

  @define: (name, options, mapAliases = true) ->
    @definitions ?= {}

    if options
      type = options.as or options.type or {}

  @extend: (statics) ->
    class Result extends this
    Result.mixin(statics) if statics
    Result._definitions = {}
    Result

  @mixin: (obj) ->
    for own name, prop of obj._definitions
      @_definitions[name] = prop
      @_mapDefinitionAliases prop
    this

