-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a fallback mechanism to the legacy init list
After we create the constructor invoke expression, we need to resolve this expression by ResolveInvoke(), and if it's failed we need a mechanism to fallback to the legacy initialization list logic. This change use sub visitor with a temporary diagnose sink to call the ResolveInvoke(), such that compile process won't be aborted if the error happens. The condition allowing the fall back is that the struct has to be a C-style struct, described in: https://github.com/shader-slang/slang/blob/master/docs/proposals/004-initialization.md
- Loading branch information
1 parent
1123fb3
commit 73a61d1
Showing
3 changed files
with
162 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters