Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/shader: more strict type check for the built-in cast-like functions #2712

Closed
10 tasks
hajimehoshi opened this issue Jul 27, 2023 · 1 comment
Closed
10 tasks
Labels
Milestone

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Jul 27, 2023

Ebitengine Version

ef08873

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • Xbox
  • Web Browsers

Go Version (go version)

go version go1.20.4 darwin/amd64

What steps will reproduce the problem?

Try to compile this Kage program

package main

func Foo() {
        _ = ivec2(3.1, 4.1)
}

func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
        return vec4(1, 0, 0, 1)
}

What is the expected result?

Fails to comiple due to an inconsistent types

What happens instead?

Succeeds to compile.

Anything else you feel useful to add?

The same issue is in any other built-in functions.

This is a kind of breaking change. I am not sure we should fix this in v2.6. I'll set the milestone v2.7.

@hajimehoshi hajimehoshi added this to the v2.7.0 milestone Jul 27, 2023
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Jul 27, 2023

I'll fix this for ivecN now as there should be few users.

@hajimehoshi hajimehoshi modified the milestones: v2.7.0, v2.6.0 Jul 27, 2023
@hajimehoshi hajimehoshi changed the title internal/shader: more strict type check for the built-in functions internal/shader: more strict type check for the built-in cast-like functions Jul 27, 2023
hajimehoshi added a commit that referenced this issue Jul 27, 2023
…in functions"

This reverts commit 287545b.

Reason: test failures

Updates #2712
@hajimehoshi hajimehoshi reopened this Jul 27, 2023
hajimehoshi added a commit that referenced this issue Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant