Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
vala
vala
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 703
    • Issues 703
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 39
    • Merge Requests 39
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GNOME
  • valavala
  • Issues
  • #463

Closed
Open
Opened Jul 30, 2014 by bugzilla-migration@bugzilla-migrationReporter

Object-type construct properties overwrite their default with null

Submitted by d.f..@..web.de

Link to original bug (#734013)

Description

Created attachment 282115 An example for an overwritten default value

The attached file shows a class that has a construct-only property of type Object. Whenever the construct block of the property is called, it just outputs its value. By default the property shall be assigned some newly created Object.

Running the program first outputs some address, indicating that the default indeed was set. But after that it outputs "(nil)" indicating that the property was again assigned, now to a null value. Would the property be stored, as an automatic property would do, this would overwrite it.

This also happens with "set construct" blocks, but not with "set" blocks. They are called just once, as it should be expected from construct blocks also.

Attachment 282115, "An example for an overwritten default value":
construct-property.vala

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/vala#463