Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Divide assign of float struct member and zero compilation error #2558

@yakkudev

Description

@yakkudev

Using the divide assign operator on a float struct member and a zero causes this peculiar compilation error:

code:

struct Foo {
	float val;
}

fn void main() {
	Foo bar;
	bar.val /= 0f; // Error: 110y zero not allowed.
}

error:

 4: 
 5: fn void main() {
 6: 	Foo bar;
 7: 	bar.val /= 0; // Error: 110y zero not allowed.
    	          ^
(c3test/main.c3:7:13) Error: 110y zero not allowed.

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingFixed needs testingNeeds verification / testing that it now works

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions