Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
pike
pike
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 105
    • Issues 105
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • pikelang
  • pikepike
  • Issues
  • #2094

Closed
Open
Opened Aug 29, 2001 by Peter Bortas@zinoOwner

optional modifier fails

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2094

Reported by Martin Nilsson, IDA nilsson@pike.ida.liu.se

The code

class MyFont {
  inherit Image.Font;

  optional string _sprintf() {
    return "MyFont";
  }
}

MyFont stuff() {
  return Image.Font();
}

fails with

bash-2.03$ /export/d1/nilsson/pike/7.2.166/bin/pike test.pike
test.pike:11:Wrong return type.
test.pike:11:Expected: object(implements 65585)
test.pike:11:Got     : object(is 65590)
test.pike:11:Missing identifier "_sprintf".
Pike: Failed to compile script:
Compilation failed.

bash-2.03$ /export/d1/nilsson/pike/7.3.11/bin/pike test.pike
test.pike:11:Wrong return type.
test.pike:11:Expected: { MyFont = object(implements 65601) }
test.pike:11:Got     : object(is 103)
test.pike:11:Missing identifier "_sprintf".
Pike: Failed to compile script:
Compilation failed.
Assignee
Assign to
Pike 7.4
Milestone
Pike 7.4
Assign milestone
Time tracking
None
Due date
None
Reference: pikelang/pike#2094