From 1fb5a195b5575e7015be4fd1ee8f89116a78cfb5 Mon Sep 17 00:00:00 2001 From: schinz Date: Mon, 10 Mar 2003 08:20:25 +0000 Subject: - bug fix: correctly detect calls to constructors - bug fix: do not add nested interfaces as fields --- sources/scalac/backend/jvm/GenJVM.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/scalac/backend/jvm/GenJVM.java b/sources/scalac/backend/jvm/GenJVM.java index cafd3d10e6..ba38f31e45 100644 --- a/sources/scalac/backend/jvm/GenJVM.java +++ b/sources/scalac/backend/jvm/GenJVM.java @@ -66,7 +66,7 @@ class JVMGenerator { protected final static String CONSTRUCTOR_STRING = Constants.CONSTRUCTOR_NAME; protected final static Name CONSTRUCTOR_NAME = - Name.fromString(CONSTRUCTOR_STRING); + Name.fromString(CONSTRUCTOR_STRING).toConstrName(); protected Unit unit = null; protected String sourceFileName = null; @@ -562,7 +562,7 @@ class JVMGenerator { Scope.SymbolIterator memberIt = cSym.members().iterator(); while (memberIt.hasNext()) { Symbol member = memberIt.next(); - if (!member.isMethod()) { + if (member.isTerm() && !member.isMethod()) { FieldGen fGen = new FieldGen(modifiersStoJ(member.flags), typeStoJ(member.info()), member.name.toString(), @@ -1328,7 +1328,7 @@ class JVMGenerator { default: { Symbol sym = tp.symbol(); if (sym == Symbol.NONE) - return null; + throw global.fail("invalid type ", tp); else if (typeMap.containsKey(sym)) return (Type)typeMap.get(sym); else { -- cgit v1.2.3