Skip to content

Commit

Permalink
Merge pull request #2200 from michaellilltokiwa/move-outer-clazz-crea…
Browse files Browse the repository at this point in the history
…tion-into-`if`-block

move outer clazz creation into `if`-block
  • Loading branch information
fridis committed Nov 3, 2023
2 parents d81dfa0 + d28e363 commit 237e8be
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/dev/flang/air/Clazzes.java
Original file line number Diff line number Diff line change
Expand Up @@ -1120,20 +1120,14 @@ public static Clazz clazz(AbstractType thiz)
(Errors.any() || !thiz.dependsOnGenerics(),
!thiz.isThisType());

Clazz outerClazz;
if (thiz.outer() != null)
{
outerClazz = clazz(thiz.outer());
}
else
{
outerClazz = null;
}

var t = Types.intern(thiz);
var result = _clazzesForTypes_.get(t);
if (result == null)
{
Clazz outerClazz = thiz.outer() != null
? outerClazz = clazz(thiz.outer())
: null;

result = create(t, outerClazz);
_clazzesForTypes_.put(t, result);
}
Expand Down

0 comments on commit 237e8be

Please sign in to comment.