handzlikchris / handzlikchris/FastScriptReload

'This' rewriting causes some issues with rewritting generic methods

オープン
#9 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug user-code-rewrite
主要言語
C#
スター
2.2k
フォーク
167
PR マージ指標
30日以内にマージされた PR はありません

説明

KillerJoe — Yesterday at 20:02
next problem: I have a generic Method "Parent" for the UiElements:

public static T Parent(this T element, VisualElement parent, bool grow = false, int? insertIndex = null) where T : VisualElement {

its changed to ".Parent((dynamic)this)" causing an compile error.

FSR: Error when updating files: 'LoadByUrl.cs', System.Exception: Compiler failed to produce the assembly. Output: 'C:\Users\tfoso\AppData\Local\Temp\3bcdba1c62ed4b1d9e72f62953347396.SourceCodeCombined.cs(222,15): error CS1929: 'HorizontalPanel' does not contain a definition for 'Parent' and the best extension method overload 'VisualElementExtension.Parent(T, VisualElement, bool, int?)' requires a receiver of type 'T'

C:\Users\tfoso\AppData\Local\Temp\3bcdba1c62ed4b1d9e72f62953347396.SourceCodeCombined.cs(259,87): error CS1929: 'I18nLabel' does not contain a definition for 'Parent' and the best extension method overload 'VisualElementExtension.Parent(T, VisualElement, bool, int?)' requires a receiver of type 'T'

[ ] Killer Joe from Discord

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with the compiler errors reported while updating LoadByUrl.cs and compare the original generic Parent extension call with its rewritten `.Parent((dynamic)this)` form. Trace the rewriting logic that produces the generated source, then verify that calls on HorizontalPanel and I18nLabel compile without the CS1929 errors.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, unity
領域
compilers, devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。