mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
[type-determiner] return false when type determining an undeclared function
Change-Id: Ia7e43be64675528037f92026a6c239d1e5220fc0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26941 Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
8fcf269d4b
commit
844f632785
23
test/function-must-be-declared-before-use-fail.wgsl
Normal file
23
test/function-must-be-declared-before-use-fail.wgsl
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright 2020 The Tint Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
fn main() -> void {
|
||||
var a:f32 = func1();
|
||||
return;
|
||||
}
|
||||
|
||||
fn func1() -> f32 {
|
||||
var a:i32 = 2.1;
|
||||
return a;
|
||||
}
|
||||
Reference in New Issue
Block a user