ff6c5bf5ed
Two minor changes: - Converting a Block with bad statements will now generate a partial block instead of nullptr. The change mirrors how DSL behaves; functions containing invalid statements will now be created and added to the program. Previously, we would discard a function definition with any invalid statements inside; this prevented duplicate-function-definition errors from appearing. - Converting a return with a bad expression will now generate a poisoned return instead of nullptr. This change improves diagnostics for functions with invalid return statements. If we eliminate the return statements (by returning null), we report bad return statements as "function can exit without returning a value" (which is confusing). Change-Id: I6d998d5c50585f8d96bb7e3cb7f59b63125d6a62 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446325 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
54 lines
3.1 KiB
GLSL
54 lines
3.1 KiB
GLSL
### Compilation failed:
|
|
|
|
error: 28: type mismatch: '=' cannot operate on 'int', 'float'
|
|
error: 29: type mismatch: '=' cannot operate on 'uint', 'float'
|
|
error: 30: type mismatch: '=' cannot operate on 'int', 'uint'
|
|
error: 31: type mismatch: '=' cannot operate on 'int', 'float'
|
|
error: 32: type mismatch: '=' cannot operate on 'float', 'int'
|
|
error: 32: function 'f_eq_i_disallowed' can exit without returning a value
|
|
error: 33: type mismatch: '=' cannot operate on 'float', 'uint'
|
|
error: 33: function 'f_eq_u_disallowed' can exit without returning a value
|
|
error: 34: type mismatch: '=' cannot operate on 'uint', 'int'
|
|
error: 35: type mismatch: '=' cannot operate on 'uint', 'float'
|
|
error: 36: type mismatch: '+' cannot operate on 'int', 'float'
|
|
error: 37: type mismatch: '-' cannot operate on 'int', 'float'
|
|
error: 38: type mismatch: '*' cannot operate on 'int', 'float'
|
|
error: 39: type mismatch: '/' cannot operate on 'int', 'float'
|
|
error: 40: type mismatch: '+' cannot operate on 'float', 'int'
|
|
error: 41: type mismatch: '-' cannot operate on 'float', 'int'
|
|
error: 42: type mismatch: '*' cannot operate on 'float', 'int'
|
|
error: 43: type mismatch: '/' cannot operate on 'float', 'int'
|
|
error: 44: type mismatch: '+' cannot operate on 'uint', 'float'
|
|
error: 45: type mismatch: '-' cannot operate on 'uint', 'float'
|
|
error: 46: type mismatch: '*' cannot operate on 'uint', 'float'
|
|
error: 47: type mismatch: '/' cannot operate on 'uint', 'float'
|
|
error: 48: type mismatch: '+' cannot operate on 'float', 'uint'
|
|
error: 49: type mismatch: '-' cannot operate on 'float', 'uint'
|
|
error: 50: type mismatch: '*' cannot operate on 'float', 'uint'
|
|
error: 51: type mismatch: '/' cannot operate on 'float', 'uint'
|
|
error: 52: type mismatch: '+' cannot operate on 'int', 'float'
|
|
error: 53: type mismatch: '-' cannot operate on 'int', 'float'
|
|
error: 54: type mismatch: '*' cannot operate on 'int', 'float'
|
|
error: 55: type mismatch: '/' cannot operate on 'int', 'float'
|
|
error: 56: type mismatch: '+' cannot operate on 'float', 'int'
|
|
error: 57: type mismatch: '-' cannot operate on 'float', 'int'
|
|
error: 58: type mismatch: '*' cannot operate on 'float', 'int'
|
|
error: 59: type mismatch: '/' cannot operate on 'float', 'int'
|
|
error: 60: type mismatch: '+' cannot operate on 'uint', 'float'
|
|
error: 61: type mismatch: '-' cannot operate on 'uint', 'float'
|
|
error: 62: type mismatch: '*' cannot operate on 'uint', 'float'
|
|
error: 63: type mismatch: '/' cannot operate on 'uint', 'float'
|
|
error: 64: type mismatch: '+' cannot operate on 'float', 'uint'
|
|
error: 65: type mismatch: '-' cannot operate on 'float', 'uint'
|
|
error: 66: type mismatch: '*' cannot operate on 'float', 'uint'
|
|
error: 67: type mismatch: '/' cannot operate on 'float', 'uint'
|
|
error: 68: type mismatch: '+' cannot operate on 'int', 'uint'
|
|
error: 69: type mismatch: '-' cannot operate on 'int', 'uint'
|
|
error: 70: type mismatch: '*' cannot operate on 'int', 'uint'
|
|
error: 71: type mismatch: '/' cannot operate on 'int', 'uint'
|
|
error: 72: type mismatch: '+' cannot operate on 'uint', 'int'
|
|
error: 73: type mismatch: '-' cannot operate on 'uint', 'int'
|
|
error: 74: type mismatch: '*' cannot operate on 'uint', 'int'
|
|
error: 75: type mismatch: '/' cannot operate on 'uint', 'int'
|
|
50 errors
|