Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Mixing callsite assign and callsite source #126

@jwerle

Description

@jwerle

Consider the following hypothetical assert function that mixes callsite_source and callsite assign syntax:

fn assert(
  bool assertion,
  char* callsite_source<file> unsafe file,
  char* callsite_source<function> unsafe scope,
  usize callsite_source<line> line,
  char *message = 0
) {
 ...
}

The compiler will yield the following compilation error:

[ERROR] call argument count mismatch
  --> /home/werle/repos/zzmodules/runtime-assert/tests/pass.zz:10:3
   |
10 |   assert(true);␊
   |   ^----^
   |
   = function '::runtime_assert::assert' is defined over 5 arguments, but you passed 4

when the message argument is not defined. Is this intended? The compiler will succeed in compilation when the message argument is given.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions