Search Issue Tracker

Fixed in 2020.1.X

Fixed in 2019.3.X

Votes

0

Found in

2019.1

Issue ID

1213506

Regression

No

ApiUpdater may leave orphan usings when only type qualified references were present in the source

Scripting

-

In some scenarios after ApiUpdater runs old, non existing namespaces may be left in using clauses.

This may happen if Unity changes a type to a namespace that already exists and is already imported in the script.

For instance, consider the following:

// In UnityEngine.dll
namespace UnityEngine.Foo
{
class Bar {}

class Baz {} // Originally in UnityEngine.Other
}

// in user code
using UnityEngine.Foo;
using UnityEngine.Other;

class C : UnityEngine.Other.Baz
{
}

When ApiUpdater finishes updating user code it will looks something like:

// in user code
using UnityEngine.Foo;
using UnityEngine.Other; // Should have been removed

class C : Baz
{
}

Comments (63)

  1. Sofiakaif

    Jun 17, 2020 17:43

  2. Sofiakaif

    Jun 17, 2020 17:42

  3. Sofiakaif

    Jun 17, 2020 17:41

  4. Sofiakaif

    Jun 17, 2020 17:40

  5. Sofiakaif

    Jun 17, 2020 17:00

  6. Sofiakaif

    Jun 17, 2020 17:00

  7. Sofiakaif

    Jun 17, 2020 16:59

  8. Sofiakaif

    Jun 17, 2020 16:59

  9. Sofiakaif

    Jun 17, 2020 16:58

    Visit How is guava leaf tea helpful in treating 10 diseases? https://www.simpletipsofhealth.com/2020/05/guava-leaf-tea.html?m=1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.