Skip to content

Commit

Permalink
move outer clazz creation into if-block
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellilltokiwa committed Nov 3, 2023
1 parent bc589da commit d28e363
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 d28e363

Please sign in to comment.